Skip to content

ci: add least-privilege workflow permissions (CodeQL)#100

Closed
jhamon wants to merge 1 commit into
mainfrom
ci/least-privilege-workflow-permissions
Closed

ci: add least-privilege workflow permissions (CodeQL)#100
jhamon wants to merge 1 commit into
mainfrom
ci/least-privilege-workflow-permissions

Conversation

@jhamon

@jhamon jhamon commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds explicit permissions: blocks to both GitHub Actions workflows to resolve two CodeQL actions/missing-workflow-permissions alerts and enforce the principle of least privilege on the default GITHUB_TOKEN.

  • CI.yamlpermissions: contents: read (read-only test runner; no writes needed)
  • CD.yamlpermissions: contents: write (creates git tags and GitHub releases via the token)

CodeQL alerts resolved

References

PIN-24


Note

Low Risk
Workflow-only security hardening with permissions aligned to existing CI read and CD release behavior; no application or runtime logic changes.

Overview
Adds explicit permissions: blocks to CI.yaml and CD.yaml so the default GITHUB_TOKEN is no longer granted broad repo access, addressing CodeQL actions/missing-workflow-permissions alerts.

CI is scoped to contents: read for checkout and test runs. CD is scoped to contents: write so release steps can create tags and GitHub releases.

Reviewed by Cursor Bugbot for commit 2525e4b. Bugbot is set up for automated code reviews on this repo. Configure here.

Add explicit top-level permissions blocks to CI and CD workflows to
satisfy the principle of least privilege and resolve two CodeQL
actions/missing-workflow-permissions alerts.

- CI.yaml: permissions: contents: read (read-only test runner)
- CD.yaml: permissions: contents: write (creates git tags and GitHub releases)

Resolves CodeQL alerts #1 (CI.yaml) and #2 (CD.yaml).

PIN-24
@jhamon

jhamon commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #99, which makes the identical least-privilege permissions: change plus explanatory comments on each block. Consolidating on #99.

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