Repository navigation
fix(scan): pin the toolbox by digest, make findings actionable - #66
Merged
Merged
Conversation
Three defects in one step, all surfaced by OpenShows going red on 2026-09-08 without a line of its own changing. 1. The image was pulled by :latest. Callers pin this workflow by SHA, but the scanner it runs moved underneath them: #64 rebuilt the toolbox with betterleaks 1.6.1 -> 1.8.1, whose new generic-password and generic-credential-uri rules turned a green repo red overnight. Pinning the reusable workflow while the image floats gives the appearance of a pinned supply chain without the property. Now pinned by digest; bump it deliberately alongside toolbox/tools.lock. 2. The scan root was /src, an absolute path. betterleaks derives finding fingerprints from the root as given, so every fingerprint came out as /src/path/file.yml:rule:12 -- which can never match a .gitleaksignore, since that file is written relative to the repo root. The practical effect is that no caller could suppress a false positive at all: the ignore file was read and silently matched nothing. The working directory is already /src, so scanning "." fixes it. 3. On a finding the job printed a bare count and exited 1. No rule, no path, no line -- a blocking gate with nothing to act on. --verbose adds rule, path, line and a redacted excerpt; --redact still keeps values out of the log.
This was referenced Sep 9, 2026
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.
Three defects in the secret-scan step, all surfaced when OpenShows went red on 2026-09-08 without a line of its own changing.
1. The image floated on
:latestCallers pin this workflow by SHA, but the scanner it runs moved underneath them. #64 rebuilt the toolbox with betterleaks 1.6.1 → 1.8.1, whose new
generic-passwordandgeneric-credential-urirules turned a green repo red overnight.Pinning the reusable workflow while the image floats gives the appearance of a pinned supply chain without the property — a caller frozen at an August SHA still ran a scanner built last night. Now pinned by digest, to be bumped deliberately alongside
toolbox/tools.lock.2.
.gitleaksignorecould never workThe scan root was
/src, an absolute path. betterleaks derives fingerprints from the root as given, so findings came out as:A committed
.gitleaksignoreis written relative to the repo root, so those fingerprints could never match. The file was read and silently matched nothing — meaning no caller has been able to suppress a false positive at all. Verified by running betterleaks 1.8.1 both ways against the same tree: a relative root producesinfrastructure/docker/..., an absolute root produces/src/infrastructure/....The working directory is already
/src, so scanning.fixes it with no other change.3. A blocking gate with nothing to act on
On a finding the job printed
leaks found: 9and exited 1 — no rule, no path, no line, no artifact, andstartup-style opacity for anyone trying to triage.--verboseadds rule, path, line and a redacted excerpt;--redactstill keeps values out of the log:Blast radius
Callers pin by SHA, so nothing changes for them until each pin is bumped — deliberate, and the right order. Once bumped, a caller that was silently passing may start reporting real findings, and can now actually suppress false ones.