Skip to content

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

Open
arpitjain099 wants to merge 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions
Open

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

Conversation

@arpitjain099
Copy link
Copy Markdown

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
Author

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

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.

1 participant