Skip to content

fix(cli): restrict the maintained update fetch to HTTPS - #9862

Merged
cv merged 7 commits into
NVIDIA:mainfrom
udsy19:fix/update-installer-https-only
Aug 23, 2026
Merged

fix(cli): restrict the maintained update fetch to HTTPS#9862
cv merged 7 commits into
NVIDIA:mainfrom
udsy19:fix/update-installer-https-only

Conversation

@udsy19

@udsy19 udsy19 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

nemoclaw update previously allowed its HTTPS installer request to follow a redirect to a non-HTTPS location. The maintained fetch now requires HTTPS for the initial request and every redirect before any bytes are piped to bash.

Related Issue

Fixes #9861

Changes

  • Add curl --proto '=https' --proto-redir '=https' to the maintained update fetch.
  • Derive normal, NemoHermes, and NemoDeepAgents update guidance from the same restricted fetch command.
  • Cover the executed command and each displayed variant with focused tests.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior: justification:
  • Tests not applicable: justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded: independent repository review is pending; the nine-category maintainer-agent review found no findings.
  • Non-success, skipped, or missing CI check accepted by maintainer: check name, approval link, and follow-up issue:

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: Not applicable
  • Station profile/scenario: Not applicable
  • Result: Not applicable
  • Supporting evidence: Not applicable

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above: npx vitest run --project cli src/lib/actions/update.test.ts passed 41 tests after synchronizing current main.
  • Applicable broad gate passed: not applicable to this focused CLI command hardening change; required repository checks must still pass.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Udaya Tejas udayatejas2004@gmail.com

Summary by CodeRabbit

  • Security Enhancements

    • Strengthened update and installer downloads by requiring HTTPS connections.
    • Applied consistent secure download protections across maintained update commands.
  • Improvements

    • The --check output now displays the maintained update command.
    • Maintained updates can optionally preserve the configured agent setting.

`nemoclaw update` runs `curl -fsSL <installer> | bash`, and `curl -fsSL`
follows an HTTPS-to-HTTP downgrade redirect, so plaintext-fetched bytes reach
`bash`. Add `--proto '=https' --proto-redir '=https'` so the transfer fails
closed instead, matching the installer fetch in
`src/lib/onboard/install-ollama-linux.ts`.

Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e8009a5a-a16b-4ea6-99d7-c66e44950cba

📥 Commits

Reviewing files that changed from the base of the PR and between b9d7999 and 535bcf3.

📒 Files selected for processing (2)
  • src/lib/actions/update.test.ts
  • src/lib/actions/update.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/actions/update.ts
  • src/lib/actions/update.test.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The update action now shares HTTPS-only curl restrictions across default and branded installer commands. Tests verify command guidance, maintained installer execution, and unchanged leading-zero version handling.

Changes

Update download hardening

Layer / File(s) Summary
Harden maintained installer download
src/lib/actions/update.ts, src/lib/actions/update.test.ts
The update action reuses a shared curl command with HTTPS-only request and redirect options. Branded commands support optional NEMOCLAW_AGENT assignments. Tests verify guidance, execution, and existing version validation behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 535bc

The update command now restricts both initial requests and redirects to HTTPS before piping content to bash; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: restricting the maintained update fetch to HTTPS.
Linked Issues check ✅ Passed The PR addresses issue #9861 by enforcing HTTPS for the initial fetch and redirects, and adds focused tests for execution and displayed commands.
Out of Scope Changes check ✅ Passed The shared fetch fragment, update guidance variants, and focused tests support the HTTPS-hardening objective and are not out of scope.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: PR review advisor skipped: OpenShell inference configuration failed or the advisor credential is unavailable

Model lanes

  • GPT-5.6 Terra (primary): Skipped
  • Nemotron 3 Ultra (second opinion): Skipped

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

cv
cv previously requested changes Aug 21, 2026

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The executed update pipeline correctly restricts the initial transfer and redirects to HTTPS, but the user-visible maintained update commands still bypass that control. updateBranding() constructs weaker normal, Hermes, and Deep Agents Code commands, and printStatus() presents them as the maintained path. A user copying one can follow an HTTPS-to-HTTP redirect and pipe plaintext-fetched bytes into Bash.

Derive all reported commands from the same HTTPS-restricted curl command, adding only the branded NEMOCLAW_AGENT=... assignment. Add normal, Hermes, and Deep Agents Code --check output assertions for both --proto '=https' and --proto-redir '=https' plus the expected agent assignment. This is protocol restriction under normal Web PKI, not certificate or artifact pinning; no new redirect-host allowlist is required in this focused fix.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Review and Security Follow-Up

