Commit fdfeba0
ci: stop the publish audit failing on pull requests that cannot reach the deny list
The publish audit failed on all five open Dependabot pull requests, and it did
so for a reason unrelated to their content. GitHub withholds repository secrets
from fork and Dependabot pull requests, so PUBLISH_AUDIT_RULES arrives empty and
check_audit_rules.py exits non-zero by design. Measured in the job log:
env:
PUBLISH_AUDIT_RULES:
no publish-audit rules available: PUBLISH_AUDIT_RULES is unset or empty ...
##[error]Process completed with exit code 1.
Failing closed is right when the secret ought to be there. On those runs it
never can be, so the check reported the absence of a secret every time, forever.
A permanently red audit check is worse than no check, because it teaches the
maintainer to stop reading a red audit.
The audit now skips with a notice, and only when the secret is genuinely empty
AND the event is a pull request. The guarantee that matters is unchanged:
nothing reaches master unaudited. Merging a pull request produces a push to
master, the push trigger always has the secret, and a push that cannot find the
deny list still fails hard. A fork's content is not published by opening a pull
request, it is published by merging one, and that merge is audited.
All five branches of the decision were exercised locally before pushing, under
the same shell options a run block uses:
secret present + push -> scan runs
secret present + pull request -> scan runs
secret empty + pull request -> skip with a notice, exit 0
secret empty + push -> exit 1
secret empty + manual dispatch -> exit 1
The decision is a plain if with no pipeline, because `cmd | grep -q` under
pipefail reports no match when there is one, and that has silently disabled a
security gate in this workspace before. It tests only whether the value is
empty and never echoes it, since this repository's Actions logs are public.
Also corrected a false statement in the same file's header. It claimed "This
repository is PRIVATE today", which stopped being true on 2026-08-25 when the
repository went public. That sentence is the reasoning a future reader relies on
when judging how much the audit matters.
Also raises the pytest-cov floor to 7.1.0, completing the set of Dependabot
updates. The other four merged cleanly; that one conflicted because two of the
others had already changed the same file. Verified in a throwaway environment
that the newest ruff (0.16.6) and pytest (9.1.1) both pass on this code.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qbBV3zD1wx78Tq68xyZts1 parent 55e7eaa commit fdfeba0
2 files changed
Lines changed: 49 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
27 | 41 | | |
28 | 42 | | |
29 | 43 | | |
| |||
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
60 | 99 | | |
| 100 | + | |
61 | 101 | | |
62 | 102 | | |
63 | 103 | | |
| 104 | + | |
64 | 105 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
0 commit comments