Repository navigation
Conversation
Replace the three release-v1-legacy workflows and release.json with one release.yml that runs on release:published, using the same filename as main so one npm trusted publisher per package covers both lines. Drop NPM_TOKEN in favour of id-token: write (OIDC), run on Node 24 with npm@latest (trusted publishing needs npm >= 11.5.1), install with a frozen lockfile and check out the release tag without persisted credentials. Each package publishes in its own step under the v1-x dist-tag, in the old order (utilities, command, config, auth, core), and is skipped when its version is already on npm. Set repository.url to the canonical git+https form that npm checks trusted publishes and provenance against. Override traverse to 0.6.14, as main does, so the pre-commit Snyk scan stops flagging prototype pollution in 0.6.11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
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.
Problem
release-v1-legacy.ymland the two workflows it calls publish the 5 cli packages to npm under thev1-xdist-tag with a long-livedNPM_TOKEN, on every push tov1-legacy.The SE1 publishing policy requires OIDC trusted publishing instead: no token, one
release.ymlthat runs when a release is published, Node 24.The last four runs also end red: the post-publish
gh release createstep fails with HTTP 403. And the packages'repositoryfields are not in the form npm checks at publish time.The pre-commit Snyk scan also blocks every commit on this branch:
traverse@0.6.11has a prototype pollution advisory, whichmainalready overrides.Fix
The three workflows and
.github/config/release.jsonare replaced by onerelease.yml, the same filename as onmain, so one trusted publisher per package covers both lines.v1-legacy, manual runrelease: publishedNPM_TOKENid-token: write, no tokenJS-DevTools/npm-publish@v3steps,tag: v1-x: utilities, command, config, auth, then corenpm publish --access public --tag v1-xunless that version is already on npmclean:all, thenpnpm install --no-frozen-lockfilepnpm install --frozen-lockfilepersist-credentials: false@v4@v7, setup-node@v7, pnpm/action-setup pinned to its v6.1.0 commitpackage.json× 5repository:"contentstack/cli"(auth, command, config), empty url (utilities),https://github.com/contentstack/cli(core)git+https://github.com/contentstack/cli.gitwithdirectory, as onmain: npm checks it against the publishing repojson-to-variables+release.json(unused), corepack steps,gh release create(403).talismanrcrelease.yml: Talisman flags the pinned action SHA (false positive)pnpm-workspace.yaml,pnpm-lock.yamltraverseoverride, 0.6.11 lockedtraverse: 0.6.14override, as onmain; lockfile refreshed withupdate:lockfileDeviations from the policy's sample workflow, all because this is a pnpm monorepo with 5 packages on a maintenance line:
pnpm/action-setupstep: the repo uses pnpm.cache: 'pnpm'instead of'npm': there is nopackage-lock.json.pnpm install --frozen-lockfileinstead ofnpm ci: the same lockfile-strict install, for pnpm.pnpm -r --sort run build: when a release publishes only core, the skipped packages'prepacknever runs, and core's build needs theirlib/.--tag v1-x: this line must never movelatest.@v4(v4 runs on Node 20, which is end-of-life); the third-partypnpm/action-setupis pinned to a commit SHA, as SRE recommended.Verification
Node 22 and Node 24: frozen-lockfile install, build and unit tests pass (277 passing). The publish steps, run with
npm publishstubbed, go in the old order with--tag v1-x, skip the 5 versions already on npm, pick up a bumped one, and a failed step stops the job.