fix(ci): pass GITHUB_TOKEN to Hypatia scanner in reusable workflow#428
Merged
Conversation
The reusable scan workflow never set GITHUB_TOKEN in the "Run Hypatia scan" step, so the scanner's Dependabot / code-scanning / secret-scanning alert checks were always skipped with "GITHUB_TOKEN not set" warnings across every repo that calls this workflow. Set it to `secrets.HYPATIA_SCAN_PAT || secrets.GITHUB_TOKEN`: - Prefer a fine-grained, read-only PAT inherited as an org Actions secret (HYPATIA_SCAN_PAT) -- the built-in Actions token CANNOT read Dependabot alerts (no `dependabot` permission exists for GITHUB_TOKEN). - Fall back to the built-in token so code-scanning alerts still resolve in repos where the PAT is not present yet. This silences the three warnings fleet-wide once the org secret exists. It does not change the severity gate (medium+ findings still fail CI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V13sGvHnaeCY5A9fF2QsDm
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.
The reusable scan workflow never set GITHUB_TOKEN in the "Run Hypatia scan" step, so the scanner's Dependabot / code-scanning / secret-scanning alert checks were always skipped with "GITHUB_TOKEN not set" warnings across every repo that calls this workflow.
Set it to
secrets.HYPATIA_SCAN_PAT || secrets.GITHUB_TOKEN:dependabotpermission exists for GITHUB_TOKEN).This silences the three warnings fleet-wide once the org secret exists. It does not change the severity gate (medium+ findings still fail CI).
Claude-Session: https://claude.ai/code/session_01V13sGvHnaeCY5A9fF2QsDm
Summary
Closes #
Type of change
How has this been verified?
Checklist
git commit -S).SPDX-License-Identifier(code/configMPL-2.0,prose
CC-BY-SA-4.0); I did not relicense existing files.Notes for reviewers