Skip to content

Commit ade583c

Browse files
Merge branch 'main' into claude/rsr-template-repos-tooling-74caxz
2 parents 5661121 + e2ef79e commit ade583c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/hypatia-scan-reusable.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ jobs:
4949
5050
- name: Run Hypatia scan
5151
id: scan
52+
env:
53+
# The scanner reads a single env var, GITHUB_TOKEN, to pull Dependabot,
54+
# code-scanning and secret-scanning alerts (lib/rules/{dependabot,
55+
# code_scanning,secret_scanning}_alerts.ex). Without it those three
56+
# checks are skipped with "GITHUB_TOKEN not set" warnings.
57+
#
58+
# Prefer a fine-grained, read-only PAT (HYPATIA_SCAN_PAT, inherited as
59+
# an org secret via the caller's `secrets: inherit`): the built-in
60+
# Actions token CANNOT read Dependabot alerts (no `dependabot`
61+
# permission exists for it). Fall back to the built-in token so
62+
# code-scanning still works in repos where the PAT isn't present yet.
63+
GITHUB_TOKEN: ${{ secrets.HYPATIA_SCAN_PAT || secrets.GITHUB_TOKEN }}
5264
run: |
5365
echo "Scanning repository: ${{ github.repository }}"
5466
# --exit-zero: hypatia-cli exits 1 when findings exist; under the default

0 commit comments

Comments
 (0)