Skip to content

fix: restrict top-level workflow token permissions to read-only#89

Merged
BjoernKarma merged 1 commit into
mainfrom
fix/workflow-token-permissions
Apr 28, 2026
Merged

fix: restrict top-level workflow token permissions to read-only#89
BjoernKarma merged 1 commit into
mainfrom
fix/workflow-token-permissions

Conversation

@BjoernKarma
Copy link
Copy Markdown
Owner

Summary

Details

Workflow Change
ci.yaml Top-level restricted to contents: read; write perms moved to gitctl job
release.yaml Top-level restricted to contents: read; write perms moved to release job
reusable-go-ci.yaml Added top-level contents: read; added job-level perms for tests, codeql, and build jobs
codeql.yml Added top-level contents: read (job already had proper permissions)

Note: Alert #1 (go.yml) references a file that no longer exists and should auto-dismiss or be manually closed.

Test plan

  • CI workflow passes on this PR (validates permissions are sufficient)
  • Verify Scorecard re-scan resolves Token-Permissions alerts

Move write permissions from top-level to job-level in all workflow files
to follow the principle of least privilege. This resolves OpenSSF Scorecard
Token-Permissions alerts (#9, #18-23) by ensuring the GITHUB_TOKEN is
scoped narrowly to only the jobs that need elevated access.
@BjoernKarma BjoernKarma merged commit 9f3ff5f into main Apr 28, 2026
8 checks passed
@BjoernKarma BjoernKarma deleted the fix/workflow-token-permissions branch April 28, 2026 13:09
gitctl-bot Bot pushed a commit that referenced this pull request Apr 28, 2026
## [1.1.1](v1.1.0...v1.1.1) (2026-04-28)

### Bug Fixes

* restrict top-level workflow token permissions to read-only ([#89](#89)) ([9f3ff5f](9f3ff5f)), closes [#9](#9) [#18-23](#18)
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