GitHub Actions
cicd.github_actions
Protects against destructive GitHub Actions operations like deleting secrets/variables or using gh api DELETE against /actions endpoints.
- 6blocking rules
- 7safe patterns
- 2High
- 2Medium
- 2Low
[packs]
enabled = ["cicd.github_actions"]Evaluated when a command contains gh.
Blocking rules
Each rule ID is cicd.github_actions:<name>. Use it in allowlists and [policy.rules].
Highgh-actions-api-delete-secretsgh api DELETE against /actions/secrets deletes GitHub Actions secrets.
Explanation
Making DELETE requests to the GitHub Actions secrets API removes secrets from the repository. This bypasses CLI confirmations and directly modifies repository settings. Workflows will fail when referencing deleted secrets. Safer alternatives: - Use gh secret delete for safer deletion with prompts - gh api GET first: Verify secret exists - Prefer CLI commands over direct API calls
Highgh-actions-secret-removegh secret delete/remove deletes GitHub Actions secrets. This can break CI and may be hard to recover.
Explanation
Deleting a GitHub Actions secret removes it from the repository, organization, or environment. Workflows using this secret will fail with authentication or configuration errors. Secret values are not recoverable after deletion. Safer alternatives: - gh secret list: Review existing secrets first - Update the secret value instead of deleting - Check workflow files for secret usage before removing
Mediumgh-actions-api-delete-variablesgh api DELETE against /actions/variables deletes GitHub Actions variables.
Explanation
Making DELETE requests to the GitHub Actions variables API removes variables from the repository. This bypasses CLI confirmations and directly modifies repository settings. Workflows referencing these variables will fail. Safer alternatives: - Use gh variable delete for safer deletion with prompts - gh api GET first: Verify variable exists - Prefer CLI commands over direct API calls
Mediumgh-actions-variable-removegh variable delete/remove deletes GitHub Actions variables. This can break workflows.
Explanation
Removing a GitHub Actions variable makes it unavailable to all workflows that reference it. Unlike secrets, variable values are visible, but workflows may fail with undefined variable errors after deletion. Safer alternatives: - gh variable list: Review existing variables first - gh variable set: Update value instead of removing - Search workflows for variable usage before removing
Lowgh-actions-run-cancelgh run cancel cancels a running workflow. This is reversible, but may disrupt deployments.
Explanation
Canceling a workflow run stops it mid-execution. Any in-progress deployments, tests, or builds will be interrupted. The run can be re-triggered, but partial work may leave systems in an inconsistent state. Safer alternatives: - gh run view: Check run status and progress first - gh run list: Review running workflows - Wait for natural completion if possible
Lowgh-actions-workflow-disablegh workflow disable disables workflows. This is reversible, but can disrupt CI.
Explanation
Disabling a workflow prevents it from running on any triggers. This is reversible with 'gh workflow enable', but can disrupt CI/CD pipelines, scheduled jobs, and automated deployments while disabled. Safer alternatives: - gh workflow list: Review workflow status first - gh workflow view: Check workflow details - Use workflow_dispatch for manual control instead
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
gh-actions-secret-listgh-actions-variable-listgh-actions-workflow-listgh-actions-workflow-viewgh-actions-run-listgh-actions-run-viewgh-actions-api-explicit-get