Skip to content

Restrict GitHub Actions token permissions - #44

Open
Sandijigs wants to merge 1 commit into
rust-lang:mainfrom
Sandijigs:restrict-workflow-permissions
Open

Sandijigs wants to merge 1 commit into
rust-lang:mainfrom
Sandijigs:restrict-workflow-permissions

Conversation

@Sandijigs

Copy link
Copy Markdown

Without explicit permissions, the job may inherit a token with unnecessary write access. Setting permissions: {} removes its GITHUB_TOKEN permissions, so it only has the access it needs.

The job only checks out public code, builds, and tests, so it doesn't need token permissions.

This resolves zizmor's excessive-permissions finding as part of enforcing the lint across rust-lang repositories through crabwatch, tracked in this crabwatch issue

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