Skip to content

Commit 914364d

Browse files
committed
fix(ci): keep reusable pin token out of scorecard.yml comment
The estate staleness check greps every workflow line for "scorecard-reusable.yml@" and extracts the SHA after it. The #42 comment ("... declared by scorecard-reusable.yml@d72fe5a.") added a SECOND match, so the extracted PINNED_SHA became two lines and never equalled the expected single SHA — a false "stale Scorecard reusable" failure even though the actual `uses:` pin is correct. Reword the comment to drop the token, with a NOTE to prevent regression. Verified locally: check-workflow-staleness.sh@d72fe5a now exits 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvsZgNxFbeqfRmrVFNhJ8G
1 parent a5eed60 commit 914364d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ jobs:
1414
analysis:
1515
# Explicit least-privilege permissions for the reusable Scorecard call:
1616
# contents:read to check out, security-events:write to upload the SARIF,
17-
# id-token:write to publish results to the OpenSSF API. Matches the scopes
18-
# declared by scorecard-reusable.yml@d72fe5a.
17+
# id-token:write to publish results to the OpenSSF API — exactly the
18+
# scopes the pinned reusable Scorecard workflow declares.
1919
# (Hypatia workflow_audit: scorecard_wrapper_missing_job_permissions)
20+
# NOTE: do not write the reusable's "<name>.yml@<sha>" string in a comment
21+
# here — the estate staleness check greps every line for that token and a
22+
# second match would break its single-pin SHA comparison.
2023
permissions:
2124
contents: read
2225
security-events: write

0 commit comments

Comments
 (0)