Guide · updated Nov 30, 2026
GitHub Actions security checklist.
Twelve settings and habits that would have stopped the 2025 and 2026 Actions incidents.
highlights · fix ready
Move @xmldom/xmldom to 0.8.15.
- "@xmldom/xmldom": "0.7.13"
+ "@xmldom/xmldom": "0.8.15"
- Verify passedinstall, build, 212 tests · 41 s
- Rescan cleanall 15 advisories gone
- Blast radiusbuild tools only, nothing in the app
Step by step
Pin every action to a commit SHA
Tags can be moved; SHAs can't.
- uses: actions/checkout@<sha> # v5Read-only token by default
Set it at the top of each workflow and grant writes per job.
permissions: contents: readMake the org default read-only
Org settings → Actions → Workflow permissions: read repository contents.
Fence pull_request_target
Never check out and run the PR's code in a pull_request_target job that holds secrets.
No user input inside run:
Pass ${{ github.event.* }} values through env:, never straight into a shell line.
Pass only the secrets a step needs
Never toJSON(secrets): one stolen step then leaks every secret.
Allow only known actions
Org settings: GitHub's, verified creators' and an allow-list.
No self-hosted runners on public repos
A fork's PR can run code on them.
Deploy with OIDC, not long-lived keys
AWS, Azure, GCP and Cloudflare all trust GitHub's OIDC token.
Approve first-time contributors' runs
Require approval before workflows run for outside contributors.
Scan workflows on every PR
zizmor finds injection, unpinned actions and broad tokens.
zizmor .github/workflowsGet told when Actions change
A new workflow on the default branch, a new runner or a new app with write access should reach a person the same day.
Or let IonCipher do it.
IonCipher runs these checks across the whole org, opens the free hardening PR, and pushes to your phone when a workflow, runner or app changes.
More guides
How to remove a secret from git history
Rotate the key first, then rewrite every commit that holds it with git filter-repo, force-push and ask GitHub to drop cached views..
Leaked API key: what to do in the first hour
A leaked API key, in order: revoke it, read the provider's logs since the leak, find every copy, redeploy with the new key, then clean the history..
Pin GitHub Actions to a commit SHA
Tags on GitHub Actions can be moved, as tj-actions (2025) and the Trivy Action (2026) showed.
A Dependabot alternative that batches PRs
Dependabot can group updates; here's the config.
Your first fix, on your phone tonight.
Connect GitHub; the first scan of every repo finishes in minutes.