Skip to content

ci(check): set an explicit read-only permissions floor - #33

Merged
CameronBrooks11 merged 1 commit into
mainfrom
ci/workflow-permissions
Sep 7, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
ci/workflow-permissions

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

check.yml declared no permissions: key, so its GITHUB_TOKEN inherited the repository default. CodeQL flagged all three jobs with actions/missing-workflow-permissions:

  • check.yml:11 — security/code-scanning/1
  • check.yml:30 — security/code-scanning/2
  • check.yml:50 — security/code-scanning/3

These are the 3 open code-scanning alerts on the org.

Fix

permissions: contents: read at the top level. Every job only reads the repository — checkout, uv sync, ruff, pyright, pytest, and a git diff drift check — so one top-level floor covers all three. release.yml already declares its own and was not flagged.

Verification

just check and just test both pass (120 passed, 4 skipped). YAML parses with permissions = {'contents': 'read'} across jobs check, test, codegen.

The workflow declared no permissions, so its GITHUB_TOKEN inherited the
repository default. CodeQL flagged all three jobs
(actions/missing-workflow-permissions).

Every job only reads the repository — checkout, uv sync, ruff, pyright,
pytest, and a git diff drift check — so contents: read at the top level
covers all three. release.yml already declares its own.
@CameronBrooks11
CameronBrooks11 merged commit d787ab6 into main Sep 7, 2026
8 checks passed
@CameronBrooks11
CameronBrooks11 deleted the ci/workflow-permissions branch September 7, 2026 21:26
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