Skip to content

ci: declare minimum GITHUB_TOKEN permissions on check_last_run#4

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

ci: declare minimum GITHUB_TOKEN permissions on check_last_run#4
arpitjain099 wants to merge 1 commit into
scikit-learn:masterfrom
arpitjain099:chore/declare-workflow-perms

Conversation

@arpitjain099
Copy link
Copy Markdown

What: add permissions: contents: read to .github/workflows/check_last_run.yml.

Why: the benchmark check workflow doesn't write to the repo. Declaring the minimum scope is what GitHub recommends (docs) and what OpenSSF Scorecard's Token-Permissions check expects.

Why now: tj-actions/changed-files (CVE-2025-30066) showed how cheap an explicit permissions: block is relative to the cost of a leaked write-scoped token.

Risk of this change: none observed locally. The token scope is being tightened, not loosened, so the only failure mode would be a step that secretly needed a write scope - which would have to be added back explicitly with a clear justification. YAML still parses (yaml.safe_load).

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