ci: scan only the history being merged for secrets #230
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.60) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 211 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #230"
general
weight: 0.35
abendrothj
What and why
The secret scan's
gitleaks gitscans every fetched branch (fetch-depth: 0), but reads.gitleaks.tomlfrom the PR under test. So a test file one branch allows in its own config fails every other PR's scan: #226 is red today because offixtures/envelope/hpk2-kem.jsonon #228's branch.The scan now lives in
scripts/secret-scan.sh, which CI andcheck.shboth run. It scans only HEAD's history: on a pull request that is the merge withmain, under that PR's own config. It also diffs merge commits against their first parent, reads attributes from the empty tree, and fails if gitleaks logs a git error or scans no commits (gitleaks itself exits 0 in both cases).How it was tested
main's config: scanning all refs finds the 3 hits CI reports; scanning HEAD finds none.scripts/secret-scan.sh selftestcovers a leak at the tip, a top-levelHEADfile, a leak only in a conflict resolution, a-diffattribute,color.ui=always, and a damaged repo. Removing any one of the protections makes it fail.scripts/check.shpasses.Checklist
scripts/check.shpasses locallySECURITY_AUDIT_EVENTcovered byaudit_coverage.rs: n/adocs/DATA_POLICY.md)CHANGELOG.mdupdated for user-visible changes (CONTRIBUTING, DATA_POLICY; no user-visible change)docs/adr/if one was made: n/a