Skip to content

chore: apply least privilege permissions to github actions#288

Merged
sampaiodiego merged 1 commit into
mainfrom
least-privilege-actions
Jul 14, 2026
Merged

chore: apply least privilege permissions to github actions#288
sampaiodiego merged 1 commit into
mainfrom
least-privilege-actions

Conversation

@yasnagat

@yasnagat yasnagat commented Jun 2, 2026

Copy link
Copy Markdown
Member

Proposed changes

This PR applies the principle of least privilege to GITHUB_TOKEN permissions across all GitHub Actions workflows by setting permissions: {} globally and explicitly re-granting only the minimum permissions required per job, as part of a supply chain security hardening effort.

Workflows relied on GitHub’s default token scopes, which may grant more access than most jobs actually need. Scoping permissions at the job level reduces the attack surface in the event that a GitHub Action, third-party dependency, or CI component is compromised, helping mitigate the impact of potential supply chain attacks and limiting unnecessary repository access.

This change only affects the permissions granted to the workflow GITHUB_TOKEN. Operations authenticated using explicitly configured Personal Access Tokens (PATs) continue to have the scopes assigned to those tokens and are not affected by workflow permissions settings.

Issue(s)

SB-975

@yasnagat yasnagat marked this pull request as ready for review June 15, 2026 23:45
@yasnagat yasnagat force-pushed the least-privilege-actions branch from 7f1b495 to c4f9843 Compare July 9, 2026 13:32
@sampaiodiego sampaiodiego merged commit 62db5d2 into main Jul 14, 2026
13 checks passed
@sampaiodiego sampaiodiego deleted the least-privilege-actions branch July 14, 2026 21:13
@github-actions

Copy link
Copy Markdown

Created PR on the official-images repo (docker-library/official-images#21780). See https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what if you are wondering when it will be available on the Docker Hub.

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.

2 participants