Skip to content

docs(backlog): file #1481, a scoped secret scan that walks zero commits passes - #978

Merged
wshallwshall merged 3 commits into
mainfrom
claude/1481-vacuous-scan-guard
Sep 8, 2026
Merged

docs(backlog): file #1481, a scoped secret scan that walks zero commits passes#978
wshallwshall merged 3 commits into
mainfrom
claude/1481-vacuous-scan-guard

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

A required secret gate can report success having looked at nothing

Ledger-only. Files BACKLOG #1481; no code changes.

PR #977 (BACKLOG #1479) scopes the required gitleaks (secret scan) job with --log-opts. A range is a thing that can resolve empty, and an empty range makes the scanner report 0 commits scanned and exit 0 — a green tick, indistinguishable in the checks UI from a clean scan.

Measured on the CI-pinned 8.18.4 binary:

invocation reported exit
--log-opts HEAD (what 977 ships) 2 commits scanned 1, planted secret caught
--log-opts HEAD..HEAD (empty range) 0 commits scanned 0
no --log-opts (pre-977 default) 2 commits scanned 1

The shipped range is safe, which is why this is P3 and filed rather than fixed

--log-opts HEAD is a literal — not a base SHA, head ref, or PR number. Measured on a merge-commit HEAD shaped like a merge-queue commit (two parents): 2 commits scanned, secret caught, exit 1. It cannot resolve empty on any of the workflow's five triggers.

This row is about the next edit. 977's own comment records that an event-aware range was declined because three of five triggers carry no base SHA — the moment someone adds one, the range acquires the ability to be empty, and on those triggers it silently will be.

Why this is not bolted onto 977

977 is green and is unblocking a merge queue that has been frozen for hours. Adding speculative hardening would have cost a full CI cycle to defend against a future edit rather than a present defect, on a file another session is concurrently holding. The finding is real, so it is filed with its measurements rather than dropped.

Provenance

Raised by a peer session reviewing 977, which asked what the range evaluates to on a merge_group run and correctly named the failure mode as a silent pass, not a red. 977's stated posture was "if the merge-group run fails, that is the finding" — which covers the red case and not this one. The range turned out safe; the hazard it pointed at is real.

Checks

