fix(cli): pin curl protocol for nemoclaw update installer fetch - #9976
fix(cli): pin curl protocol for nemoclaw update installer fetch#9976Adityaj0 wants to merge 2 commits into
Conversation
`nemoclaw update` piped `curl -fsSL https://www.nvidia.com/nemoclaw.sh | bash` without pinning the transfer protocol. `curl -fsSL` follows a redirect to a non-HTTPS location, so a downgrade redirect could smuggle plaintext bytes into the pipeline before they reach bash. Add `--proto '=https' --proto-redir '=https'`, the same hardening already used by src/lib/onboard/install-ollama-linux.ts for the same fetch-shape issue (NVIDIA#9698 / NVIDIA#9703). Fixes NVIDIA#9861 Signed-off-by: Aditya Jain <adityaj0714@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe update commands now use a shared curl builder that permits HTTPS requests and HTTPS redirects only. Hermes and LangChain DeepAgents retain their agent assignments. Tests cover the hardened commands and preserve existing version-ordering behavior. ChangesInstaller transport hardening
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The update installer now refuses non-HTTPS redirects before piping fetched bytes to the shell; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite for the commit under review. Recommended E2E: None This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
prekshivyas
left a comment
There was a problem hiding this comment.
Reviewed latest PR commit 7a8e05e. The update command and its generated guidance consistently restrict the installer fetch to HTTPS. The current merge conflict does not reveal a defect in the reviewed patch.
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Summary
nemoclaw updaterunscurl -fsSL https://www.nvidia.com/nemoclaw.sh | bashwithout pinning the transfer protocol, so a redirect to a non-HTTPS location can smuggle unauthenticated bytes into the pipeline before curl's TLS check applies. This adds--proto '=https' --proto-redir '=https'to that fetch, the same hardeningsrc/lib/onboard/install-ollama-linux.tsalready applies for the identical fetch-shape issue (#9698 / #9703), so the transfer now fails closed on a downgrade redirect instead of piping whatever arrives.Related Issue
Fixes #9861
Changes
curlPipeBashCommand()helper insrc/lib/actions/update.tsthat builds the installer fetch with--proto '=https' --proto-redir '=https'.NEMOCLAW_UPDATE_COMMAND(the commandnemoclaw updateactually executes) and the NemoHermes/NemoDeepAgentsmaintainedUpdateCommandguidance strings now build from that shared helper instead of three separate unpinned literals.src/lib/actions/update.test.tsassertions for the new pinned guidance strings and added a regression test assertingNEMOCLAW_UPDATE_COMMANDcarries both proto flags.Type of Change
Quality Gates
DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis not touched by this changeVerification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run src/lib/actions/update.test.ts --project cli: 41/41 passednpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Aditya Jain adityaj0714@gmail.com
Summary by CodeRabbit