Skip to content

ci: declare workflow-level contents: read on python and yaml validation#1193

Closed
arpitjain099 wants to merge 1 commit into
Azure:mainfrom
arpitjain099:chore/declare-workflow-perms
Closed

ci: declare workflow-level contents: read on python and yaml validation#1193
arpitjain099 wants to merge 1 commit into
Azure:mainfrom
arpitjain099:chore/declare-workflow-perms

Conversation

@arpitjain099
Copy link
Copy Markdown

Pins the default GITHUB_TOKEN to contents: read at the workflow level. The workflow runs checks only; no GitHub API writes.

Same post-CVE-2025-30066 (tj-actions/changed-files) supply-chain hardening pattern. YAML validated locally with yaml.safe_load.

Workflow runs checks only; no GitHub API writes from the workflow itself. Post-CVE-2025-30066 hardening pattern. yaml.safe_load validated.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Copilot AI review requested due to automatic review settings May 25, 2026 23:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR tightens GitHub Actions workflow permissions by explicitly setting read-only repository contents access.

Changes:

  • Added permissions: contents: read to the YAML validation workflow.
  • Added permissions: contents: read to the Python validation workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/yaml-validation.yml Explicitly limits workflow token to read-only contents access.
.github/workflows/python-validation.yml Explicitly limits workflow token to read-only contents access.

@arpitjain099
Copy link
Copy Markdown
Author

Dedup catch on my end: superseded by #1176. Closing, apologies for the noise.

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