fix(ci): make fixture-detection checks hermetic (unblock v0.8.10 npm publish) - #187
Merged
Merged
Conversation
….yml can't suppress them The v0.8.10 publish (run 28332931747) failed at github-action.test.ts "CLI detects secrets in fixture file" (exit 0, expected 1), which gated publish-node — leaving npm at 0.8.9 while PyPI shipped 0.8.10, breaking dual-implementation version parity on the registries. Root cause: PR #184 added a repo-root .rafter.yml that declassifies **/fixtures/** and .github/fixtures/** as triaged false positives for the dogfooding security gate. Six checks scan .github/fixtures expecting detection, but policy discovery walks cwd -> git root, finds .rafter.yml, and suppresses the finding: - node/tests/github-action.test.ts "CLI detects secrets in fixture file" - publish.yaml smoke-test-node / smoke-test-python detection steps - test-action.yml detect-secrets / pip-install / published-v1 jobs (dormant — the path filter didn't fire on #184's root-file change) Fix: keep .rafter.yml exactly as the #184 backend-verified security review set it. Instead, make the detection checks hermetic — copy the fixture to a temp dir outside the repo (smoke/unit tests) or a neutral /tmp path the policy globs don't match (action jobs) so no .rafter.yml is discovered. These checks verify the detection ENGINE and must be decoupled from the repo's own self-scan policy. Verified locally: isolation restores exit 1 for node file/dir scans and the python file scan; github-action.test.ts 81/81. Version stays 0.8.10: twine --skip-existing no-ops the existing PyPI upload, npm publishes 0.8.10 fresh, and create-release cuts the v0.8.10 tag. Bead: sable-nfjq 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.
Problem
The v0.8.10 publish failed (run 28332931747).
publish-pythonsucceeded (PyPI → 0.8.10) buttest-nodefailed atgithub-action.test.ts"CLI detects secrets in fixture file" (exit 0, expected 1), which gatedpublish-node. Result: npm is stuck at 0.8.9 while PyPI shipped 0.8.10 — dual-implementation version parity is broken on the registries.Root cause
PR #184 added a repo-root
.rafter.ymlthat declassifies**/fixtures/**and.github/fixtures/**as triaged false positives for the dogfooding security gate. Six checks scan.github/fixturesexpecting detection, but policy discovery walkscwd → git root, finds.rafter.yml, and suppresses the finding → exit 0:node/tests/github-action.test.ts— "CLI detects secrets in fixture file" (the confirmed failure)publish.yaml→smoke-test-nodedetection step (would fail; was skipped)publish.yaml→smoke-test-pythondetection step (would fail; was skipped)4–6.
test-action.yml→detect-secrets/pip-install/published-v1jobs (dormant — the path filter didn't fire on security: remediate Rafter scan (deps + FP triage + tarball hardening) [sable-qsig] #184's root-file change)Fix
Keep
.rafter.ymlexactly as the #184 (backend-verified) security review set it. Instead make the detection checks hermetic — they verify the detection engine, which must be decoupled from the repo's own self-scan policy:mktemp -ddir outside the repo and scan there (no.rafter.ymlabove it)./tmppath the policy globs don't match.The fixture's bytes are copied verbatim, so the engine scans identical content; only the repo's self-scan policy is excluded.
github-action.test.ts:556still guards the in-repo fixture content viafs. Verified locally: isolation restores exit 1 for node file/dir scans + the python file scan;github-action.test.ts81/81.Release impact
Version stays 0.8.10:
twine upload --skip-existingno-ops the existing PyPI upload,npm publishships 0.8.10 fresh, andcreate-releasecuts thev0.8.10tag. After this lands onmain, amain → prodmerge re-triggerspublish.yamlto bring npm to parity.Review
rafter-code-reviewwalkthrough (CWE-78/CWE-22 on the added CI bash): clean — variables quoted,mktemppaths, no Actions-expression injection; tests still genuinely assert detection (not vacuous). Remoterafter runnot executable here (noRAFTER_API_KEY); diff is CI/test-only with no product-code surface.Bead: sable-nfjq
🤖 Generated with Claude Code