Skip to content

ci: declare contents:read on CI workflow#418

Open
arpitjain099 wants to merge 1 commit into
nodejs:mainfrom
arpitjain099:chore/ci-permissions
Open

ci: declare contents:read on CI workflow#418
arpitjain099 wants to merge 1 commit into
nodejs:mainfrom
arpitjain099:chore/ci-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

@arpitjain099 arpitjain099 commented May 14, 2026

Pins the workflow GITHUB_TOKEN to read-only for ci.yml. All three jobs are read-only against the GitHub API: commit-lint runs wagoid/commitlint-github-action, code-quality runs biomejs/setup-biome + biome ci, build-and-test runs the node matrix across ubuntu/macos/windows. No registry push, no PR comment, nothing that needs more than contents: read.

Defense-in-depth motivation is the CVE-2025-30066 shape: a compromised third-party action (and there are three here) runs inside the existing job context and exfiltrates whatever scope the workflow token was issued at. The explicit cap bounds the blast radius.

Matches the read-all shorthand already used in scorecard.yml. YAML validated locally with yaml.safe_load.

The three jobs (commit-lint, code-quality, build-and-test) only run
wagoid/commitlint, biomejs/setup-biome, and a node test matrix. No
GitHub API write, no cache. contents:read covers actions/checkout
and is the actual minimum.

Style matches the workflow-level read-all in scorecard.yml and the
per-job permission blocks in audit.yml (security-events:write +
packages:read + actions:read + contents:read).

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