Commit 179e53a
authored
chore(vuln): pin and bump action refs (SEC-171) (#135)
## What
Deterministic remediation of four zizmor audit rules:
- `known-vulnerable-actions` — bumps vulnerable refs to the GHSA
advisory's `first_patched_version`, re-pins to SHA, syncs the version
comment.
- `unpinned-uses` — rewrites `@tag` refs to `@<sha> # <tag>`.
- `ref-version-mismatch` — rewrites the trailing comment to match the
tag the pinned SHA actually points at.
- `impostor-commit` — replaces the impostor SHA with the correct SHA for
the tag.
All edits are SHA-pinned ref rewrites plus comment synchronisation. No
workflow logic, step ordering, permissions, or non-`.github/` files are
touched.
## How
1. `zizmor --fix=all` run under a restricted config
(`sec-scan/sec-ops/sec-171-action-refs/zizmor.yml`) that disables every
other audit.
2. A Python post-processor (`postprocess.py`) repairs any line where
zizmor's auto-fix left the ref unpinned — an observed failure mode on
certain impostor-commit cases. The post-processor resolves the tag → SHA
via `gh api` and rewrites the line.
3. Two sanity guards run before commit:
- `git diff --name-only` must only contain paths under `.github/`.
- Every added `uses:` line must match `owner/repo@<40-hex-sha>`.
## 1 parent ed57028 commit 179e53a
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
0 commit comments