publish: add --provenance (npm provenance via Sigstore keyless signing) - #30522
Open
robobun wants to merge 1 commit into
Open
publish: add --provenance (npm provenance via Sigstore keyless signing)#30522robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Claude / Claude Code Review
completed
Aug 14, 2026 in 14m 44s
Code review found 4 potential issues
Found 5 candidates, confirmed 4. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 4 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/cli/install/bun-publish-provenance.test.ts:100-104 |
expect() inside Bun.serve fetch handler obscures failures |
| 🟡 Nit | src/sigstore/lib.rs:834-842 |
Hand-rolled hex() duplicates bun_core::fmt::hex_lower |
Annotations
Check warning on line 104 in test/cli/install/bun-publish-provenance.test.ts
claude / Claude Code Review
expect() inside Bun.serve fetch handler obscures failures
The two `expect()` calls inside the `Bun.serve` `fetch` handler (audience + Authorization header) violate REVIEW.md's "never throw inside event callbacks": if either fails, Bun.serve swallows the throw into a 500 and the test surfaces `expect(out + err).toContain("Signed provenance statement")` / `expect(err).not.toContain("error:")` instead of the real mismatch. Suggest capturing `url.searchParams.get("audience")` and `req.headers.get("authorization")` into locals (as `fulcioReq`/`rekorReq`/`pu
Check warning on line 842 in src/sigstore/lib.rs
claude / Claude Code Review
Hand-rolled hex() duplicates bun_core::fmt::hex_lower
This hand-rolled `fn hex()` duplicates `bun_core::fmt::hex_lower` (src/bun_core/fmt.rs:2622), which this same PR already uses in publish_command.rs (`bun_fmt::hex_lower(&integrity).to_string()`) for the identical digest→lowercase-hex purpose. `bun_sigstore` already depends on `bun_core`, so the two call sites in `rekor_create_intoto_entry` can be `bun_core::fmt::hex_lower(&sha256(...)).to_string()` and this local helper deleted. Nit — no functional difference; per REVIEW.md "grep for the in-tree
Loading