Skip to content

ci(codeql): grant actions: read in the reusable CodeQL workflow - #69

Merged
forkwright merged 1 commit into
mainfrom
ci/codeql-actions-read
Sep 3, 2026
Merged

ci(codeql): grant actions: read in the reusable CodeQL workflow#69
forkwright merged 1 commit into
mainfrom
ci/codeql-actions-read

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Summary

Add actions: read to both job permission blocks in the reusable CodeQL workflow (workflow_call).

Why

codeql-action/analyze post-processes SARIF by adding fingerprints, which calls GET /repos/{owner}/{repo}/actions/runs/{run_id}. That endpoint requires actions: read; the jobs currently grant only security-events: write + contents: read, so the token's actions permission is none.

  • On public repos the call succeeds anyway (workflow-run data is publicly readable), which is why akroasis/epistole/hamma are green with this exact shape.
  • On private repos it 403s (Resource not accessible by integration) and the job ends CodeQL job status was configuration error — observed 2026-09-02 on forkwright/arche (run 33689539168) and forkwright/hestia (run 33640480803), which carried standalone copies of this workflow.

Private repos additionally need GitHub Advanced Security for the SARIF upload itself (currently unpurchased — 422 on enablement), so this grant alone doesn't make private-repo CodeQL viable; it makes the template correct for the day GHAS exists, and stops the public-repo path from silently depending on public-data fallback.

Refs kanon#3644 (template freshness).

Merge status

Left unmerged per orchestrator instruction — another agent is working in this repo concurrently; review/merge at the operator's discretion.

codeql-action/analyze fingerprints SARIF via GET /actions/runs/{id},
which requires actions: read. Public-repo callers stay green without it
(the read falls back to public visibility), but any private-repo caller
403s at the fingerprint step and the job ends "configuration error" —
observed on forkwright/arche run 33689539168 and forkwright/hestia run
33640480803 with standalone copies of this shape. Granting it here makes
the template correct for private repos the day Advanced Security is
purchased, and removes a silent reliance on public-data fallback for the
public ones.

Refs kanon#3644.
@forkwright
forkwright merged commit 60157e7 into main Sep 3, 2026
2 checks passed
@forkwright
forkwright deleted the ci/codeql-actions-read branch September 3, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant