fix(ci): harden workflows against injection#337
Closed
LuisUrrutia wants to merge 1 commit into
Closed
Conversation
Extract token resolution into reusable auth-token composite
action to eliminate ${{ }} interpolation in run blocks across
8 workflows.
- Add concurrency groups to PR workflows
- Fix cancel-in-progress on production deployment
- Unify harden-runner to v2.13.0 across all workflows
- Add missing version comments for pinned action SHAs
- Fix staging Docker build race condition (needs: publish-rc)
- Remove continue-on-error on CI tests
- Switch update-dependencies to use app token
- Bump pnpm/action-setup, setup-buildx, sbom-action, setup-node
tirumerla
approved these changes
Feb 6, 2026
| with: | ||
| token: ${{ inputs.token }} | ||
| persist-credentials: true | ||
| fetch-depth: ${{ inputs.fetch-depth }} |
Contributor
There was a problem hiding this comment.
You can probably remove whole checkout action here, since we are already fetching full history from checkout in the parent workflow. Lets avoiding duplicating checkouts.
3 tasks
pasevin
added a commit
that referenced
this pull request
May 20, 2026
The prepare composite was doing a second checkout on top of the one each workflow already runs. Removes it (and the now-unused token input) and drops the auth-token resolution from workflows that only needed it to feed prepare. update-dependencies keeps auth-token since it still feeds peter-evans/create-pull-request. Addresses review feedback on #337. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator
|
Superseded by #391, which is a fresh port against current main (the original branch diverged after #373 removed the publish/update-versions workflows). Thanks @LuisUrrutia for the original work — the hardening pattern lives on in #391. |
pasevin
added a commit
that referenced
this pull request
May 20, 2026
* fix(ci): harden workflows against script injection
Extract repeated token-resolution boilerplate into a reusable
auth-token composite action and eliminate ${{ }} interpolation
inside run: blocks across workflows.
- Add .github/actions/auth-token composite for fork-aware token resolution
- Pass NPM_TOKEN and matrix values through env vars in run: blocks
- Add concurrency groups to PR workflows
- Set cancel-in-progress: false on production deployment
- Unify harden-runner to v2.13.0
- Bump pnpm/action-setup to v4.2.0 and setup-node to v4.4.0
- Bump docker/setup-buildx-action to v3.12.0
- Drop continue-on-error on CI test step
- Use app token (instead of GITHUB_TOKEN) in update-dependencies
Supersedes #337, which had diverged from main after #373 removed
publish.yml, update-versions.yml, and the publish-rc job in docker-stg.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(ci): drop redundant checkout from prepare composite
The prepare composite was doing a second checkout on top of the one
each workflow already runs. Removes it (and the now-unused token input)
and drops the auth-token resolution from workflows that only needed it
to feed prepare. update-dependencies keeps auth-token since it still
feeds peter-evans/create-pull-request.
Addresses review feedback on #337.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* revert(ci): leave e2e-export step body unchanged
Matrix values aren't user-controllable, so the CHAIN env-var refactor
is out of scope for the hardening PR. Restore the run line and step
name to match main.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (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.
Summary
auth-tokencomposite action${{ }}inrun:blocksTest plan