Skip to content

ci: declare contents:read on test workflow#101

Merged
jcs090218 merged 1 commit into
prettier:mainfrom
arpitjain099:chore/declare-workflow-perms
May 26, 2026
Merged

ci: declare contents:read on test workflow#101
jcs090218 merged 1 commit into
prettier:mainfrom
arpitjain099:chore/declare-workflow-perms

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Pins .github/workflows/test.yml to permissions: contents: read at the workflow level. The CI job sets up Node and Emacs, installs the package locally, then runs the prettier integration tests against the Emacs binary. No GitHub API calls beyond the initial checkout.

CVE-2025-30066 (the March 2025 tj-actions/changed-files compromise) is the supply-chain case for being explicit: a tampered third-party action read GITHUB_TOKEN from workflow logs and the blast radius equalled whatever scope was issued. Capping at contents: read here keeps the runtime authority bounded regardless of the org or repo default, gives drift protection if that default ever widens, and registers with OpenSSF Scorecard's Token-Permissions check.

YAML validated locally with yaml.safe_load.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
Copy link
Copy Markdown
Contributor Author

@jcs090218 - PR has your approval and is green. Mergeable whenever convenient, thanks!

@jcs090218 jcs090218 merged commit 29ea00a into prettier:main May 26, 2026
12 checks passed
@jcs090218
Copy link
Copy Markdown
Collaborator

Thank you for taking care of this!

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