feat(ci): SDK publish via Trusted Publishing (OIDC) - #283
Conversation
Sets up the same supply-chain attestation @protolabsai/protopatch +
@protolabsai/release-tools already use. From the next sdk-release
tag onward, npm publish records a sigstore provenance entry tying
the package to this workflow + git ref, surfaced as a "Provenance"
badge on npmjs.com.
Two changes:
permissions.id-token: write enables OIDC for the package signer
npm publish ... --provenance both the real publish + the dry-run
(so the dry-run faithfully matches the
real run's signature wiring)
NODE_AUTH_TOKEN copied into the dry-run step too — setup-node sets
NPM_CONFIG_USERCONFIG to a temp .npmrc that expects the env var to be
present on every npm invocation; dropping it from the dry-run caused
benign warnings but worked. Tightening for consistency.
No version bump needed — this is workflow-only.
Removes NODE_AUTH_TOKEN from both publish + dry-run steps in
sdk-release.yml — npm exchanges the GitHub OIDC token (id-token: write
at job level) for a short-lived publish credential. Same token still
drives --provenance.
release.yml already runs on Trusted Publishing for @protolabsai/proto;
this finishes the migration for @protolabsai/sdk.
One-time UI prerequisite (before next sdk-v* tag push):
npmjs.com/package/@protolabsai/sdk/access →
Trusted Publishers → Add → GitHub Actions
repository: protoLabsAI/protoCLI
workflow filename: sdk-release.yml
environment: (none)
After landing, secrets.NPM_TOKEN may be removed at leisure.
|
Warning Review limit reached
Your plan includes 10 reviews of capacity. Refill in 4 minutes and 40 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
mabry1985
left a comment
There was a problem hiding this comment.
QA Audit — PR #283 | feat(ci): SDK publish via Trusted Publishing (OIDC)
VERDICT: PASS
CI Status
- No CI checks yet (brand new PR) — not a blocker for workflow-only changes
Diff Review
.github/workflows/sdk-release.yml: DropsNODE_AUTH_TOKENfrom both publish + dry-run steps; adds job-levelid-token: writepermission; adds--provenanceflag. Clean, well-commented — aligns with the existing pattern inrelease.yml.
Observations
- LOW / process: The npm UI trusted-publisher configuration (documented in the PR body + inline comment) is a required pre-condition before the next
sdk-v*tag. Merge should be coordinated with that setup. - LOW / clawpatch: Tool returned HTTP 500 on this repo — skipped structural analysis. Diff is straightforward enough that this gap is immaterial.
Checks: 2
Passed: 2 (diff correctness, permissions)
Failed: 0
Gaps: 0
— Quinn, QA Engineer
|
Submitted COMMENT review on #283. |
Findings from the parallel CLI OIDC attempt (release.yml) — read before relying on thisWe just spent a long session trying the identical OIDC trusted-publishing conversion on What we proved is NOT the problem (workflow side is correct)A diagnostic step on the CLI run confirmed, at publish time: Trusted publisher was configured correctly on the npm side (GitHub Actions / protolabsai / protocli / Gotcha this PR still hasThis diff keeps The actual blocker (npm account/org side)The smoking gun: every CI credential failed for the CLI — token-with-disallow-tokens (E404), OIDC (ENEEDAUTH), and token-after-setting-flip (E404) — but an interactive Two npm-side things still unverified that would each explain it:
RecommendationBefore merging #283, dry-run it (the workflow has a Happy to share the full run logs (CLI runs 26386349271 with the OIDC env diagnostic, 26387203428 from main). cc #255. |
|
Superseded by #290. We proved OIDC's workflow side was fully correct for the CLI but npm never engaged the exchange (ENEEDAUTH, no negotiation) — same wall as #255. Rather than carry the same non-functional OIDC shape here, #290 standardizes both CLI + SDK on token auth, which has verifiable/fixable blockers (package 'Publishing access' must allow bypass-2fa tokens + NPM_TOKEN scoped to @protoLabsAI org). See #290 for the npm-side runbook. |
Summary
Roadmap: E5 (split — protoCLI half) from protoWorkstacean `docs/roadmap/2026-06.md`.
The next `sdk-v*` tag push will fail at "Publish to npm" unless the trusted publisher is configured on npm first:
Test plan
🤖 Generated with Claude Code