ci: mark deliberate secret-shaped test fixtures for rust-secrets#101
Merged
Conversation
The caller pinned standards' secret-scanner-reusable at @d135b05 (2026-06-24), which is 64 commits behind standards#500. At that pin the gitleaks step carries `continue-on-error: true` — the scan runs, reports success, and cannot fail. This repo's Secret Scanner has therefore been green while being incapable of failing. Re-pinned to @c65436ee, which contains #500: gitleaks now runs as a pinned, checksum-verified binary with `--exit-code 1` and gates for real. Also narrowed the caller's grant to `contents: read`. The new reusable invokes a binary rather than gitleaks-action, so it no longer requests `pull-requests: write` / `actions: read`. Added the estate baseline .gitleaks.toml (byte-identical to the one in standards), without which the now-real gate reds on false positives — dependency-metadata hashes, documented placeholder shapes and published test vectors. It allowlists by anchored pattern class, never by file and never by disabling a rule, so a genuinely new secret still trips. Verified: `gitleaks detect --exit-code 1` passes on this tree after the change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
standards' `rust-secrets` job becomes blocking outside `./src` on 2026-08-21. The lines tagged here are genuine matches on genuine secret-shaped literals — they are test data, not credentials — so they take the explicit per-line pragma rather than a pattern loophole that would weaken the gate for every repo. fuzz/fuzz_targets/fuzz_hmac.rs holds a fixed HMAC key for the fuzz harness; the file already says it is 'not the secret itself'. Verified: `rust-secrets` (extracted from standards' shipping YAML) exits 0 on this tree with RUST_TODAY=2026-09-01, i.e. after the cutoff. Scope: this commit touches ONLY Rust sources. The secret-scanner re-pin is deliberately NOT bundled — this repo is one of the 22 the sweep flagged, where gitleaks findings survive the estate baseline, and switching it to the real gate needs its own triage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
standards'
rust-secretsjob becomes blocking outside./srcon 2026-08-21 (warn-first window from standards#518).The lines tagged here are genuine matches on genuine secret-shaped literals — they are test data, not credentials. So they take an explicit, auditable per-line pragma rather than a pattern loophole that would weaken the gate for every repo in the estate.
// scanner-allow: rust-secretsWhy a pragma and not a pattern change
standards#523 already tightens the patterns to require an assignment directly to a string literal of length ≥ 8, which removes the real false positives estate-wide (lookups, path joins, prose). What remains here genuinely is an assignment of a secret-shaped literal — it just happens to be fixture data. Loosening the pattern to hide it would blind the gate everywhere.
Fixture integrity
Where the pragma sits outside the
r#"…"#raw string (after the closing quote/comma) it is an ordinary Rust comment and the fixture content is byte-identical — the tests exercise exactly the same data.Where it sits inside a multi-line fixture, it is a JS-style comment within fake content and does not change what the test asserts.
Verified
rust-secrets, extracted from standards' shipping YAML, exits 0 on this tree withRUST_TODAY=2026-09-01— i.e. after the cutoff, when the check is blocking.Scope
Only Rust sources. The secret-scanner re-pin is deliberately not bundled: this repo is one of the 22 the estate sweep flagged, where gitleaks findings survive the shared baseline, and moving it onto the real gate needs its own triage.
🤖 Generated with Claude Code