GitHub (repository & Actions)
25 items · source
CI/CD & Supply Chain
- Review branch protection.
- Require CODEOWNERS.
- Review
pull_request_target. - Enable Dependabot updates for actions.
- Verify the repository and organisation Actions settings give
GITHUB_TOKENread-only access by default and have "Allow GitHub Actions to create and approve pull requests" off — otherwise a workflow can open a PR and supply its own required approval. - Search every workflow for
actions/checkoutwithoutpersist-credentials: false— by default the job token is written into.git/config, so any later step, or an artifact that uploads the workspace, carries a usableGITHUB_TOKEN. - Search for workflows triggered by
pull_request_targetorworkflow_runthat check outgithub.event.pull_request.head.shaorhead.ref, or download the triggering run's artifacts — these run with the base repository's secrets and write token, so building PR-controlled code there hands both to the PR author. - Search workflows for writes of untrusted values to
$GITHUB_ENV,$GITHUB_OUTPUTor$GITHUB_PATH— a newline in the value adds variables such asNODE_OPTIONSorLD_PRELOADthat execute in every later step. - Search workflows for
ACTIONS_ALLOW_UNSECURE_COMMANDS: true— it re-enables the deprecatedset-envandadd-pathlog commands, so any log line an attacker controls can set environment variables.
Pre-Release Gates
- GitHub repository audit complete.
- GitHub Actions audit complete.
AI Output Handling
- Never directly use model output as a GitHub Actions workflow.
AI Integrations (email, browser, repos, cloud)
- Agent cannot modify branch protection.
- Agent cannot modify GitHub Actions permissions.
- Agent cannot modify CODEOWNERS without review.
AI-Generated Crypto, Dependency & Config Bugs
Review every AI-generated:
- GitHub Actions
Verify AI did not:
- disable branch protection
- give GitHub Actions write-all permissions
AI-Generated Infrastructure & Pipeline Bugs
- Review
GITHUB_TOKEN. - Review
pull_request_target.
Review Blind Spots
- Verify old GitHub Actions security patterns are not copied.
- Compare GitHub Actions permissions.
Agent Prompts & PR Review
- Agent is prohibited from bypassing branch protection.
Treat AI suggestions such as these as security-sensitive:
- "use
pull_request_target"
Vibe-Coding Release Gate
- AI changed GitHub Actions.
# GitHub (repository & Actions) ## CI/CD & Supply Chain * [ ] Review branch protection. * [ ] Require CODEOWNERS. * [ ] Review `pull_request_target`. * [ ] Enable Dependabot updates for actions. * [ ] Verify the repository and organisation Actions settings give `GITHUB_TOKEN` read-only access by default and have "Allow GitHub Actions to create and approve pull requests" off — otherwise a workflow can open a PR and supply its own required approval. * [ ] Search every workflow for `actions/checkout` without `persist-credentials: false` — by default the job token is written into `.git/config`, so any later step, or an artifact that uploads the workspace, carries a usable `GITHUB_TOKEN`. * [ ] Search for workflows triggered by `pull_request_target` or `workflow_run` that check out `github.event.pull_request.head.sha` or `head.ref`, or download the triggering run's artifacts — these run with the base repository's secrets and write token, so building PR-controlled code there hands both to the PR author. * [ ] Search workflows for writes of untrusted values to `$GITHUB_ENV`, `$GITHUB_OUTPUT` or `$GITHUB_PATH` — a newline in the value adds variables such as `NODE_OPTIONS` or `LD_PRELOAD` that execute in every later step. * [ ] Search workflows for `ACTIONS_ALLOW_UNSECURE_COMMANDS: true` — it re-enables the deprecated `set-env` and `add-path` log commands, so any log line an attacker controls can set environment variables. ## Pre-Release Gates * [ ] GitHub repository audit complete. * [ ] GitHub Actions audit complete. ## AI Output Handling * [ ] Never directly use model output as a GitHub Actions workflow. ## AI Integrations (email, browser, repos, cloud) * [ ] Agent cannot modify branch protection. * [ ] Agent cannot modify GitHub Actions permissions. * [ ] Agent cannot modify CODEOWNERS without review. ## AI-Generated Crypto, Dependency & Config Bugs Review every AI-generated: * [ ] GitHub Actions Verify AI did not: * [ ] disable branch protection * [ ] give GitHub Actions write-all permissions ## AI-Generated Infrastructure & Pipeline Bugs * [ ] Review `GITHUB_TOKEN`. * [ ] Review `pull_request_target`. ## Review Blind Spots * [ ] Verify old GitHub Actions security patterns are not copied. * [ ] Compare GitHub Actions permissions. ## Agent Prompts & PR Review * [ ] Agent is prohibited from bypassing branch protection. Treat AI suggestions such as these as security-sensitive: * [ ] "use `pull_request_target`" ## Vibe-Coding Release Gate * [ ] AI changed GitHub Actions. 25 items · https://github.com/FarzamHabibi/pre-production-checklist · CC BY 4.0