Set up or align GitHub repo settings, branch/ruleset policy, templates, Actions hardening, Environments, release workflows, and deploy workflows for continuously publishable or deployable repositories.
97
100%
Does it follow best practices?
Impact
96%
1.35xAverage score across 7 eval scenarios
Passed
No known issues
Use this reference when editing GitHub Actions workflows, composite actions, reusable workflows, release jobs, deploy jobs, signing jobs, or any workflow that loads secrets.
Do not use pull_request_target for workflows that check out, install, build, test, package, publish, sign, deploy, or otherwise execute project code.
Use pull_request for outsider or fork code with read-only credentials. Keep secret-bearing work on trusted events such as push to protected branches, protected tags, or validated manual dispatch.
Secret-bearing manual workflows must validate inputs before checkout or credential loading:
Environment branch/tag policy is not enough when the job later checks out inputs.ref.
Set workflow permissions to contents: read or {} by default, then grant per job:
contents: write only for release notes, tags, release assets, or bump commits.id-token: write only for OIDC, trusted publishing, or keyless provenance.attestations: write only when producing GitHub build attestations.pull-requests: write only when posting PR comments or checks that require it.Pin high-trust release, publish, upload, signing, and deploy actions to full commit SHAs with a same-line version comment when the repo can maintain pin refreshes.
Example:
- uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6Before committing a pin, verify the SHA resolves upstream. Dependabot can update SHA-pinned GitHub Actions when the version comment is accurate.
Enable Dependabot github-actions updates for repos with pinned Actions. Pinning without an update path turns security hardening into drift.
Prefer scanner-backed gates before bespoke workflow validators:
actionlint for syntax and expression mistakeszizmor for GitHub Actions securityFor repos without GitHub Advanced Security, configure zizmor for annotations and omit security-events: write.
Workflow YAML is orchestration, not an application runtime.
run: steps to simple command calls or a tiny amount of glue.Use fetch-depth: 0 when release tooling, semantic versioning, affected detection, or tag operations need history.
Keep persist-credentials: false through dependency install, build, pack, and test steps whenever possible in secret-bearing jobs. Add write credentials only at the narrow release or deploy boundary.
Do not share package-manager caches between untrusted PR runs and privileged push, release, publish, signing, deploy, or promotion jobs.
If a cache is unavoidable, namespace it by workflow, event/trust level, platform, and lockfile. Release and signing jobs should regenerate or verify generated trees before publishing.
GitHub Actions artifacts are temporary CI scratch storage. They are acceptable for same-run handoff when retention and quota are understood, but they are a weak durable boundary.
Prefer durable publish/deploy inputs: