GitHub
The github group (16 checks) covers gh repository, release, secret, workflow and API deletes and settings.
The github group has 16 checks for the GitHub CLI (gh). It covers deleting, archiving, renaming or re-publishing repositories, deleting releases, secrets and variables, emptying a secret or variable, deleting webhooks, turning workflows or Actions off, admin merges, and destructive calls through gh api.
Example
shellfirm check -c 'gh repo delete acme/web --yes'1 risky pattern(s) matched:
[github:repo_delete] [CRITICAL] Permanently deletes a repository and all its data.
Shell (you, in a terminal): would challenge (Yes, escalated from Math: severity CRITICAL)
AI agent (hooks, MCP): deny (blocked)
why: Severity CRITICAL meets or exceeds agent auto-deny threshold HIGH--yes skips GitHub's own confirmation, so shellfirm's challenge is the last chance to stop.
Checks
| Check id | Severity | What it catches | Safe alternative |
|---|---|---|---|
github:repo_delete | Critical | Permanently deletes a repository and all its data. | |
github:repo_archive | High | Archiving a repository makes it read-only and can break workflows. | |
github:repo_rename | High | Renaming a repository breaks all existing URLs, clones, and CI/CD references. | |
github:repo_change_visibility | High | Changing repository visibility can expose private code or break public access. | |
github:release_delete | High | Deleting a release removes it and its assets permanently. | |
github:secret_delete | High | Deleting a secret can break CI/CD pipelines that depend on it. | |
github:variable_delete | High | Deleting a variable can break CI/CD pipelines that depend on it. | |
github:api_delete_repo | Critical | This deletes the GitHub repository through the API, with its issues, pull requests and wiki. | |
github:pr_merge_admin | Medium | This merges the pull request as an administrator, bypassing the branch protection rules (required reviews and checks). | |
github:api_delete_ref | High | This deletes a branch or tag of the repository through the GitHub API (like git push --delete). | gh api repos/<owner>/<repo>/git/refs/heads/<branch> |
github:api_delete_webhook | Medium | This deletes a repository or organization webhook through the GitHub API: the integration behind it (CI, deploys, security scanning) stops getting events. | gh api repos/OWNER/REPO/hooks |
github:api_branch_protection | High | This removes or changes the branch protection rules (required reviews and checks) through the GitHub API. | gh api repos/<owner>/<repo>/branches/<branch>/protection |
github:workflow_disable | Medium | This turns a GitHub Actions workflow off: its CI, deploy or security checks stop running. | gh workflow list |
github:secret_set_empty | Medium | This replaces a GitHub secret or variable with an empty value: pipelines that use it break as if it were deleted. | |
github:api_make_public | High | This makes the repository public through the GitHub API: its code and history become visible to everyone. | |
github:api_disable_actions | High | This turns GitHub Actions off for the repository: no workflow (CI, deploys, security scans) runs. |
Notes
- Archiving a repository through the REST API (
gh api -X PATCH repos/OWNER/REPO -f archived=true) is High, likegh repo archive(github:repo_archive). gh api -X DELETEon a repository is Critical (github:api_delete_repo). Deleting a ref or changing branch protection through the API is High.gh pr merge --adminbypasses branch protection and required reviews, so it is Medium.gh api … -f visibility=public(github:api_make_public) and turning Actions off through the API (github:api_disable_actions) are High.gh workflow disable(github:workflow_disable),gh secret set NAME < /dev/nullandgh secret|variable set NAME --body ""(github:secret_set_empty), andgh api -X DELETE repos/OWNER/REPO/hooks/ID(github:api_delete_webhook) are Medium.- Git operations on your local clone (force pushes, remote branch deletes) are in the git group.