ci: declare workflow-level contents: read on 4 check workflows#2743
Closed
arpitjain099 wants to merge 1 commit into
Closed
ci: declare workflow-level contents: read on 4 check workflows#2743arpitjain099 wants to merge 1 commit into
contents: read on 4 check workflows#2743arpitjain099 wants to merge 1 commit into
Conversation
Four lint/analysis workflows (format-check, codeql-build, static-analysis, mcdc) run pure checks. No GitHub API writes from the workflows. Workflow-level contents: read is the right cap. Post-CVE-2025-30066 hardening pattern. yaml.safe_load validated. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Author
|
Closing in favor of #2730 to avoid duplicate/overlapping permissions PRs in this repo. The extra workflow this PR touched needs write scopes (CodeQL, auto-update, or a user/issue responder), so it should not get a blanket contents: read; I am leaving that to the maintainers. #2730 hardens the read-only workflows here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four lint/analysis workflows (
format-check,codeql-build,static-analysis,mcdc) just run pure checks. No GitHub API writes from the workflows, so workflow-levelcontents: readis the right cap.Note:
codeql-buildwrites viasecurity-events: writeon the analyze job, so I left that job-level permissions alone (this PR only adds the workflow-level cap, jobs can still override upward where they need to).Same post-CVE-2025-30066 (
tj-actions/changed-files) hardening pattern. YAML validated locally.