Skip to content

fix(scan): pin the toolbox by digest, make findings actionable - #66

Merged
garymike merged 1 commit into
mainfrom
fix/secret-scan-actionable
Sep 9, 2026
Merged

garymike merged 1 commit into
mainfrom
fix/secret-scan-actionable

Conversation

@garymike

@garymike garymike commented Sep 9, 2026

Copy link
Copy Markdown
Owner

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 :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 — 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. .gitleaksignore could never work

The scan root was /src, an absolute path. betterleaks derives fingerprints from the root as given, so findings came out as:

/src/infrastructure/docker/docker-compose.yml:generic-password:38

A committed .gitleaksignore is 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 produces infrastructure/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: 9 and exited 1 — no rule, no path, no line, no artifact, and startup-style opacity for anyone trying to triage. --verbose adds rule, path, line and a redacted excerpt; --redact still keeps values out of the log:

┌─generic-credential-uri──○
│ 120 │     'postgresql://openshows:REDACTED@localhost:5432/postgres'
│ attributes:
│   confidence ...... low
│   path ............ src/api/test/db-url.ts
└○

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant