fix(security): pin third-party action and stop persisting checkout credentials - #2161
fix(security): pin third-party action and stop persisting checkout credentials#21610xDEnYO wants to merge 4 commits into
Conversation
…tion Pin slackapi/slack-github-action and actions/checkout in the disabled unreviewedPRReminder workflow to full commit SHAs [aikido:237703240], and set persist-credentials: false on the 17 checkout steps that never push with the runner token [aikido:348463761..348463790]. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WalkthroughThe workflows disable persisted checkout credentials. The disabled reminder workflow pins its checkout and Slack actions to commit SHAs. The Aikido catalog documents an exception for explicitly credentialed checkouts followed by authenticated pushes. ChangesWorkflow hardening
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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/healthCheckForNewNetworkDeployment.yml:
- Line 24: Update the workflow steps that run “git fetch origin main --depth=1”
and “git show origin/main:config/networks.json” to provide GITHUB_TOKEN
credentials for these read-only Git operations, while preserving
persist-credentials: false elsewhere.
🪄 Autofix (Beta)
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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a1b197e1-571a-46be-988e-31499691c2f1
📒 Files selected for processing (17)
.github/workflows/assignRequiresTypesLabel.yml.github/workflows/bunLockfileCheck.yml.github/workflows/deploy-smoke-test.yml.github/workflows/diamondEmergencyPause.yml.github/workflows/disabled/unreviewedPRReminder.yml.github/workflows/forge-unit-tests.yml.github/workflows/healthCheckForNewNetworkDeployment.yml.github/workflows/jsonChecker.yml.github/workflows/markdownlint.yml.github/workflows/networkRpcsChecker.yml.github/workflows/notifyDataTeamOnDeployment.yml.github/workflows/olympixStaticAnalysis.yml.github/workflows/protectAuditLabels.yml.github/workflows/protectSecurityRelevantCode.yml.github/workflows/securityAlertsReview.yml.github/workflows/validateScripts.yml.github/workflows/versionControlAndAuditCheck.yml
…heckouts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 @.agents/references/aikido-false-positive-catalog.md:
- Around line 110-114: Update the `gha_persist_credentials_push_checkout`
catalog entry’s “Matches when” predicate to require all three conditions:
`actions/checkout` uses a dedicated non-ambient credential, a later step in the
same job performs an authenticated `git push` (not merely `git commit`), and the
workflow is triggered by a trusted event. Preserve the existing real-finding
guidance for untrusted triggers, API-only authentication, and checkouts without
a qualifying push.
🪄 Autofix (Beta)
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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 67490dc3-adf5-4833-8ab6-c985c3bdfc44
📒 Files selected for processing (1)
.agents/references/aikido-false-positive-catalog.md
…talog claim Gate-review findings: the detect-changes job in forge-unit-tests.yml and the version-control job in versionControlAndAuditCheck.yml met the same read-only criteria but were missed in the first pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🔒 Gate review (local trial) — residual findingsAuto-fixed in Escalated — needs a maintainer decision:
Verified clean (falsification pass): both SHA pins exactly match their upstream tags; all 19 flagged+added checkouts traced — no job performs an authenticated git operation with the runner token afterwards ( |
Require a dedicated (non-GITHUB_TOKEN) credential, an authenticated git push, and trusted triggers before the pattern matches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Which Linear task belongs to this PR?
Fixes EXSC-730
Why did I implement it this way?
This PR resolves 18 of the open Aikido SAST findings on
main(1× high "3rd party Github Actions should be pinned", 17× low "GitHub Action actions/checkout persist Git credentials"):disabled/unreviewedPRReminder.yml):slackapi/slack-github-action@v2.0.0andactions/checkout@v3are the last two tag-pinned actions in the repo. Both are now pinned to their release commit SHAs per[CONV:ACTIONS-IMMUTABLE](aikido:237703240). The workflow lives underdisabled/but the convention applies to everything that could be re-enabled.persist-credentials: falseon the 17 flaggedactions/checkoutsteps whose jobs never push with the runner token afterwards. Each of these jobs is read-only w.r.t. git after checkout;gh-based label/PR operations in those workflows authenticate viaenv:tokens, not the persisted gitextraheader, so nothing changes behaviorally — the runner token just no longer lingers in.git/configfor later steps/actions to read.Deliberately not changed (ignored in Aikido with reasons instead): the checkouts in
syncLedgerClearSigning.yml(ledger-registry fork),types.yaml(lifi-contract-types), andupdateLouperViem.yml(louper-v3) — those persist scoped credentials on purpose because later stepsgit pushwith them.Known prior-decision conflict, called out proactively: PR #1901 deliberately declined
persist-credentials: falseon thesubmodules: recursivecheckout invalidateScripts.yml(concern: post-job submodule credential cleanup failing the job), and CodeRabbit stored that as a repo Learning. This PR applies the flag there and toforge-unit-tests.yml's matrix checkout anyway, on the strength of newer evidence:syncLedgerClearSigning.ymlhas combinedsubmodules: recursive+persist-credentials: falsein continuously green production runs since May (most recently 2026-07-30). This PR's own CI runs both modified workflows — if the cleanup concern materializes, the two submodule-checkout flags get reverted and those two findings ignored in Aikido citing #1901 instead.Checklist before requesting a review
Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)