Skip to content

ci(semgrep): pin contents: read on the daily scan#43

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

ci(semgrep): pin contents: read on the daily scan#43
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 only workflow in this repo. The workflow runs nightly inside the official semgrep/semgrep container and only needs read access to the checkout — semgrep findings are pushed back to Cloudflare's own Semgrep AppSec via SEMGREP_APP_TOKEN, not via the GitHub token.

Matches the top-level permissions: contents: read style already used by other cloudflare repos (e.g. cloudflare/cloudflare-docs, cloudflare/pint). YAML validated with yaml.safe_load.

The Semgrep scheduled scan only checks out the repo and runs
`semgrep ci` inside the official semgrep container, so the default
GITHUB_TOKEN doesn't need any write scopes. This is the only workflow
in this repo and the top-level permissions style matches other
cloudflare/* repos (e.g. cloudflare/cloudflare-docs).

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

@arpitjain099
Copy link
Copy Markdown
Author

Hi @SirCortly, gentle ping on this. PR has been open for 4 days without review. I noticed you've been on the recent-approver 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.

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