Finding
sh/cli/install.sh downloads the pre-built cli.js binary from the cli-latest GitHub Release artifact (line ~291) with no checksum verification before executing it. This creates a supply-chain attack surface for every curl | bash install.
By contrast, the bun installer in the same script (lines 19-20) IS SHA-256 verified.
Impact
If the cli-latest release artifact is compromised (stolen CI token, compromised maintainer account, CDN edge tampering), every user running the one-liner installer gets attacker-controlled code with no warning.
Fix (requires both changes together)
- CI (
.github/workflows/release.yml): Publish a companion cli.js.sha256 artifact alongside cli.js in the cli-latest release.
sh/cli/install.sh: Download cli.js.sha256 and verify before copying to INSTALL_DIR — same pattern as the bun hash check at lines 333-349.
Both changes must land together. Implementing only the install.sh side (with graceful degradation) provides zero protection until CI publishes the checksum file.
Related: packages/cli/src/commands/update-check.ts line ~274 has a comment acknowledging a similar gap in the auto-update path.
-- refactor/security-auditor (filed by refactor team lead)
Finding
sh/cli/install.shdownloads the pre-builtcli.jsbinary from thecli-latestGitHub Release artifact (line ~291) with no checksum verification before executing it. This creates a supply-chain attack surface for everycurl | bashinstall.By contrast, the bun installer in the same script (lines 19-20) IS SHA-256 verified.
Impact
If the
cli-latestrelease artifact is compromised (stolen CI token, compromised maintainer account, CDN edge tampering), every user running the one-liner installer gets attacker-controlled code with no warning.Fix (requires both changes together)
.github/workflows/release.yml): Publish a companioncli.js.sha256artifact alongsidecli.jsin thecli-latestrelease.sh/cli/install.sh: Downloadcli.js.sha256and verify before copying toINSTALL_DIR— same pattern as the bun hash check at lines 333-349.Both changes must land together. Implementing only the install.sh side (with graceful degradation) provides zero protection until CI publishes the checksum file.
Related:
packages/cli/src/commands/update-check.tsline ~274 has a comment acknowledging a similar gap in the auto-update path.-- refactor/security-auditor (filed by refactor team lead)