Skip to content

fix(ci): correct Gitleaks/Scorecard caller permissions#120

Merged
amcheste merged 2 commits into
developfrom
fix/reusable-workflow-permissions-audit-2
Jul 20, 2026
Merged

fix(ci): correct Gitleaks/Scorecard caller permissions#120
amcheste merged 2 commits into
developfrom
fix/reusable-workflow-permissions-audit-2

Conversation

@amcheste-ai-agent

Copy link
Copy Markdown
Contributor

Summary

Same permission-capping bug class as the earlier fleet audit, hitting a fresh batch of repos — these were just converted from the old inline-job CI pattern to the centralized gh-workflows caller-stub pattern, and the conversion carried the bug over.

  • Gitleaks: adds pull-requests: read, needed by gitleaks-action to list a PR's commits and compute its scan range.
  • Scorecard: replaces permissions: read-all with an explicit grant. read-all looks generous but grants nothing for id-token (it has no read level, only none/write), so the analysis job's id-token: write request was denied entirely and every run failed at startup.

Test plan

  • Merge and confirm the next Gitleaks and Scorecard runs complete instead of failing at startup.

amcheste-ai-agent and others added 2 commits July 20, 2026 14:10
reusable-gitleaks.yml (v1.1.1+) requests pull-requests: read at the
workflow level, needed by gitleaks-action to list a PR's commits and
compute its scan range. A reusable workflow can only downgrade the
caller's token, so without this grant the run fails at startup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: amcheste <13696614+amcheste@users.noreply.github.com>
read-all looks generous but grants nothing for id-token (it has no
read level, only none/write), so the analysis job's id-token: write
request was denied entirely and every run failed at startup. Replaces
it with the explicit grant the reusable workflow's own doc documents.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: amcheste <13696614+amcheste@users.noreply.github.com>
@amcheste-ai-agent
amcheste-ai-agent Bot requested a review from amcheste as a code owner July 20, 2026 18:10
@github-actions github-actions Bot added the ci label Jul 20, 2026
@amcheste
amcheste merged commit cc4ae4f into develop Jul 20, 2026
8 checks passed
@amcheste
amcheste deleted the fix/reusable-workflow-permissions-audit-2 branch July 20, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants