🔒 Harden GitHub Actions: pin actions to SHAs and disable persisted checkout credentials#7033
Open
compwron wants to merge 1 commit into
Open
🔒 Harden GitHub Actions: pin actions to SHAs and disable persisted checkout credentials#7033compwron wants to merge 1 commit into
compwron wants to merge 1 commit into
Conversation
…eckout credentials Hardens the CI/automation workflow supply chain by: - Pinning every third-party action to an immutable commit SHA (with a trailing version comment for readability) across all workflows in .github/workflows/ - Setting `persist-credentials: false` on all actions/checkout steps so later run steps and third-party actions do not inherit the repo token No runtime behavior change is expected beyond the hardening above. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What changed, and why?
Hardens the workflow supply chain across
.github/workflows/by:persist-credentials: falseon allactions/checkoutsteps, so later run steps and third-party actions in the same job don't inherit the repo token.This follows the GitHub-recommended supply-chain hardening guidance (pin actions by full-length commit SHA) and applies it repo-wide.
Pinned SHAs:
actions/checkout@9f698171ed81b15d1823a05fc7211befd50c8ae0(# v6.0.3)actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e(# v6)actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c(# v8)actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a(# v7)actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553(# v9)actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9(# v5)actions/stale@5bef64f19d7facfb25b37b414482c7164d639639(# v9)github/codeql-action@f52b05f4acaaa234e44466e66d29050e135ea9ef(# v4.36.0) — init/autobuild/analyzeruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74(# v1)qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899(# v2.2.0)test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5(# v2)ibiqlik/action-yamllint@ae1abb2821b567e96742aa776f7b62c9b6a26bc8(# v3)technote-space/toc-generator@ce21845a0177fd1288cada589dd4efd2e46a27ca(# v4)dessant/issue-states@a1bd84606ef48dca24ce24140e068516a74b3e0b(# v3)andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90(# 1.0.4)Firelemons/on-deploy@852d81d797e1e230da7617a3e3784971fda7a047(# v2.2.1)bjthompson805/move-issues@ced196f41b6124cc51ea64bdd43587527a457624(# v1)rubyforgood/add-label-to-cards@62e1346cb6a1837c82e1c2919562d54dd2893ddf(# v3.3)rubyforgood/remove-label-from-cards@186f170a25e437b6b172a4f274d2492dd14bfb4e(# 2.0)rubyforgood/unassign-issues@f3d8461c2a3ea67cc4a015ca50737a4f865460d7(# v1.3)How is this tested?
Validated that all
.github/workflows/*.ymlfiles still parse as valid YAML and that everyuses:reference is pinned to a 40-char commit SHA. No runtime behavior change is expected beyond the hardening described above — each SHA corresponds to the exact tag already in use.What are the risks / what can go wrong?
Low risk. These jobs only need the checked-out files and do not rely on a persisted checkout token for subsequent steps. Pins point to the same released versions previously referenced by tag.
Screenshots please for UI-changing code 🎨
N/A — workflow-only change.
🤖 Generated with Claude Code