Repository navigation
ci: harden workflows (least privilege, harden-runner, SHA pins) - #395
Closed
kwburns-kong wants to merge 4 commits into
Closed
kwburns-kong wants to merge 4 commits into
kwburns-kong wants to merge 4 commits into
Conversation
Default permissions to none, scope per job (publish drops unneeded contents:write, actions:read, packages:write), disable persisted checkout credentials except where release pushes, move expression interpolation in run steps to env vars, add timeouts and concurrency, fixed runner image.
|
|
Newer semgrep action (4.0.4) installs semgrep 1.135.0, which fails with 'No module named pkg_resources' on Python 3.12.
Author
|
Superseded by #396 (same changes, branch on origin). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardens the GitHub Actions workflows.
permissions: {}by default, minimal per-job scopes,persist-credentials: false, timeouts, concurrency,${{ }}inrunmoved to env vars.pkg_resourcesmissing).Note for CI:
publishjob permissions reduced tocontents: read+id-token: write(droppedcontents: write,actions: read,packages: write; npm provenance only needs OIDC). Verify on the next tag.releasekeepspersist-credentials: truesince it pushes with the app token; the job token is now read-only.scankeepscontents: write+packages: writefor the SCA SBOM upload.