Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
runs-on: ubuntu-24.04
permissions:
pull-requests: write
contents: write
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Elevated contents: write on pull_request_target workflow

Medium Severity

Adding contents: write to a pull_request_target-triggered workflow grants the GITHUB_TOKEN write access to repository contents for PRs originating from forks. This is a well-documented attack vector — recent incidents (Trivy breach, hackerbot-claw campaign, March 2026) exploited exactly this pattern to push malicious code and exfiltrate secrets. A PR validation workflow typically only needs to read content and comment on PRs, making contents: write broader than expected. Flagged per the review rules' security vulnerability guidelines.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

steps:
- uses: getsentry/github-workflows/validate-pr@4ff40ada546d4a31b852a4279828b989a6193497
with:
Expand Down
Loading