Skip to content

Add explicit least-privilege permissions to CI workflows - #3635

Merged
sjanc merged 1 commit into
apache:masterfrom
arpitjain099:security/workflow-permissions-ci-hardening
Jun 26, 2026
Merged

Add explicit least-privilege permissions to CI workflows#3635
sjanc merged 1 commit into
apache:masterfrom
arpitjain099:security/workflow-permissions-ci-hardening

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Summary

  • Add explicit workflow token permissions to CI workflows currently relying on implicit defaults.
  • Set contents: read for build/test/check workflows.
  • For the badge-update automation workflow that creates pull requests, grant only required write scopes:
    • contents: write
    • pull-requests: write

Why

Explicitly declaring least-privilege GITHUB_TOKEN permissions improves Actions security posture and documents required access for each workflow without changing CI behavior.

@arpitjain099

Copy link
Copy Markdown
Contributor Author

Hi @kasjer, gentle ping on this. PR has been open for 4 days without review. I noticed you've been on the recent-merger side of recent merges in this repo. When you have a moment, would you mind giving it a quick look? No urgency. Happy to address any feedback.

@kasjer
kasjer requested a review from sjanc May 18, 2026 05:15
Declare workflow-level permissions blocks on the CI workflows that
previously inherited the repository default GITHUB_TOKEN scope. Each
workflow only checks out code and runs build/test steps, so contents:
read is the minimum scope required. Documents intent explicitly and
removes reliance on org-default token grants.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
arpitjain099 force-pushed the security/workflow-permissions-ci-hardening branch from 00c6812 to 9005d85 Compare June 10, 2026 06:51
@sjanc
sjanc merged commit eb3d397 into apache:master Jun 26, 2026
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants