ci(publish): pin the trusted-publishing npm and add a token fallback - #188
Merged
Conversation
The npm publish already runs tokenless: no NPM_TOKEN secret exists on the repository or the tangle-network organization, and 13.0.1 carries an SLSA provenance attestation published by "GitHub Actions". This makes the path deterministic and gives it a break-glass fallback. Pin npm to the exact 11.18.0 that agent-sdk release.yml uses. A floating `npm@11` accepts any future 11.x, and npm 12.0.0 ships a provenance publish that fails with MODULE_NOT_FOUND for sigstore. The OIDC floor is 11.5.1. Set NPM_CONFIG_PROVENANCE so an attestation is requested on both the OIDC path and the fallback path. Read NPM_TOKEN as an explicit fallback. It is unset today, so the OIDC path is unchanged. A token set later takes precedence over OIDC, which is the agent-sdk #284 failure, so the step says that in the log. The publish job still takes no setup-node registry-url, because the empty _authToken line it writes blocks the OIDC exchange. Release semantics do not change: the v* tag trigger and the tag/version lock in the verify job stay as they were.
tangletools
approved these changes
Sep 2, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — a52d4865
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
This approval is provisional. It rests on the audit running. If the audit cannot run — for example the CLI bridge rejects it — this approval is dismissed rather than left standing, so an unrun check never reads as a passing one.
tangletools · auto-approval · reason: drewstone_author · 2026-09-02T03:24:20Z
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 this changes
The npm publish is already tokenless. There is no
NPM_TOKENsecret on this repository or on thetangle-networkorganization, and@tangle-network/agent-knowledge@13.0.1carries an SLSA provenance attestation with_npmUser: "GitHub Actions"— the signature of an OIDC publish. So the trusted publisher for@tangle-network/agent-knowledgeis already registered and working.This makes that path deterministic and adds a break-glass fallback, matching agent-sdk #284 and
agent-dev-container/.github/workflows/publish-sandbox-sdk.yml.npm install -g npm@11.18.0with an exact-version assertion, replacingnpm@11npm@11accepts any future 11.x. npm 12.0.0 ships a provenance publish that fails withMODULE_NOT_FOUNDforsigstore. The OIDC floor is 11.5.1. Same pin agent-sdkrelease.ymlcarries.NPM_CONFIG_PROVENANCE: 'true'on thepublish-npmjob--provenancestays on the command.Configure npm authstep that writes an_authTokenonly whenNPM_TOKENis setThe publish job still takes no
registry-urlonsetup-node. The empty_authTokenline it writes blocks the OIDC exchange, and the new auth step also strips such a line before deciding.permissions: contents: read+id-token: writewere already present onpublish-npmand are unchanged.Release semantics: unchanged
pushon av*tag orworkflow_dispatch.verifyjob still locks tag topackage.jsonversion.Note: this repository has no tip-of-main rule for a release tag. It checks tag-to-version equality only, unlike agent-runtime, which also verifies that the tag sits on the tip of
mainor of itsrelease/<major>.<minor>.xline. Out of scope here; worth adding separately.Checks
actionlint .github/workflows/publish.yml— clean (shellcheck available).bash -non everyrunblock in the file — clean.Before merge
The npm trusted publisher already exists for
@tangle-network/agent-knowledge. Nothing to register.