Skip to content

ci: declare contents:read on typecheck workflow#90

Merged
43081j merged 1 commit into
prettier:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777670-24
May 17, 2026
Merged

ci: declare contents:read on typecheck workflow#90
43081j merged 1 commit into
prettier:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777670-24

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Adds a workflow-level permissions: contents: read. The job checks out the repo and runs the linter / format checker; nothing here calls a GitHub API beyond the initial checkout, and the action surfaces failures as the workflow's own check status.

This is supply-chain hygiene anchored in CVE-2025-30066 - the March 2025 tj-actions/changed-files compromise - where a tampered third-party action read GITHUB_TOKEN out of workflow logs and the blast radius equalled whatever scope was issued. Pinning per workflow caps that runtime authority irrespective of the repo or org default, gives drift protection if the default ever widens, and is what OpenSSF Scorecard's Token-Permissions check credits. Small files like this one are the easy place to start the org-wide hygiene work.

YAML validated locally with yaml.safe_load.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@43081j 43081j merged commit de7fdd8 into prettier:main May 17, 2026
4 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