Skip to content

Restrict CI workflow token to least privilege (contents: read)#5

Merged
johncarmack1984 merged 1 commit into
mainfrom
chore/ci-workflow-permissions
Jun 17, 2026
Merged

Restrict CI workflow token to least privilege (contents: read)#5
johncarmack1984 merged 1 commit into
mainfrom
chore/ci-workflow-permissions

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

Fixes CodeQL code-scanning alert #1 (actions/missing-workflow-permissions, medium) on .github/workflows/ci.yml.

The check job had no permissions block, so its GITHUB_TOKEN inherited the repository default scope. CI only checks out and builds — it needs nothing but read access. Added a top-level least-privilege block:

permissions:
  contents: read

release.yml and pages.yml already declare explicit permissions, so they weren't flagged. Once this lands on main, the next CodeQL Analyze (actions) run re-scans and auto-closes the alert.

No changeset: this is a CI-workflow-only change with no effect on the published package, so it doesn't warrant a release.

@johncarmack1984 johncarmack1984 merged commit 6d89f90 into main Jun 17, 2026
4 checks passed
@johncarmack1984 johncarmack1984 deleted the chore/ci-workflow-permissions branch June 17, 2026 21:31
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