You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Secret scan: hold the install step and the checkout's version, not only the scan #146
Part of the epic "Epic: slice 0, foundations. The repo holds the line, its context is tested, and the platform facts are recorded".
Follows "CI: a Lens's verdict and the secret scan's rules run from the base" (#145, closing #137). Muse Wonder (Meta) read it; after #145's last fix two gaps are left in what scan_problems holds on its own, without the EXEMPT hash. Today a change to ci.yml must also change that hash, and .github/ changes need the model review (decision 0020), so neither gap is open; this makes the check stand alone, as scan_problems intends.
Why.
The install step is checked only for naming no base and running no gitleaks. An install that writes a stub /usr/local/bin/gitleaks (exit 0) passes scan_problems (probed at 2dda6c5); the scan then never runs.
_checkout and _with ignore which actions/checkout the pin names, and PIN normalisation makes any @<40-hex> # v… text equal; a pin to a version that predates ref:/path: passes every check (probed with a v2.7.0 pin).
Done when
The install step's whole run: is held exactly (as the scan step's is), and its version and checksum are the only free values.
Each checkout's pin is the one pinned elsewhere in the repo's workflows (or a listed one), not any 40-hex SHA.
Solution Architect, delegated. On main at bd18750.
Both gaps are real, and today only the EXEMPT hash and the model review of .github/ close them. scan_problems should hold the scan on its own, with the hash as a second wall.
1. The install's whole block is held exactly.
INSTALL_RUN, beside SCAN_RUN, is the install's six lines as they stand. Any other block is a problem of its own. It replaces the check that the install names no base, which it covers.
The block reads ${GITLEAKS_VERSION} and ${GITLEAKS_CHECKSUM}, so the values are free while the block is not.
Each value is held to its shape, quoted: the version "N.N.N", the checksum 64 lowercase hex. The version's shape matters: it goes into the URL's path, and curl folds /../, so a free version could fetch another repository's release.
The URL, --proto '=https' and sha256sum -c are held. A free checksum can only accept what a gitleaks release serves. Whether it is the right one is the reviewer's, as on any bump.
No floor on the version. A gitleaks without a flag of SCAN_RUN exits non-zero, and the scan fails closed. The hash still names the exact version.
2. Every checkout is the listed one, not "the one pinned elsewhere".
"Pinned elsewhere" has no fixed point: one change that moves every checkout moves what they are compared with. PIN makes pins equal in both word-for-word comparisons, so nothing else holds them.
CHECKOUT in check_workflows.py names the commit and its version, 3d3c42e5… # v7.0.1.
It is held in lint, under the pin rule, for every actions/checkout in every workflow. verify's base checkout needs ref: as the scan's does.
Other actions keep any looked-up pin. Only checkout's ref: and path: carry a rule here.
3. Tests and mutants.
Counter-cases: a stub install (printf 'exit 0' | sudo tee /usr/local/bin/gitleaks), a line added, a version with /../, a checksum not hex, and a v2.7.0 checkout pin in ci.yml and in verify.yml's base checkout.
Mutants: the block comparison off, each shape check off, the listed-pin comparison off. "The secret scan's install may write to base/" goes with its line.
4. No decision 0031. Decision 0023 already says the base is checked out "by the same pinned actions/checkout", and that the install names no base. This holds what it says. 0023 gains two Boundary rows, which check_decisions allows, and docs/standards/workflows.md a sentence under "Pinned to what was looked up".
Taken as working rulings (the Maintainer may overturn them in review)
An actions/checkout bump must also edit the listed pin (CHECKOUT), so a bot's bump can't merge on its own. It touches .github/, so it needs the model review in any case (decision 0020).
Activity
don-petry commentedon Oct 17, 2026
Working rulings (overturnable in review)
Solution Architect, delegated. On main at bd18750.
Both gaps are real, and today only the
EXEMPThash and the model review of.github/close them.scan_problemsshould hold the scan on its own, with the hash as a second wall.1. The install's whole block is held exactly.
INSTALL_RUN, besideSCAN_RUN, is the install's six lines as they stand. Any other block is a problem of its own. It replaces the check that the install names nobase, which it covers.${GITLEAKS_VERSION}and${GITLEAKS_CHECKSUM}, so the values are free while the block is not."N.N.N", the checksum 64 lowercase hex. The version's shape matters: it goes into the URL's path, and curl folds/../, so a free version could fetch another repository's release.--proto '=https'andsha256sum -care held. A free checksum can only accept what a gitleaks release serves. Whether it is the right one is the reviewer's, as on any bump.SCAN_RUNexits non-zero, and the scan fails closed. The hash still names the exact version.2. Every checkout is the listed one, not "the one pinned elsewhere".
PINmakes pins equal in both word-for-word comparisons, so nothing else holds them.CHECKOUTincheck_workflows.pynames the commit and its version,3d3c42e5… # v7.0.1.lint, under thepinrule, for everyactions/checkoutin every workflow.verify's base checkout needsref:as the scan's does.ref:andpath:carry a rule here.3. Tests and mutants.
printf 'exit 0' | sudo tee /usr/local/bin/gitleaks), a line added, a version with/../, a checksum not hex, and a v2.7.0 checkout pin inci.ymland inverify.yml's base checkout.examples/workflows/invalid/pin.a-checkout-not-the-listed-one.ymlbreakspinalone.4. No decision 0031. Decision 0023 already says the base is checked out "by the same pinned
actions/checkout", and that the install names no base. This holds what it says. 0023 gains two Boundary rows, whichcheck_decisionsallows, anddocs/standards/workflows.mda sentence under "Pinned to what was looked up".Taken as working rulings (the Maintainer may overturn them in review)
actions/checkoutbump must also edit the listed pin (CHECKOUT), so a bot's bump can't merge on its own. It touches.github/, so it needs the model review in any case (decision 0020).