Skip to content

ci: declare contents:read on detect-breaking-changes workflow#1876

Open
arpitjain099 wants to merge 1 commit into
openai:masterfrom
arpitjain099:chore/detect-breaking-changes-permissions
Open

ci: declare contents:read on detect-breaking-changes workflow#1876
arpitjain099 wants to merge 1 commit into
openai:masterfrom
arpitjain099:chore/detect-breaking-changes-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

The detect-breaking-changes.yml workflow has two jobs (detect_breaking_changes, agents_sdk) that run scripts against the PR diff and base. Neither writes to the repo or comments on the PR -- they fail the build if a breaking change is detected.

This patch pins the workflow to permissions: contents: read. The style matches the per-job permission blocks already declared by ci.yml, publish-jsr.yml, and publish-npm.yml (typically contents: read + id-token: write for trusted publishing).

With explicit scope:

  • the workflow token can't be widened by a future change to the repo default
  • the SLSA / OpenSSF Scorecard Token-Permissions check passes for this file
  • third-party action exposure (actions/setup-node@v3, pnpm/action-setup@v4) is bounded to read

No behavioural change.

The detect_breaking_changes and agents_sdk jobs run scripts against the
PR diff and PR base; no GitHub API write beyond actions/checkout.
contents:read is the floor.

Style matches the per-job permissions blocks already declared by
ci.yml, publish-jsr.yml, publish-npm.yml (contents:read + id-token:write
for trusted npm publishing).

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099 arpitjain099 requested a review from a team as a code owner May 14, 2026 02:49
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