Commit 0eb0fda
Make AUDIT_PAT required, fail loudly when missing
The audit's gh queries against repo administration endpoints
(/rulesets, /actions/secrets, /environments/*) require AUDIT_PAT.
Previously the workflow degraded gracefully when AUDIT_PAT was
absent, recording those checks as UNVERIFIABLE. That left half of
the FAIL IFs in SECURITY.md unenforceable, which defeats the
purpose of having the audit at all.
New pre-check step "Verify AUDIT_PAT is provisioned" runs before
Claude. If the secret is empty it writes a FAIL status, a
self-explanatory audit-report.md (so the issue body explains the
problem instead of pointing at logs), and exits non-zero. The
Surface step then files the issue as usual.
Claude's prompt now treats 403 from gh api as a real FAIL ("PAT's
scope has drifted") rather than UNVERIFIABLE — since AUDIT_PAT is
guaranteed present by the time Claude runs, 403 means the token's
permissions are wrong.
SECURITY.md: the AUDIT_PAT FAIL IF now asserts presence in the
env (not just placement); the audit-weakening FAIL IF covers
removing the pre-check; the CI Validation Contract prose calls
the token required rather than optional.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c48230e commit 0eb0fda
2 files changed
Lines changed: 46 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
48 | 75 | | |
49 | 76 | | |
50 | 77 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
58 | 83 | | |
59 | 84 | | |
60 | 85 | | |
| |||
83 | 108 | | |
84 | 109 | | |
85 | 110 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
97 | 122 | | |
98 | 123 | | |
99 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
0 commit comments