Skip to content

fix(ci): drop unneeded actions:read from secret-scanner reusable — fixes Secret Scanner startup_failure - #529

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/secret-scanner-reusable-actions-perm
Jul 27, 2026
Merged

fix(ci): drop unneeded actions:read from secret-scanner reusable — fixes Secret Scanner startup_failure#529
hyperpolymath merged 2 commits into
mainfrom
fix/secret-scanner-reusable-actions-perm

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The red

Secret Scanner on main is startup_failure — zero jobs, no logs. Root cause is the caller-under-grant rule (the same one that had Hypatia never executing):

  • secret-scanner-reusable.yml declares top-level permissions: actions: read, contents: read.
  • gitleaks overrides to contents: read, but rust-secrets and shell-secrets have no job-level permissions block, so they inherit the top-level and request actions: read.
  • The caller (secret-scanner.yml, and the least-privilege estate default) grants its scan job only contents: read.
  • A reusable job requesting more than the caller grants ⇒ the whole workflow is rejected at startup.

The fix

Drop actions: read from the reusable's top-level permissions (one line). Both secret-scanner jobs only checkout + grep file contents — none calls the Actions API — so actions: read was never needed.

  • Makes the reusable's default least-privilege (contents: read).
  • Greens standards' own Secret Scanner.
  • Fixes every estate caller that grants only contents: read, not just this repo — and reducing a reusable's declared permissions can only ever help the caller-grant check, never break a caller that already worked.

Verified: exactly one line removed, YAML still parses, gitleaks's explicit contents: read override is untouched, the only remaining actions: read strings are in the file's historical comments.

Refs the Secret Scanner startup_failure noted in the 2026-07-27 standards sitrep.

…xes startup_failure

rust-secrets and shell-secrets carry no job-level permissions block, so they
inherited the reusable top-level `actions: read` + `contents: read`. A caller
that grants its scan job only `contents: read` (least-privilege, e.g. standards
own secret-scanner.yml) then requested `actions: read` beyond the caller grant,
so every run died at startup_failure — the same caller-under-grant rule that had
Hypatia never executing.

Secret scanners only read file contents (checkout + grep); none calls the
Actions API. Dropping `actions: read` from the reusable top-level makes the
default least-privilege, greens standards Secret Scanner, and fixes every estate
caller granting only contents:read. Reducing a reusable declared permissions can
only help the caller-grant check, never break a working caller.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 27, 2026 13:05
@hyperpolymath
hyperpolymath merged commit 4feaaef into main Jul 27, 2026
20 of 21 checks passed
@hyperpolymath
hyperpolymath deleted the fix/secret-scanner-reusable-actions-perm branch July 27, 2026 13:05
@sonarqubecloud

Copy link
Copy Markdown

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