fix(ci): bound the release evidence subprocess capture - #1748
Conversation
Node caps a captured subprocess at 1 MiB and raises ENOBUFS past it. A `cosign verify-attestation` envelope carries the whole SPDX SBOM base64-encoded, so the webapp's exceeded the cap and failed the v0.75.0 release during signature verification — after the images were tagged. The bound goes in the shared helper rather than at the call site: every capture in this file reads an SBOM, an attestation or an image index, and none of them has a useful size limit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approved automatically: @FelixTJDietrich is listed in the REVIEW_POLICY_MAINTAINERS repository variable, which the repository treats as satisfying the review requirement. See the review policy in docs/contributor/ci-cd.mdx.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe release evidence verifier now sets a 256 MiB ChangesRelease evidence capture
Merge Risk: ⚪ Minimal · up to The change bounds release-evidence subprocess capture to prevent oversized registry evidence from failing verification, with no actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📚 Documentation Preview
|
🧩 Storybook Preview
|
Problem
The v0.75.0 release failed during
Verify evidence from registry subjects:readJsonFromCommandcaptures throughspawnSyncwithstdio: "pipe"and Node's default 1 MiBmaxBuffer. Acosign verify-attestationenvelope carries the whole SPDX SBOM base64-encoded, so the webapp's exceeds that cap.This fired after the images were already tagged, in one of the two checks that are structurally release-only (the attestation does not exist until
cosign attestruns during the release), so no preflight could have caught it.Fix
maxBufferset once in the sharedcommand()helper rather than at the call site — every capture in this file reads an SBOM, an attestation or an image index, and none has a useful size limit. A test pins both the wiring and the floor.The wider class
This is the second time the 1 MiB default has bitten: #1744 had to project
gh apirelease listings to four fields because full bodies overflow it too. Several other scripts capture without a bound —check-package-manager.tsreadsgit ls-files -zover the whole tree,check-affected.tsreads diff name lists. None is release-critical, so they are not in this PR; they are filed separately so this one can land while a release is waiting on it.Verification
node --test scripts/verify-release-evidence.test.ts→ 8/8.pnpm run formatthenpnpm run checkboth pass.No changeset:
verify-changesetsscopesSHIPPED_PATHStoserver,webapp,docker; this touchesscripts/only.Summary by CodeRabbit
Bug Fixes
Tests