Skip to content

ci: set least-privilege GITHUB_TOKEN permissions#1

Merged
stxkxs merged 1 commit into
mainfrom
fix-ci-workflow-permissions
Jun 20, 2026
Merged

ci: set least-privilege GITHUB_TOKEN permissions#1
stxkxs merged 1 commit into
mainfrom
fix-ci-workflow-permissions

Conversation

@stxkxs

@stxkxs stxkxs commented Jun 20, 2026

Copy link
Copy Markdown
Member

See commit message for full details.

Summary

  • Adds a top-level permissions: contents: read default to .github/workflows/ci.yml.
  • Resolves both CodeQL actions/missing-workflow-permissions alerts (the lint and render jobs, which only read the repo).
  • pr-summary keeps its explicit pull-requests: write override.
  • yamllint clean.

Closes the 2 open code scanning alerts (#1, #2) once merged + re-scanned.

CodeQL (actions/missing-workflow-permissions) flagged the lint and render
jobs for running with the default, overly-broad GITHUB_TOKEN scope. Add a
top-level `permissions: contents: read` default so every job starts at
read-only. Both flagged jobs only check out and validate the repo, so the
default is all they need; the pr-summary job keeps its explicit
`pull-requests: write` override for posting the CI comment.

Resolves the 2 open code scanning alerts.

Co-authored-by: stxkxsbot <275011021+stxkxsbot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

CI

yamllint + crossplane render passed.

@stxkxs stxkxs merged commit bd016b2 into main Jun 20, 2026
5 checks passed
@stxkxs stxkxs deleted the fix-ci-workflow-permissions branch June 20, 2026 04:15
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