chore(ci): harden publish workflow#30
Open
hmchouaib wants to merge 1 commit into
Open
Conversation
hmchouaib
force-pushed
the
chore/harden-publish-pipeline
branch
from
May 18, 2026 12:06
547f9aa to
dd189ed
Compare
…N, pin actions - Add cache input to setup-node action (default: true) - Disable cache in publish.yaml and release.yaml to prevent cache poisoning - Remove redundant NPM_TOKEN — OIDC confirmed sufficient - Pin amannn/action-semantic-pull-request to immutable SHA - Add CODEOWNERS to restrict .github/ changes to DX team Jira: https://storyblok.atlassian.net/browse/INFRA-911
hmchouaib
force-pushed
the
chore/harden-publish-pipeline
branch
from
May 18, 2026 12:09
dd189ed to
e94e095
Compare
hmchouaib
marked this pull request as ready for review
May 18, 2026 12:30
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
cacheinput to.github/actions/setup-nodeand calling it withcache: "false"frompublish.yamlandrelease.yaml. This skips the shared pnpm/Nx cache composite and disablesactions/setup-nodepackage-manager caching while still runningpnpm install --frozen-lockfile.NPM_TOKENauthentication step from bothpublish.yamland
release.yaml— OIDC trusted publishing (id-token: write) is already configured and confirmed sufficient. The existing NPM_TOKEN in the org is expired (Mar 31, 2026) and has not been the active auth mechanism.persist-credentials: falseto checkout steps that do not push.amannn/action-semantic-pull-requestincommitlint.yamlto an immutable commit SHA instead of the mutablev5.5.3tag..github/workflows/and.github/actions/using@storyblok/dx.persist-credentials: falseand explicitcontents: readpermission toci.yamlto prevent token leakage via git config.Why
The publish and release jobs receive
id-token: writefor npm trustedpublishing, so they should not restore or save dependency/Nx caches that
could be influenced by other workflows. Strictly disabling caches in publish
is simpler and safer than maintaining a separate cache namespace for the
release path.
This mirrors the hardening applied to monoblok in #606 and was identified during a post-TanStack supply chain attack audit.
Test plan
.github/workflows/*and.github/actions/*.git diff --check origin/main..HEAD.publish.yamlkeepscontents: readandid-token: write,uses
persist-credentials: false, calls setup-node withcache: "false",and has no
NPM_TOKENauthentication step.release.yamlapplies the same on bothdry-runandreleasejobs, with no
Configure npm authenticationstep.ci.yamlstill uses the default cached setup path.Jira: https://storyblok.atlassian.net/browse/INFRA-911