scripts/docs/backlog_status_check.py passes (680 items, one pre-existing advisory on #1426). All pre-commit hooks passed. No code touched, so no suite is implicated.

Expect a tail conflict with any other ledger append; it rebases for free.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the ci-red A required check went red. Attribute it before retrying. label Sep 7, 2026
@wshallwshall
wshallwshall force-pushed the claude/1481-vacuous-scan-guard branch from 11b87b1 to fa64b81 Compare September 7, 2026 15:41
@github-actions github-actions Bot added the unread Green and mergeable, but not marked read. Read it, then add: reviewed label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

@wshallwshall

This pull request is green and nobody has marked it read.

Every check that has reported is passing and the reviewed label is absent, so
a reviewer has read this is the only thing between it and a merge. Nothing else reports that, which is
why this comment exists (BACKLOG #1413).

To clear it, IN THIS ORDER:

  1. If the branch is behind main, update it FIRST: gh pr update-branch --repo MEFORORG/MessageFoundry 978.
    That push fires synchronize, and synchronize REMOVES the reviewed label. Labelling
    before updating throws the label away and costs a round trip.
  2. Read the diff.
  3. gh pr edit 978 --repo MEFORORG/MessageFoundry --add-label reviewed

DO NOT TRIAGE THIS FROM mergeStateStatus. It returns one value with precedence, so BEHIND,
DIRTY and UNSTABLE each mask the missing check -- the requirement is invisible until you act on
something else. This check never reads that field; see scripts/ci/check_unread_prs.py.

A seat can find every pull request in this state in one call: gh pr list --label unread.

Adding reviewed withdraws unread: the label event re-evaluates this pull request,
and so does the next completion of a watched workflow. Those are the two edges that clear it, so a
change neither of them reports -- converting to a draft, say -- can leave the label standing until one
of them next happens.

The reviewed label is a PROCESS gate. It records that a step happened. It does not
establish that an independent party looked, and nothing here should be read as saying it does.

wshallwshall and others added 2 commits September 7, 2026 15:39
…ts passes

that can resolve empty, and an empty range makes the scanner report
`0 commits scanned` and exit 0. That is a green tick on a required secret gate
that looked at nothing, and nothing downstream tells it apart from a clean scan.

Measured on the pinned 8.18.4 binary. `--log-opts HEAD..HEAD` reports
`0 commits scanned`, exit 0; the shipped `--log-opts HEAD` reports
`2 commits scanned` and exit 1 on a merge-commit HEAD carrying a planted
secret. So the shipped range is a literal that cannot resolve empty on any of
the five triggers, and this row is about the next edit to it -- the moment
somebody makes the range event-aware, the trigger with no base SHA gets an
empty one.

The row carries the guard, verified against real 8.18.4 output on four cases,
and the reason it must read the scanner's own count rather than re-derive the
range with `git rev-list`: a second copy of the range is free to drift from the
flag it checks, which is the second-definition defect #1479 removed from that
job's own header. It also records that `tee` needs `set -o pipefail`, because
GitHub's default `run:` shell would otherwise discard the findings exit code --
the same vacuous-pass class one layer down.

Filed rather than implemented. #1479 is green and is unblocking a frozen merge
queue; bolting speculative hardening onto it would have cost a full CI cycle to
defend against a future edit rather than a present defect. Raised by a peer
session reviewing #1479, and that provenance is in the row.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… principle

Two additions from the peer session that raised the row, both verified here
before writing them down.

The fix section now LEADS with the generalisation rather than burying it: a
check that recomputes its subject rather than reading the subject's own report
is not a check. That is what decides the implementation, and the `git rev-list`
warning is a consequence of it rather than a separate rule.

Names the shortcut a reader will otherwise take. Declaring `shell: bash` also
fixes the pipefail half, because GitHub substitutes
`bash --noprofile --norc -eo pipefail {0}` when the shell is named explicitly
instead of the bare `bash -e {0}` default. It must be rejected: the step would
acquire pipefail as an invisible side effect of naming a shell it was already
using, and a later edit removing it as redundant re-introduces the defect while
looking like a cleanup. Same hidden-mechanism hazard the row is about, one
layer further down.

Measured over .github/workflows/*.yml today: 12 workflows set pipefail
explicitly, 3 files use `shell: bash` at all, and the gitleaks scan step
declares no shell -- so it does take the no-pipefail default, which is the
premise the row rests on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wshallwshall
wshallwshall force-pushed the claude/1481-vacuous-scan-guard branch from fa64b81 to f790bdb Compare September 7, 2026 20:39
@github-actions github-actions Bot removed the unread Green and mergeable, but not marked read. Read it, then add: reviewed label Sep 7, 2026
@wshallwshall
wshallwshall added this pull request to the merge queue Sep 8, 2026
@github-actions github-actions Bot added the unread Green and mergeable, but not marked read. Read it, then add: reviewed label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

@wshallwshall

This pull request is green and nobody has marked it read.

Every check that has reported is passing and the reviewed label is absent, so
a reviewer has read this is the only thing between it and a merge. Nothing else reports that, which is
why this comment exists (BACKLOG #1413).

To clear it, IN THIS ORDER:

  1. If the branch is behind main, update it FIRST: gh pr update-branch --repo MEFORORG/MessageFoundry 978.
    That push fires synchronize, and synchronize REMOVES the reviewed label. Labelling
    before updating throws the label away and costs a round trip.
  2. Read the diff.
  3. gh pr edit 978 --repo MEFORORG/MessageFoundry --add-label reviewed

DO NOT TRIAGE THIS FROM mergeStateStatus. It returns one value with precedence, so BEHIND,
DIRTY and UNSTABLE each mask the missing check -- the requirement is invisible until you act on
something else. This check never reads that field; see scripts/ci/check_unread_prs.py.

A seat can find every pull request in this state in one call: gh pr list --label unread.

Adding reviewed withdraws unread: the label event re-evaluates this pull request,
and so does the next completion of a watched workflow. Those are the two edges that clear it, so a
change neither of them reports -- converting to a draft, say -- can leave the label standing until one
of them next happens.

The reviewed label is a PROCESS gate. It records that a step happened. It does not
establish that an independent party looked, and nothing here should be read as saying it does.

Merged via the queue into main with commit 43f0bad Sep 8, 2026
41 checks passed
@wshallwshall
wshallwshall deleted the claude/1481-vacuous-scan-guard branch September 8, 2026 02:05
@github-actions github-actions Bot removed the unread Green and mergeable, but not marked read. Read it, then add: reviewed label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-red A required check went red. Attribute it before retrying.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant