Skip to content

Declare token permissions in ci.yml and crossvalidate.yml - #7

Merged
Paururo merged 1 commit into
mainfrom
fix/workflow-permissions
Aug 22, 2026
Merged

Paururo merged 1 commit into
mainfrom
fix/workflow-permissions

Conversation

@Paururo

@Paururo Paururo commented Aug 22, 2026

Copy link
Copy Markdown
Member

Closes the two open CodeQL alerts, both actions/missing-workflow-permissions.

Neither workflow declared a permissions: block, so each runs with whatever the repository default is. That default is currently read, so nothing was over-permitted in practice. What the alert is really about is the dependency: the workflows were relying on a setting elsewhere staying what it is, and flipping the repository default to write would widen both without anyone touching them.

Both only check out the code and run things over it, so contents: read is the whole list.

The other eight workflows already declared theirs. Worth noting these two were files I wrote, and CodeQL's actions queries are exactly what caught them.

CodeQL's actions queries flagged both: neither declared a permissions
block, so the GITHUB_TOKEN they run with is whatever the repository
default happens to be. That default is currently read, so nothing was
actually over-permitted, which is the reason this is worth fixing rather
than urgent: the workflows were relying on a setting elsewhere staying
what it is, and a change to it would widen them without anyone touching
them.

Both only check out the code and run things over it, so contents: read is
the whole list.

These were the first two findings from the CodeQL setup added a few
commits ago, and they were in workflows I wrote, which is roughly the
argument for having a machine read them.
@github-actions github-actions Bot added the ci Workflows, checks and repository automation label Aug 22, 2026
@Paururo
Paururo merged commit a7f0820 into main Aug 22, 2026
8 checks passed
@Paururo
Paururo deleted the fix/workflow-permissions branch August 22, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows, checks and repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant