fix(package): add repository field so npm provenance validation passes#16
Merged
Conversation
The 1.1.0 release with provenance on (NPM_CONFIG_PROVENANCE=true) failed in https://github.com/ylabonte/github-actions-updater/actions/runs/25933850004 with HTTP 422 from registry.npmjs.org: Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "", expected to match "https://github.com/ylabonte/github-actions-updater" from provenance OIDC trusted publishing itself worked end-to-end on the failed run — the provenance statement was signed and pushed to the sigstore transparency log (logIndex 1549566161). npm then rejected the publish at the cross-check between package.json#repository.url and the GitHub URL it had just attested to. The field was missing entirely, so the comparison was trivially `"" != "https://github.com/ylabonte/github-actions-updater"`. 1.0.0 slipped past this because that publish didn't carry provenance (NPM_TOKEN bootstrap, no NPM_CONFIG_PROVENANCE). 1.1.0 is the first run with provenance on, so this is the first time the cross-check has actually run. No changeset: publish-metadata fix, not a user-visible behavior change.
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
The 1.1.0 release retried after PR #15 merged (run 25933850004) and failed with HTTP 422 from npm:
OIDC trusted publishing itself worked end-to-end on that run —
No NPM_TOKEN found, but OIDC is available - using npm trusted publishing, and the provenance statement was even signed and pushed to the sigstore transparency log (logIndex 1549566161). npm then rejected the publish at the cross-check betweenpackage.json#repository.urland the GitHub URL it had just attested to. The field was missing entirely, so the comparison was"" != "https://github.com/ylabonte/github-actions-updater"→ 422.The 1.0.0 publish slipped past this because that one didn't carry provenance (it was the
NPM_TOKENbootstrap path, noNPM_CONFIG_PROVENANCE=true). 1.1.0 is the first run with provenance on, so this is the first time the cross-check has actually run.Fix
Add the canonical
repositoryobject topackage.json:That's the only repo-side change required.
release.ymlis already correctly configured for OIDC trusted publishing with provenance.Note on PR #15
The previous PR removed
registry-url:fromsetup-nodeon the theory it was breaking OIDC. The log shows OIDC was already working fine on that path (the provenance bundle minted and signed end-to-end), so the change was a no-op for THIS failure. It's still aligned with npm's docs as future hygiene, so leaving it merged. Apologies for shipping it confidently as THE fix without log access to confirm.No changeset: publish-metadata fix, not a user-visible behavior change.
Test plan
pnpm format:check,pnpm lint,pnpm typecheck,pnpm test(231 tests) — all green.release.yml.changesets/actionfinds no remaining changesets, sees1.1.0is still unpublished on npm, runspnpm releaseagain. Withrepository.urlnow present and matching the attested URL, the provenance cross-check passes;github-actions-updater@1.1.0lands on npm with provenance; thev1floating tag force-moves.Generated by Claude Code