ci: drop persisted Git credentials in actions/checkout (Aikido) - #622
Closed
dorothyyzh wants to merge 1 commit into
Closed
ci: drop persisted Git credentials in actions/checkout (Aikido)#622dorothyyzh wants to merge 1 commit into
dorothyyzh wants to merge 1 commit into
Conversation
Aikido flags actions/checkout leaving the job token in .git/config (http.extraheader), where any later step — including third-party actions — can read it. Added persist-credentials: false to all four workflows. go.yml, vuetifyjs-test.yml and doc-build.yml run no git operations after checkout (doc-build's peaceiris/actions-gh-pages authenticates via its own github_token input), so this is a no-op for them. vuetifyjs-build.yml does push the rebuilt dist bundle, so its push is now authenticated explicitly through the token URL instead of relying on the credential checkout used to leave behind. While rewriting that line, moved github.head_ref into the environment as well — interpolating it directly into the shell is a script-injection vector via crafted branch names.
dorothyyzh
force-pushed
the
fix/aikido-persist-credentials-2026-07-27
branch
from
July 27, 2026 02:33
96cb979 to
4675cbf
Compare
Contributor
Author
|
Superseded by #624 — same commits replayed on a fresh branch off the current default branch ( |
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.
Summary
Aikido flags
actions/checkoutfor leaving the job token in.git/config(http.extraheader) after checkout, where any later step — including third-party actions — can read it. This repo accounts for 4 of the 10 sub-issues in that group.Added
persist-credentials: falseto all four workflows.No-op for three of them — they run no git operations after checkout:
go.yml—go build/go testvuetifyjs-test.yml—pnpm install/build/test:unitdoc-build.yml—peaceiris/actions-gh-pagesauthenticates via its owngithub_tokeninput, not the ambient credentialvuetifyjs-build.ymlneeded a real change. It pushes the rebuiltdistbundle back to the PR branch, so the push is now authenticated explicitly through a token URL instead of relying on the credential checkout used to leave behind:While rewriting that line I also moved
github.head_refinto the environment. Interpolating${{ github.head_ref }}straight into arun:block is a script-injection vector — a branch name containing shell metacharacters executes in the job. Passing it viaenv:makes it inert data.Aikido Issues Resolved
Group 33607621 — 4 sub-issues in this repo:
Verification
dist/is untouched, so no bundle rebuild is needed herevuetifyjs-buildpush path is only exercised when the builtdistactually differs; reviewers wanting to confirm it should watch the first PR after merge that changesui/vuetifyx/vuetifyxjssourcesNote
Branch is
fix/aikido-persist-credentials-2026-07-27rather than the usual dated name —fix/aikido-dependency-vulnerabilities-2026-07-27is already taken by #621.