Skip to content

ci: declare contents:read on CI workflow#1861

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

ci: declare contents:read on CI workflow#1861
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 ci.yml to contents: read at workflow scope. The lint job runs npm ci, remark-lint over markdown, and yamllint after downloading the Node.js project's .yamllint.yaml via curl. Nothing writes to the repo or calls the GitHub API.

Defense-in-depth motivation is CVE-2025-30066 (tj-actions/changed-files): a compromised third-party action runs inside the existing job context and exfiltrates whatever scope the workflow token holds via build logs. The explicit cap bounds that.

Style matches the workflow-level permissions blocks already used in closeVote.yml, initiateNewVote.yml, and watchVote.yml (those declare contents: write + pull-requests: write because the vote bot needs those scopes; this one only needs read). YAML validated locally with yaml.safe_load.

The lint job runs npm ci, remark-lint over markdown, and yamllint
after downloading the Node.js project's .yamllint.yaml. None of these
write to the repo or call the GitHub API, so contents:read is the
minimum.

Style matches the workflow-level permissions blocks in closeVote.yml,
initiateNewVote.yml, and watchVote.yml.

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

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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