Repository navigation
Pin CI actions to commit SHAs and make the token read-only - #16
Merged
Merged
Conversation
Before the repo goes public: a moved tag can no longer swap the code CI runs (semgrep github-actions-mutable-action-tag), and the GITHUB_TOKEN only gets contents: read. The SHAs are what v4 points at today (v4.4.0), so CI runs the same code as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Hardening before the repo goes public; fixes the only 2 findings from the pre-publish semgrep scan (
p/javascript,p/typescript,p/github-actions,p/secrets,p/xss).actions/checkoutandactions/setup-nodepinned to full commit SHAs instead of the mutablev4tag (semgrepgithub-actions-mutable-action-tag). The SHAs are exactly whatv4resolves to today (v4.4.0), so CI runs the same code.permissions: contents: readfor the workflow'sGITHUB_TOKEN; CI only checks out and builds.Triggers stay
pushto main andpull_request(nopull_request_target), so PRs from forks get no secrets and a read-only token.Re-scan: semgrep
p/github-actionsreports 0 findings.🤖 Generated with Claude Code