Skip to content

build: add top-level permissions restriction to tests workflow#3711

Merged
vangent merged 1 commit into
google:masterfrom
XananasX7:patch-1
May 16, 2026
Merged

build: add top-level permissions restriction to tests workflow#3711
vangent merged 1 commit into
google:masterfrom
XananasX7:patch-1

Conversation

@XananasX7
Copy link
Copy Markdown
Contributor

Add explicit permissions: read-all to restrict the default GITHUB_TOKEN
permissions. Without this, workflows get the repository's default permissions
which may include write access.

This follows the principle of least privilege for CI workflows.

Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-the-minimum-permissions-for-the-github_token

 Add explicit `permissions: read-all` to restrict the default GITHUB_TOKEN
  permissions. Without this, workflows get the repository's default permissions
  which may include write access.

  This follows the principle of least privilege for CI workflows.

  Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-the-minimum-permissions-for-the-github_token
@vangent vangent merged commit b9dee8d into google:master May 16, 2026
5 checks passed
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