CI: a Lens's verdict and the secret scan's rules run from the base
Closes #137, in the scope the Maintainer shrank it to on 2026-10-17. A change can no longer loosen the Lens that judges it in two places: the secret scan's rules and allowlist, and verify's verdict. In this repo no Lens input can come off the list, and decision 0023 says why.
What changes
- Secret scan (
.github/workflows/ci.yml):- A second checkout, with the same pinned
actions/checkoutandpersist-credentials: false, puts the base inbase/. That ispull_request.base.sha, ormerge_group.base_sha, orgithub.shaon a push to main. - The run deletes the head's
.gitleaksignore, then scans with--config base/.gitleaks.toml --gitleaks-ignore-path base/.gitleaksignore. A change cannot widen the allowlist it needs. A false positive takes two merges, a cost the Maintainer accepted. - The scan adds
--log-opts="--full-history --all --diff-filter=tuxdb --text", which is gitleaks' default plus--text, so a head.gitattributesmarking a file-diffcannot hide it. - It also adds
--ignore-gitleaks-allow, so an inlinegitleaks:allowin the head is not obeyed. - Each of these was proved with a local canary on gitleaks 8.30.1.
- A new
scan_problems()incheck_workflowsholds all of this, andEXEMPThas the new hash.
- A second checkout, with the same pinned
verify(.github/workflows/verify.yml, its example and the standard): the judging job's only checkout is the base, so it runs the base'stools/needs_passed.py.check_workflowsrequires one base checkout withpersist-credentials: false. A workflow with a judging job may run onpull_requestandmerge_grouponly, so the base ref can never come out empty.- Decision 0023 records both changes. It also says why no
lens_inputsentry comes off the list: here only Dependabot's pin updates use the exemption, and they touch the protected.github/. And it recordsci.yml's further departure from the org's text. - Design: new trial P-37, what
merge_group.base_shais in a live event. GitHub documents it as the group's parent commit, and the queue history fits that.
Verified:
- On a
git archiveexport at b695e37, with gitleaks off PATH as in CI:make verifypasses andpython3 -m tools.mutantskills 404 of 404.check_decisionsis clean. - The exact
ci.ymlscan, run locally against a full clone with the base underbase/, scans 196 commits and finds no leaks. With the base's ignore file switched off, it reports exactly the four known fingerprints.
Reviewed by: a fresh-context Claude review and a security pass. They found that the scan had no rules at all, fixed first in #144. Also fixed: the .gitattributes and gitleaks:allow gaps, an empty base ref, and a quoted bash -c call.
AGY (Gemini 4 Argon) on 2c7d4ae: two majors and a minor, all real and fixed in 2dda6c5. scan_problems had read only the lines around the gitleaks call, and only the order of the two checkouts. It now holds the scan job to exactly four steps in order: the head's checkout, the base's checkout, the install, the scan. The scan step must be SCAN_RUN exactly, with no env, defaults, container or working-directory. The two untested branches now have tests and mutants. CodeRabbit's step-level if: false is refused by the same rule.
Muse Wonder (muse-wonder-1.0) on 2c7d4ae: its major, a shell function named gitleaks inside the scan step, is refused at 2dda6c5. Two gaps are left, and both are held today by ci.yml's hash and the model review: a stub binary written by the install step, and a downgraded checkout pin. Both are filed as #146.
CI's mutation shards on 2dda6c5: four mutants survived. They targeted code that read gitleaks calls by option, path or quotes, which became dead once the scan step had to equal SCAN_RUN. The code and its mutants are removed in b695e37. They had looked killed locally only because an unrelated test failed under load, which is filed as #147.
Follow-up: the judging job's env: could carry BASH_ENV or PYTHONPATH. The workflow file is the head's own, and .github/ changes need the model review (decision 0020).
š¤ Generated with Claude Code
Summary by CodeRabbit
- Security
- Secret scanning now uses the pull-request or merge-queue base revisionās rules while scanning the submitted changes and their history. Inline
gitleaks:allowannotations are ignored. - Required verification now evaluates the base revision, while checks and mutation testing continue to run against the submitted changes.
- Secret scanning now uses the pull-request or merge-queue base revisionās rules while scanning the submitted changes and their history. Inline
- Documentation
- Updated workflow guidance and architecture records to describe how base revisions are selected and evaluated in pull requests and merge queues.