Skip to content

Commit bdb5a09

Browse files
committed
ci: drop secrets: inherit where unused; explicit mirror secrets; scorecard actions: read
secret-scanner and scorecard reusables (standards@75bd5994) declare no secrets and read none, so secrets: inherit forwarded every repository secret for nothing. The mirror reusable declares seven optional SSH keys; pass them as an explicit map (as affinescript-libraries does) instead of inheriting. The scorecard caller's job-level permissions block replaces the workflow-level one and dropped actions: read, which the callee's job requests; GitHub refuses a called job that asks for more than its caller grants. Repeat actions: read in the job block (CodeRabbit finding on #344, verified against the callee). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
1 parent 8d7e882 commit bdb5a09

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎.github/workflows/mirror.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@ permissions:
1616
jobs:
1717
mirror:
1818
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@75bd5994470661a099df562d6d5ad2fe744dbd66
19-
secrets: inherit
19+
# Explicit secrets map, not `secrets: inherit` (Hypatia WH008): the callee
20+
# (standards@75bd5994) declares exactly these seven, all optional.
21+
secrets:
22+
GITLAB_SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }}
23+
BITBUCKET_SSH_KEY: ${{ secrets.BITBUCKET_SSH_KEY }}
24+
CODEBERG_SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
25+
SOURCEHUT_SSH_KEY: ${{ secrets.SOURCEHUT_SSH_KEY }}
26+
DISROOT_SSH_KEY: ${{ secrets.DISROOT_SSH_KEY }}
27+
GITEA_SSH_KEY: ${{ secrets.GITEA_SSH_KEY }}
28+
RADICLE_KEY: ${{ secrets.RADICLE_KEY }}

‎.github/workflows/scorecard.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ jobs:
1919
# (its header documents: the caller MUST grant security-events:write
2020
# + id-token:write; contents:read lets it read the repo). Closes the
2121
# Hypatia `scorecard_wrapper_missing_job_permissions` finding.
22+
# actions: read is repeated here: this job-level block replaces the
23+
# workflow-level one, and the callee's job requests actions: read.
24+
# The callee declares no secrets, so no `secrets:` line.
2225
permissions:
26+
actions: read
2327
contents: read
2428
security-events: write
2529
id-token: write
2630
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@75bd5994470661a099df562d6d5ad2fe744dbd66
27-
secrets: inherit

‎.github/workflows/secret-scanner.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ jobs:
2424
pull-requests: write
2525
actions: read
2626
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@75bd5994470661a099df562d6d5ad2fe744dbd66
27-
secrets: inherit

0 commit comments

Comments
 (0)