chore: pin GitHub Action dependencies to commit SHAs (SDLC-1165) - #3
Open
casper-phantom[bot] wants to merge 2 commits into
Open
chore: pin GitHub Action dependencies to commit SHAs (SDLC-1165)#3casper-phantom[bot] wants to merge 2 commits into
casper-phantom[bot] wants to merge 2 commits into
Conversation
Both workflows resolved actions/checkout and actions/setup-node through mutable v3 tags, so a moved tag or compromised upstream could change CI code without a change in this repository. Pin both to 40-character SHAs. Pinning also fixes the ref in place, so the pins land on v4.4.0 rather than freezing the Node 16 based v3 runtime. - actions/checkout -> 11d5960a326750d5838078e36cf38b85af677262 (v4.4.0) - actions/setup-node -> 49933ea5288caeca8642d1e84afbd3f7d6820020 (v4.4.0) The remaining uses: ./ steps reference the action in this repository and are already immutable at the checked-out commit. Co-authored-by: casper-phantom <[email protected]>
📝 WalkthroughWalkthroughThe GitHub workflows replace floating ChangesGitHub Actions pinning
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/main.yml:
- Line 11: Disable checkout credential persistence by adding
persist-credentials: false to both checkout steps: .github/workflows/main.yml
line 11 and .github/workflows/tests.yml line 13. No Git authentication is
required, so apply the same setting to each actions/checkout invocation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bb958961-18a3-4b74-836d-64cb73bd3070
📒 Files selected for processing (2)
.github/workflows/main.yml.github/workflows/tests.yml
actions/checkout leaves its token in .git/config by default, so any repository-controlled command running after checkout can read it. The test workflow runs yarn and yarn test, which makes that token reachable by dependency lifecycle scripts. No step needs git authentication after checkout: nothing pushes, fetches, or clones, the action reaches GitHub through Octokit with the token passed explicitly as an input, and yarn.lock has no git dependencies. Reported by zizmor as artipacked. Co-authored-by: casper-phantom <[email protected]>
kclark-phantom
approved these changes
Aug 5, 2026
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.
Closes SDLC-1165
Note
Low risk: CI-only change to two workflow files; the pinned SHAs were resolved from the upstream v4.4.0 tags and both workflows run on every pull request, so a bad pin surfaces immediately in this PR's own checks.
Summary
actions/checkoutandactions/setup-nodeinmain.ymlandtests.ymlto 40-character commit SHAs, so a moved tag or compromised upstream can no longer change CI code without a change in this repository.uses: ./steps run the action in this repository and are already immutable at the checked-out commit, so no recursive references are left unpinned.persist-credentials: falseon both checkout steps, so theyarninstall in the test workflow no longer has a token sitting in.git/configfor a dependency lifecycle script to read. No step needs git authentication: nothing pushes, fetches, or clones, the action authenticates through Octokit with thetokeninput, andyarn.lockhas nogit+dependencies.casper-run-id: 019fcd81-039c-7c08-936f-f78e69eb8190
Summary by CodeRabbit