Addressed the current change request in the latest PR revision. The normal NemoClaw, NemoHermes, and NemoDeepAgents status guidance now derives from the same HTTPS-restricted installer fetch used by the executed update path. Tests cover both protocol flags and the expected agent assignment for every displayed variant.

Security review: PASS. The change strengthens initial-transfer and redirect transport requirements under normal Web PKI. It does not add user-controlled command construction, credential handling, authorization changes, dependencies, persistent state, or concurrency behavior.

Validation:

  • All 41 focused update tests passed.
  • npm run validate:pr passed after generating the fresh worktree build artifacts.
  • Normal pre-commit, commit-message, and pre-push hooks passed.
  • GitHub reports both new revisions as Verified.

The current diff is 67 additions and 27 deletions across two files, so it is not a large increase. Fresh repository checks and repository-routed human re-review remain required before merge.

@apurvvkumaria apurvvkumaria changed the title fix(cli): pin the maintained update fetch to HTTPS fix(cli): restrict the maintained update fetch to HTTPS Aug 21, 2026
@cv
cv dismissed their stale review August 21, 2026 16:25

The blocking finding is addressed at the latest PR commit. CI remains a separate approval gate.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Current Main Synchronization

The contributor branch now includes current main through a signed merge commit. The original contributor history and attribution remain unchanged, and the PR diff remains 67 additions and 27 removals across two files.

Validation after synchronization:

  • All 41 focused update tests passed.
  • Normal commit hooks passed.
  • Plugin and CLI pre-push type checks passed.
  • GitHub reports the synchronization commit as verified.

The push started fresh standard checks. I did not request a workflow rerun. Merge remains deferred until every required check passes and an independent repository review approves the current revision.

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact commit 129e73b. The change matches accepted issue #9861. DCO, GitHub verification, required CI, HTTPS downgrade protection, focused tests, security review, and review threads pass.

@cv
cv enabled auto-merge (squash) August 22, 2026 04:19
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@cv
cv merged commit 2bf5a9b into NVIDIA:main Aug 23, 2026
48 of 59 checks passed
jyaunches added a commit that referenced this pull request Aug 24, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Complete the v0.0.114 documentation for user-visible behavior that the
cumulative post-merge workflow missed. The update covers managed-image
onboarding, managed vLLM GPU selection, messaging provider lifecycle,
paused channel status, Deep Agents tool discovery, Portable lifecycle
timing, HTTPS-only updates, and current Hermes runtime architecture.

## Changes

- Complete the v0.0.114 changelog for merged PRs #9323, #9862, #9913,
#9964, #10021, #10025, #10026, #10031, #10047, and #10052.
- Document managed vLLM GPU selection, resume constraints, and
GPU-specific preflight behavior.
- Document exact endpointless messaging-provider validation and stopped
Hermes Discord provider retention across rebuild.
- Document the paused detailed channel-status JSON contract and Portable
lifecycle timing output.
- Correct the Hermes managed-startup architecture description and Deep
Agents loaded MCP tool discovery behavior.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [x] Doc only (includes code sample changes)

## Quality Gates
- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: This PR updates public
documentation to match already tested source behavior and adds no
runtime code.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: An independent
documentation review checked credential custody, provider reuse,
stopped-channel effects, pairing claim boundaries, GPU selection,
variant routing, and recovery guidance against current source and tests.
The first review's blockers were corrected, and the final review is
recorded in the authoring evidence.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## DGX Station Hardware Evidence
- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: This documentation-only change does not modify
`scripts/prepare-dgx-station-host.sh`.

## Verification
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — documentation-only change; targeted
runtime tests are not applicable
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not run; the PR changes documentation only
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [x] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors and 2 existing Fern warnings hidden by default
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— no new pages

---
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Select managed vLLM GPUs by index or UUID, with selections preserved
when resuming setup.
  - View detailed Portable recovery timing and action results.
  - Discover late-loaded managed tools through progressive tool search.

- **Bug Fixes**
  - Improved sandbox rebuild handling for stopped messaging channels.
- Strengthened provider validation, pairing checks, recovery handoffs,
and duplicate tool detection.
  - Added safer managed-image onboarding and approval-flow handling.
  - Update downloads and redirects now require HTTPS.

- **Documentation**
- Expanded guidance for onboarding, vLLM configuration, messaging
channels, recovery, architecture, and CLI commands.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nemoclaw update pipes an unpinned-protocol curl into bash

5 participants