Skip to content

ci(semgrep): pin token to contents: read#205

Merged
TheJokr merged 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions
May 18, 2026
Merged

ci(semgrep): pin token to contents: read#205
TheJokr merged 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Pins the default GITHUB_TOKEN to read-only for semgrep.yml. The scheduled Semgrep scan only checks out the repo and posts findings to Cloudflare's internal Semgrep instance via SEMGREP_APP_TOKEN, so the GitHub token only needs read access to the checkout.

Brings the workflow in line with the existing permissions: contents: read block in ci.yml. YAML validated with yaml.safe_load.

The semgrep scheduled scan only checks out the repo and runs
`semgrep ci` against Cloudflare's internal Semgrep endpoint. The
GitHub token doesn't need any write scopes. The sibling `ci.yml`
already declares a top-level permissions block, this matches that
style.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@arpitjain099
Copy link
Copy Markdown
Contributor Author

Hi @TheJokr, gentle ping on this. PR has been open for 4 days without review. I noticed you've been on the recent-merger side of recent merges in this repo. When you have a moment, would you mind giving it a quick look? No urgency. Happy to address any feedback.

@TheJokr
Copy link
Copy Markdown
Collaborator

TheJokr commented May 18, 2026

Thank you!

@TheJokr TheJokr merged commit be65046 into cloudflare:main May 18, 2026
18 checks passed
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