Skip to content

ci(lint): cap GITHUB_TOKEN to contents: read#1117

Open
arpitjain099 wants to merge 1 commit into
vitejs:masterfrom
arpitjain099:chore/workflow-perms
Open

ci(lint): cap GITHUB_TOKEN to contents: read#1117
arpitjain099 wants to merge 1 commit into
vitejs:masterfrom
arpitjain099:chore/workflow-perms

Conversation

@arpitjain099
Copy link
Copy Markdown

The Lint workflow only fetches the repo and runs npm install + npm run lint. No GitHub API calls beyond checkout, so a workflow-level contents: read is the appropriate ceiling.

Same least-privilege pattern that became standard after CVE-2025-30066 (the tj-actions/changed-files supply-chain compromise in March that exfiltrated default GITHUB_TOKEN scopes from caller workflow logs).

YAML validated locally with yaml.safe_load.

The lint workflow only fetches the repo and runs npm install + npm run lint. No GitHub API calls beyond checkout, so a workflow-level contents: read is the appropriate ceiling.

Same per-workflow least-privilege pattern that became standard practice after the tj-actions/changed-files compromise in March (CVE-2025-30066). Validated with yaml.safe_load.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
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