Skip to content
$ shellfirm

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'
Output
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 idSeverityWhat it catchesSafe alternative
github:repo_deleteCriticalPermanently deletes a repository and all its data.
github:repo_archiveHighArchiving a repository makes it read-only and can break workflows.
github:repo_renameHighRenaming a repository breaks all existing URLs, clones, and CI/CD references.
github:repo_change_visibilityHighChanging repository visibility can expose private code or break public access.
github:release_deleteHighDeleting a release removes it and its assets permanently.
github:secret_deleteHighDeleting a secret can break CI/CD pipelines that depend on it.
github:variable_deleteHighDeleting a variable can break CI/CD pipelines that depend on it.
github:api_delete_repoCriticalThis deletes the GitHub repository through the API, with its issues, pull requests and wiki.
github:pr_merge_adminMediumThis merges the pull request as an administrator, bypassing the branch protection rules (required reviews and checks).
github:api_delete_refHighThis 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_webhookMediumThis 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_protectionHighThis 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_disableMediumThis turns a GitHub Actions workflow off: its CI, deploy or security checks stop running.gh workflow list
github:secret_set_emptyMediumThis replaces a GitHub secret or variable with an empty value: pipelines that use it break as if it were deleted.
github:api_make_publicHighThis makes the repository public through the GitHub API: its code and history become visible to everyone.
github:api_disable_actionsHighThis 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, like gh repo archive (github:repo_archive).
  • gh api -X DELETE on a repository is Critical (github:api_delete_repo). Deleting a ref or changing branch protection through the API is High.
  • gh pr merge --admin bypasses 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/null and gh secret|variable set NAME --body "" (github:secret_set_empty), and gh 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.

On this page