Skip to content

ci: add permissions: contents: read to ci#65

Open
arpitjain099 wants to merge 1 commit into
airbnb:masterfrom
arpitjain099:chore/declare-workflow-perms
Open

ci: add permissions: contents: read to ci#65
arpitjain099 wants to merge 1 commit into
airbnb:masterfrom
arpitjain099:chore/declare-workflow-perms

Conversation

@arpitjain099

Copy link
Copy Markdown

Sets the minimum-required GITHUB_TOKEN scope on ci.yml:

  • Workflow-level permissions: -> contents: read
  • No changes to jobs, steps, runners, or triggers
  • YAML still parses (yaml.safe_load succeeds)

Rationale:

  • The CI test job is read-only; nothing in it needs write access to the repo.
  • Without an explicit block, the run inherits whatever default the repository's actions settings happen to be set to. That default has drifted in the past, and forks-of-forks lose track of it.
  • the OpenSSF Scorecard Token-Permissions check flags missing per-workflow permissions as a finding.
  • After the tj-actions/changed-files supply-chain incident from March 2025, the cost-benefit on explicit minimum scopes is firmly on the side of declaring them.

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.

2 participants