Repository navigation
fix(ci): sync secret-scanner.yml from the template; stop echoing matched credential lines - #7
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 seconds. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5dfdcaed8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # exclude '$', so ="${VAR}" and ="$VAR" never match. Only file names | ||
| # are listed, never the matched text. | ||
| SQ="'" | ||
| ASSIGN="[A-Z_]*(TOKEN|API_KEY|SECRET)[A-Z_]*=[\"${SQ}][A-Za-z0-9_./+=-]{16,}[\"${SQ}]|PASS[W]ORD=[\"${SQ}][^\"${SQ}\$]{6,}[\"${SQ}]" |
There was a problem hiding this comment.
* Match generic _KEY assignments
When a credential is stored under a common name such as AUTH_KEY="abcdefghijklmnop" or ENCRYPTION_KEY="abcdefghijklmnop", this expression does not match it: the alternation accepts only the literal API_KEY, despite the surrounding comment and commit contract claiming support for *_KEY. Such values also need not match any provider-specific prefix, so the shell-secrets pass can report clean; include a generic KEY alternative (with the intended naming boundaries).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The gap is real: the expression matches API_KEY but not AUTH_KEY or ENCRYPTION_KEY. I traced it to the template (rsr-template-repo secret-scanner.yml, ASSIGN), and the canonical secret-scanner-reusable.yml in standards has the same restriction ([A-Z_]*API_KEY[A-Z_]*) despite its comment saying *_KEY. I'm not widening the regex only in this copy: it would diverge from the template and show up as drift on the next sync. The fix belongs at source (standards reusable first, then the template mirrors it), so I'm taking it to the owner as a separate change. This thread stays open until that is decided.
Generated by Claude Code
…es, not only API_KEY (#1570) ## What The `shell-secrets` step's own comment says `*_TOKEN / *_KEY / *_SECRET / PASSWORD`, but its key pattern was `API_KEY` only. So `AUTH_KEY="…"` and `ENCRYPTION_KEY="…"` read clean. Codex found this on hyperpolymath/zig-unorm#7; the owner chose to fix it at source (here first, then the rsr-template-repo inline scanner mirrors it). ## Change - `secret-scanner-reusable.yml`: the key pattern now covers `API`, `AUTH`, `ACCESS`, `ENCRYPTION`, `SIGNING`, `PRIVATE` and `MASTER` `_KEY`. A bare `[A-Z_]*_KEY` is deliberately not used: it would also hit `PUBLIC_KEY`, `SORT_KEY`, `CACHE_KEY` and `PRIMARY_KEY`. - `tests/test_secret_scanner_canary.sh`: a new section plants four credential-style key literals and counts all four; plants `PUBLIC_KEY`/`SORT_KEY`/`CACHE_KEY` and `${VAR}`/`$VAR` references and requires a clean run. It extracts the real step body with `yq`, like the existing Rust canary. ## Evidence - I ran the shipping step body (extracted with `awk`, not `yq`, since `yq` is not available in my environment) against those fixtures. The old reusable (`origin/main`) reports 1 of 4 planted secrets; this change reports 4 of 4. Both are clean on the non-secret fixtures. The new canary section would therefore fail on the old reusable. - The `yq`-based canary harness itself was **not** run by me; CI runs it. - Blast radius, measured with a `grep` equivalent of the old and new key patterns over `*.sh`/`*.bash` in the 8 repo clones I had (standards, rsr-template-repo, cicd-squabbler, zig-unorm, fumble, gitbot-fleet (partial clone), ZeroInflatedCounts.jl, ResidualEvidenceTypes.jl): old 0 matches, new 0 matches in each. That is 8 repos, not the estate; consumers pinned by SHA do not change until their pin moves. ## Not in this PR The rsr-template-repo inline scanner (`ASSIGN`, `*_API_KEY`) and the copies synced from it have the same gap. They mirror this file, so they follow in a separate change after this lands. --- _Generated by [Claude Code](https://claude.ai/code/session_0136P7Zmiut2nCcbtEx25HAU)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
…hed credential lines Replaces the inline scanner with rsr-template-repo d183b32's copy. The only differences: standards helper pin e064539 -> f0b3cd4 (reachable from standards main); matched lines are reported as file:line only, so a credential is not printed to the Actions log; the credential regex gains quoted-literal *_TOKEN=/*_API_KEY=/*_SECRET=/PASSWORD= detection. No uses: line changes, so actions.lock is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zmiut2nCcbtEx25HAU
The template file moved the scanner to standards f0b3cd4, but this repo's other workflows (governance.yml) still use e064539, and the file's own contract says the scanner pin must match every other workflow's. Keep e064539 here; the credential-echo fix and the extended detection do not depend on the pin. The whole-repo pin move is the applier's job and lands in one change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zmiut2nCcbtEx25HAU
979f8af to
925f212
Compare
|



Summary
Syncs
.github/workflows/secret-scanner.ymlfromhyperpolymath/rsr-template-repoatd183b32(template fixes #332 and #363). The owner approved this sync ahead of the staged rollout, after a dry-run of the exact diff.Changes
This is the whole diff (one file, +17 / -6). Nothing else changes.
e064539->f0b3cd4(3 lines).f0b3cd4is reachable from standards main (checked: main is 58 commits ahead of it).file:lineonly, so a matched credential is no longer echoed to the Actions log.*_TOKEN=,*_API_KEY=,*_SECRET=andPASSWORD=detection (values containing$are excluded, so"${VAR}"never matches).No
uses:line changes, soactions.lockis untouched.Not touched:
.github/workflows/security-policy.ymlalso contains a "hardcoded" pattern; I did not read it closely and have not changed it.Note:
mainhas one merge commit (81b6d8b, 2026-10-20, not from this PR). Merge this PR by squash or rebase only, so no merge commit is added.RSR Quality Checklist
Required
.envfiles includedTesting
The diff was compared against the template file (
diffshows exactly the changes above and nothing else). The workflow itself runs on this PR; I will check its result before anything is claimed.Generated by Claude Code
Summary by CodeRabbit