Skip to content

Restrict PR validation workflow permissions - #162

Merged
Tomer Rosenthal (torosent) merged 2 commits into
mainfrom
copilot/fix-code-scanning-alerts
Sep 28, 2026
Merged

Tomer Rosenthal (torosent) merged 2 commits into
mainfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Sep 28, 2026 •

Copy link
Copy Markdown

The PR validation workflow relied on implicit GitHub token permissions, triggering code scanning alert #13.

  • Permissions
    • Declare least-privilege, workflow-level access:
permissions:
  contents: read
  • Retain the repository read access required by checkout while preventing broader implicit permissions.

Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alerts flagged in repository Restrict PR validation workflow permissions Sep 28, 2026
@torosent
Tomer Rosenthal (torosent) marked this pull request as ready for review September 28, 2026 17:46
Copilot AI lite review requested due to automatic review settings September 28, 2026 17:46
torosent

This comment was marked as duplicate.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Updates the PR validation workflow to use least-privilege GitHub token permissions.

Changes:

  • Adds workflow-level contents: read permission.
  • Preserves repository checkout access while limiting broader permissions.
File Description
.github/​workflows/​pr-validation.yml Restricts workflow token permissions to read-only repository contents.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@torosent
Tomer Rosenthal (torosent) merged commit 8e6bdd1 into main Sep 28, 2026
8 checks passed
@torosent
Tomer Rosenthal (torosent) deleted the copilot/fix-code-scanning-alerts branch September 28, 2026 18:01
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.

4 participants