Skip to content

ci: declare workflow-level contents: read on formatting and typos#662

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

ci: declare workflow-level contents: read on formatting and typos#662
arpitjain099 wants to merge 1 commit into
microsoft: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:02
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 security by explicitly setting minimal workflow permissions.

Changes:

  • Add an explicit permissions block to the typos workflow (contents: read)
  • Add an explicit permissions block to the code-formatting-check workflow (contents: read)

Reviewed changes

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

File Description
.github/workflows/typos.yaml Adds explicit read-only contents permissions at workflow level
.github/workflows/code-formatting-check.yaml Adds explicit read-only contents permissions at workflow level

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arpitjain099
Copy link
Copy Markdown
Author

Subset of #657 (already open). Closing this PR, sorry about the duplicate.

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