Skip to content

fix(images): remove vulnerable node-tar copies#7332

Merged
cv merged 21 commits into
mainfrom
codex/fix-node-tar-images
Jul 22, 2026
Merged

fix(images): remove vulnerable node-tar copies#7332
cv merged 21 commits into
mainfrom
codex/fix-node-tar-images

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remediate CVE-2026-59873 / GHSA-23hp-3jrh-7fpw across the completed Node-based sandbox images targeted for v0.0.91. Before this change, NemoClaw's plugin lockfile and npm's private bundles shipped affected node-tar releases; after it, every discovered physical installation must resolve to tar 7.5.19 or newer before an image can be published.

Changes

  • Require and lock NemoClaw's direct dependency to tar@7.5.20.
  • Replace affected npm-private node-tar trees in the pinned Node 22 and Node 24 image paths with the registry- and SRI-verified tar@7.5.20 archive.
  • Patch both base and final OpenClaw, Hermes, and Deep Agents Code images so a stale published base cannot reintroduce the affected package.
  • Scan completed filesystems across local, global, npm-private, and symlinked installations; fail builds for invalid metadata, an empty inventory, or any version below 7.5.19.
  • Scan completed OpenClaw and Hermes CI images in isolated containers and retain image-ID-keyed JSON inventories for 14 days.
  • Add source-fingerprint inputs and regression coverage for patching, physical-copy enumeration, Dockerfile ordering, workflow hardening, and evidence retention.

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:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — this changes image dependency remediation and publication evidence without changing a user-facing contract; the required documentation review found no canonical page to update.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: maintainer security review pending on this PR.
  • 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 check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 51 focused tests pass across source identity, npm bundle patching, image scanning, Dockerfile contracts, and workflow boundaries; plugin type-checking also passes.
  • Applicable broad gate passed — required CI pending. A completed OpenClaw production image built and passed both embedded and isolated scans; Node 22/npm 10 and Node 24/npm 11 patch/install/npx smoke tests 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: Prekshi Vyas prekshiv@nvidia.com
Signed-off-by: Senthil Ravichandran senthilr@nvidia.com

Summary by CodeRabbit

  • Security Improvements
    • Updated bundled npm tar to a safer release and added automated in-image remediation.
    • Added build-time and production sandbox node-tar scans that generate read-only inventory evidence.
  • Reliability
    • Extended hardened node-tar scanning/inventory generation to production and arm64 variants.
    • Added tighter sandbox workflow contract validation to enforce required scan + evidence upload ordering.
  • Bug Fixes
    • Improved remediation safety with idempotency and rollback on failure.
  • Chores
    • Updated workflow triggers and sandbox build-context staging to include the new validation assets.
  • Tests
    • Added unit, contract, and end-to-end coverage for remediation/scanning and workflow boundaries.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@prekshivyas prekshivyas added area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression security labels Jul 21, 2026
@prekshivyas prekshivyas self-assigned this Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds npm-bundled node-tar remediation, filesystem scanning, Docker image build gates, read-only inventories, workflow artifact retention, and validation across OpenClaw, Hermes, and LangChain images.

Changes

Node-tar security controls

Layer / File(s) Summary
Bundled npm tar remediation
nemoclaw/package.json, scripts/patch-bundled-npm-tar.mts, test/patch-bundled-npm-tar.test.ts
Updates tar to 7.5.20 and adds validated, rollback-capable remediation with registry retrieval and failure-path tests.
Completed-image node-tar scanning
scripts/checks/node-tar-image-scan.mts, test/node-tar-image-scan.test.ts
Adds versioned discovery, physical-path grouping, status reporting, CLI errors, and filesystem edge-case coverage.
Dockerfile remediation and gates
Dockerfile*, agents/hermes/Dockerfile*, agents/langchain-deepagents-code/Dockerfile*, test/node-tar-dockerfile-contract.test.ts
Runs remediation during image builds, scans completed filesystems, writes read-only inventories, and validates final-stage ordering.
Workflow scanning and evidence validation
.github/workflows/*.yaml, tools/e2e/sandbox-images-workflow-boundary.mts, test/e2e/support/sandbox-images-workflow-boundary.test.ts
Scans production images, uploads inventories, tracks helper-script rebuild inputs, and validates isolation, retention, metadata, and step ordering.
Build-context and contract wiring
src/lib/sandbox/build-context.ts, src/lib/onboard/dockerfile-remote-dashboard-bind-contract.ts, test/sandbox-build-context.test.ts
Stages the helper scripts and permits the scan script in Dockerfile contract validation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DockerBuild
  participant NpmTarPatcher
  participant NodeTarImageScan
  participant GitHubActions
  participant ArtifactStore

  DockerBuild->>NpmTarPatcher: Patch bundled npm tar
  DockerBuild->>NodeTarImageScan: Scan completed filesystem
  NodeTarImageScan-->>DockerBuild: Write read-only inventory
  GitHubActions->>NodeTarImageScan: Scan production image
  NodeTarImageScan-->>GitHubActions: Emit JSON inventory
  GitHubActions->>ArtifactStore: Upload retained inventory
Loading

Possibly related issues

Possibly related PRs

Suggested labels: area: packaging, platform: container, dependencies

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: remediating vulnerable node-tar copies in images.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-node-tar-images

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

@github-code-quality

github-code-quality Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit bc9f804 in the codex/fix-node-tar-i... branch remains at 96%, unchanged from commit 7be3ef7 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit bc9f804 in the codex/fix-node-tar-i... branch remains at 80%, unchanged from commit 7be3ef7 in the main branch.

Show a code coverage summary of the most impacted files.
File main 7be3ef7 codex/fix-node-tar-i... bc9f804 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/platform.ts 89% 84% -5%
src/lib/state/m...-acquisition.ts 87% 84% -3%
src/lib/sandbox...rce-identity.ts 88% 87% -1%
src/lib/sandbox...uild-context.ts 41% 41% 0%
src/lib/onboard...ind-contract.ts 98% 98% 0%
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/securit...ntial-filter.ts 93% 93% 0%
src/lib/state/m...ock-identity.ts 95% 95% 0%
src/lib/state/m...lock-storage.ts 97% 97% 0%

Updated July 22, 2026 02:25 UTC

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 2 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 2 more warnings, the same number of suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, full-e2e, hermes-e2e, security-posture, onboard-repair, onboard-resume

2 optional E2E recommendations
  • rebuild-openclaw
  • rebuild-hermes

Workflow run details

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

Comment thread scripts/checks/node-tar-image-scan.mts Fixed
Comment thread scripts/patch-bundled-npm-tar.mts Fixed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
scripts/patch-bundled-npm-tar.mts (1)

188-230: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add a timeout to spawnSync calls.

run() (used for npm --version, npx --version, and tar --extract) has no timeout. A hang in any of these would block the Docker build layer indefinitely rather than failing fast.

🛡️ Proposed fix
 function run(command: string, args: readonly string[]): void {
-  const result = spawnSync(command, args, { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] });
+  const result = spawnSync(command, args, {
+    encoding: "utf8",
+    stdio: ["ignore", "pipe", "pipe"],
+    timeout: 60_000,
+  });
   if (result.error) throw result.error;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/patch-bundled-npm-tar.mts` around lines 188 - 230, Update the run
function’s spawnSync invocation to include a finite timeout option, ensuring
npm, npx, and tar commands fail promptly if they hang while preserving the
existing error and nonzero-status handling.
scripts/checks/node-tar-image-scan.mts (1)

10-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated minimum-safe-tar-version constant across two files.

MINIMUM_SAFE_NODE_TAR_VERSION and MINIMUM_SAFE_TAR_VERSION both hardcode "7.5.19" independently. A future version-floor bump risks updating only one, letting the patch script and the scan gate silently disagree on what counts as "fixed."

  • scripts/checks/node-tar-image-scan.mts#L10-L10: import MINIMUM_SAFE_TAR_VERSION from ../patch-bundled-npm-tar.mts (or a shared constants module) instead of re-declaring it.
  • scripts/patch-bundled-npm-tar.mts#L24-L28: keep this as the single canonical export that the scan script consumes.

As per path instructions for scripts/checks/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift."

♻️ Proposed fix
--- a/scripts/checks/node-tar-image-scan.mts
+++ b/scripts/checks/node-tar-image-scan.mts
@@
+import { MINIMUM_SAFE_TAR_VERSION } from "../patch-bundled-npm-tar.mts";
+
-export const MINIMUM_SAFE_NODE_TAR_VERSION = "7.5.19";
+export const MINIMUM_SAFE_NODE_TAR_VERSION = MINIMUM_SAFE_TAR_VERSION;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/checks/node-tar-image-scan.mts` at line 10, The scan script’s minimum
tar version duplicates the canonical value and can drift. In
scripts/checks/node-tar-image-scan.mts:10, remove the local
MINIMUM_SAFE_NODE_TAR_VERSION declaration and import/reuse
MINIMUM_SAFE_TAR_VERSION from scripts/patch-bundled-npm-tar.mts; retain
scripts/patch-bundled-npm-tar.mts:24-28 as the single canonical export,
requiring no direct change there.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/node-tar-dockerfile-contract.test.ts`:
- Around line 50-53: Update the npm consumer detection in the contract test to
recognize npm ci/install commands on multiline continued RUN instructions, then
make the ordering assertion unconditional so the test fails when no valid
consumer is found or when it precedes patchRun. Preserve the existing patchRun
comparison while removing the conditional bypass around the assertion.

---

Nitpick comments:
In `@scripts/checks/node-tar-image-scan.mts`:
- Line 10: The scan script’s minimum tar version duplicates the canonical value
and can drift. In scripts/checks/node-tar-image-scan.mts:10, remove the local
MINIMUM_SAFE_NODE_TAR_VERSION declaration and import/reuse
MINIMUM_SAFE_TAR_VERSION from scripts/patch-bundled-npm-tar.mts; retain
scripts/patch-bundled-npm-tar.mts:24-28 as the single canonical export,
requiring no direct change there.

In `@scripts/patch-bundled-npm-tar.mts`:
- Around line 188-230: Update the run function’s spawnSync invocation to include
a finite timeout option, ensuring npm, npx, and tar commands fail promptly if
they hang while preserving the existing error and nonzero-status handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 64892c3b-c545-4adb-8e3c-eee15a14e55d

📥 Commits

Reviewing files that changed from the base of the PR and between acfa261 and e7aabcc.

⛔ Files ignored due to path filters (1)
  • nemoclaw/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (18)
  • .github/workflows/base-image.yaml
  • .github/workflows/sandbox-images-and-e2e.yaml
  • Dockerfile
  • Dockerfile.base
  • agents/hermes/Dockerfile
  • agents/hermes/Dockerfile.base
  • agents/langchain-deepagents-code/Dockerfile
  • agents/langchain-deepagents-code/Dockerfile.base
  • nemoclaw/package.json
  • scripts/checks/node-tar-image-scan.mts
  • scripts/patch-bundled-npm-tar.mts
  • src/lib/sandbox-base-image/source-identity.test.ts
  • src/lib/sandbox-base-image/source-identity.ts
  • test/e2e/support/sandbox-images-workflow-boundary.test.ts
  • test/node-tar-dockerfile-contract.test.ts
  • test/node-tar-image-scan.test.ts
  • test/patch-bundled-npm-tar.test.ts
  • tools/e2e/sandbox-images-workflow-boundary.mts

Comment thread test/node-tar-dockerfile-contract.test.ts Outdated
@prekshivyas prekshivyas added the v0.0.91 Release target label Jul 21, 2026
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/node-tar-dockerfile-contract.test.ts (1)

19-22: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Fail closed when the completed-stage marker is missing.

Returning the full Dockerfile when FROM ${BASE_IMAGE} is absent silently disables stage isolation. A patch and scan in an earlier stage can satisfy the contract while the final stage remains unremediated. Throw or assert on a missing marker instead of returning source.

Proposed fix
-  if (baseImageIndex < 0) return source;
+  if (baseImageIndex < 0) {
+    throw new Error(`Missing completed-stage marker: ${baseImageMarker}`);
+  }

As per path instructions, tests must provide behavioral confidence rather than bypassing their claim.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/node-tar-dockerfile-contract.test.ts` around lines 19 - 22, Update
completedStage so it fails closed when the final "FROM ${BASE_IMAGE}" marker is
absent: throw or assert instead of returning the full source. Preserve slicing
from the last marker when present, ensuring the contract test cannot silently
scan an earlier stage.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@test/node-tar-dockerfile-contract.test.ts`:
- Around line 19-22: Update completedStage so it fails closed when the final
"FROM ${BASE_IMAGE}" marker is absent: throw or assert instead of returning the
full source. Preserve slicing from the last marker when present, ensuring the
contract test cannot silently scan an earlier stage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 15e5710e-60aa-488c-a612-7e06b1a40b45

📥 Commits

Reviewing files that changed from the base of the PR and between de198e3 and 1b13eb0.

📒 Files selected for processing (3)
  • scripts/checks/node-tar-image-scan.mts
  • scripts/patch-bundled-npm-tar.mts
  • test/node-tar-dockerfile-contract.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/checks/node-tar-image-scan.mts
  • scripts/patch-bundled-npm-tar.mts

prekshivyas and others added 3 commits July 21, 2026 11:16
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

@apurvvkumaria apurvvkumaria 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.

Security review at 7e6714d: approved; no merge-blocking security finding.

I verified the complete diff and all six production/base Dockerfiles. NemoClaw pins its direct dependency to tar@7.5.20; npm 10 and npm 11 private copies are replaced from the committed registry URL and SHA-512 value before npm consumes package input; and every final filesystem is scanned after package mutations. The exact-head OpenClaw amd64/arm64 builds completed the embedded gate, with the amd64 log showing npm@10.9.7 bundled tar moving to 7.5.20. An independent exact pinned Node 24/npm 11.13 smoke changed tar 7.5.13 to 7.5.20 and kept npm, npx, pack, and install usable. I also ran 60 focused tests plus plugin type checking successfully. Existing CodeQL and CodeRabbit threads are resolved/outdated.

Fix forward; not merge gates for this CVE patch:

  1. P2 — alias-aware discovery: scripts/checks/node-tar-image-scan.mts searches only */node_modules/tar/package.json. npm aliases can install a package whose manifest name is tar under node_modules/, which the scan would omit if another fixed tar copy makes the inventory non-empty. No current lock uses npm:tar, so this is not a current-image bypass. Enumerate package manifests by identity and add an alias regression test.
  2. P2 — pre-merge evidence lane: exact-head self-hosted run 29858018474 executed the embedded image gate but did not execute the newly added isolated scan/upload steps, so it produced no node-tar inventory artifact. Those workflow changes need a branch workflow_dispatch run or wiring into the self-hosted PR lane to prove the retained-evidence path before merge. This does not invalidate remediation because the Docker build itself failed closed on the same completed filesystem.
  3. P2 — verify bytes before parsing during bootstrap: the patch path invokes npm pack through the currently affected npm/tar and compares the reported SRI afterward. A malicious registry response could therefore exercise the build-time DoS before being rejected. It cannot become an accepted or shipped artifact, and TLS plus the committed SRI make this an availability hardening item. Prefer a bounded raw download, verify SHA-512, then extract.
  4. P3 — scanner/evidence hardening: add a find timeout and manifest-size ceiling; run the isolated scan by immutable image ID, validate that the JSON image field matches it, and make rerun evidence unambiguous.

Separate pre-existing workflow-trust follow-up: credentialed workflow_dispatch paths should be main-only or controlled by a trusted default-branch controller, rather than allowing selected-ref workflow code to receive registry publication credentials.

Required CI is still pending and remains the merge gate; this approval does not waive it.

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@cjagwani

Copy link
Copy Markdown
Collaborator

Exact-head E2E failure follow-up: the node-tar patch itself succeeded, but the forced OpenClaw base rebuild reached the fail-closed mcporter audit after GHSA-frvp-7c67-39w9 was published today. Commit be631a0 pins the fixed @hono/node-server@2.0.5 transitive artifact through the dedicated mcporter runtime lock. Evidence: canonical v1.19.14→v2.0.5 tag/release/ancestry audit includes fix cd076e117cfe4cb8d31f9eb11d2e8f38a6cb8faf; the retained getRequestListener contract is the only SDK server-side API involved; NemoClaw runs Node >=22.19; mcporter production imports the client transport; npm ci/audit/signature verification passed (0 advisories, 120 signatures, 12 attestations); focused tests passed 24/24; and Dockerfile.base rebuilt successfully through the completed-image node-tar scan. CI and exact-head credentialed E2E are being rerun on be631a0.

prekshivyas and others added 2 commits July 21, 2026 12:44
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Comment thread scripts/patch-bundled-npm-tar.mts Fixed
cjagwani and others added 5 commits July 21, 2026 13:34
cjagwani and others added 6 commits July 21, 2026 14:15
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@cv
cv merged commit 5087eb4 into main Jul 22, 2026
53 of 55 checks passed
@cv
cv deleted the codex/fix-node-tar-images branch July 22, 2026 02:49
@yanyunl1991

Copy link
Copy Markdown
Contributor

Heads-up: this change appears to break the upgrade-stale-sandbox live E2E deterministically.

The new scripts/checks/node-tar-image-scan.mts build step rejects the legacy stale-upgrade fixture base image, which intentionally installs a pre-remediation OpenClaw (2026.3.11) that still bundles tar@7.5.11. The failure happens while building the old fixture base, before any upgrade logic runs, so it blocks E2E / PR Gate for every PR that exercises the upgrade-stale-sandbox target (i.e. PRs touching the upgrade-sandboxes path). It is not specific to any one change set.

Evidence

test/e2e/live/upgrade-stale-sandbox.test.ts:87

expect(buildOldBase.exitCode, resultText(buildOldBase)).toBe(0);
// AssertionError: expected 1 to be +0

The old-base docker build fails at the tar scan:

ERROR: /usr/local/lib/node_modules/openclaw/node_modules/tar contains tar@7.5.11
ERROR: process "... node-tar-image-scan.mts --root / --image build:openclaw-base ..."
       did not complete successfully: exit code: 1

Observed run (E2E target upgrade-stale-sandbox):
https://github.com/NVIDIA/NemoClaw/actions/runs/29887823793/job/88822043689

Root cause

The node-tar-image-scan guard is applied to the legacy stale-upgrade fixture base build. That fixture must install an old OpenClaw release (2026.3.11) whose bundled tar predates the remediation, so the scan can never pass for it. There is no exemption path for legacy fixture images, and no follow-up fix is on main yet.

Possible remediations (your call)

  • Exempt the legacy stale-upgrade fixture base from node-tar-image-scan (scope the scan to production base images only), or
  • Repin / patch the fixture so the old-base build no longer trips the scan, or
  • Allow the scan to warn (non-fatal) for explicitly-tagged legacy fixtures.

Happy to help validate whichever direction you prefer.

cv pushed a commit that referenced this pull request Jul 22, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical `v0.0.91` changelog entry that was missed before the
release tag was cut. Correct the custom-image compatibility guidance
because the tagged code still accepts the legacy inference route
selector instead of removing it in v0.0.91.

## Changes

- Add `docs/changelog/2026-07-22.mdx` with the release summary and
detailed security, rebuild, Hermes, DGX Station, and
historical-validation changes from the published v0.0.91 announcement.
- Link shipped behavior to the most specific published OpenClaw and
Hermes documentation routes.
- Correct the v0.0.90 changelog and command reference so they match the
compatibility fallback present in the tagged v0.0.91 code without
inventing a new removal version.
- Keep the immutable v0.0.91 release tag unchanged; this is the
documented post-release recovery path.

Source summary:

- [#7332](#7332),
[#7289](#7289), and
[#7294](#7294) ->
`docs/changelog/2026-07-22.mdx`: Summarize completed-image `node-tar`
remediation and current and historical container verification.
- [#7213](#7213),
[#7363](#7363),
[#7366](#7366), and
[#7369](#7369) ->
`docs/changelog/2026-07-22.mdx`: Summarize trusted base preparation,
backup reuse, deletion convergence, and rebuild confidence.
- [#7212](#7212) ->
`docs/changelog/2026-07-22.mdx`: Summarize the Hermes API bearer-token
lifecycle and supported retrieval command.
- [#7327](#7327) and
[#7328](#7328) ->
`docs/changelog/2026-07-22.mdx`: Summarize qualified DGX Station
guidance and reproducible coding-agent installation instructions.
- [#7355](#7355),
[#7360](#7360),
[#7362](#7362), and
[#7364](#7364) ->
`docs/changelog/2026-07-22.mdx`: Summarize restored historical OpenClaw
upgrade and Hermes rebuild validation.
- [#7189](#7189) ->
`docs/changelog/2026-07-20.mdx`, `docs/reference/commands.mdx`: Correct
its forward-looking removal deadline after v0.0.91 shipped with the
documented legacy fallback still present.
- [#7282](#7282),
[#7306](#7306), and
[#7341](#7341) need no additional
user-guide update because they already update their owned contributor or
user-facing text directly.

## Type of Change

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

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates dated changelog structure, SPDX
syntax, version ordering, and published routes.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs 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 — reviewer/approval link/justification:
- [ ] 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; this documentation-only PR does not
change Station preparation or runtime behavior.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## 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 check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` (6 passed).
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not run; this is a focused
documentation-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors and 2 existing site-wide warnings.
- [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)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

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


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

## Summary by CodeRabbit

* **Documentation**
* Updated v0.0.91 guidance for custom Dockerfiles, including continued
legacy compatibility and recommended migration to
`NEMOCLAW_INFERENCE_PROVIDER_ID`.
* Added release notes covering image security scanning, safer rebuild
behavior, token management, DGX Station guidance, and deterministic
release validation.
* Clarified that existing custom images may continue using the legacy
selector temporarily, with fallback removal planned for a future
release.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: cjagwani <cjagwani@nvidia.com>
senthilr-nv added a commit that referenced this pull request Jul 25, 2026
<!-- markdownlint-disable MD041 -->
## Summary

A normal `0002` checkout can stage executable Docker payloads as `0775`,
so the exact metadata gate added by #7486 aborts a sandbox replacement
build. This change clears group and other write bits while preserving
owner write and executable intent, so permissive and restrictive source
modes both produce canonical Docker payload modes without weakening the
gate.

## Changes

- Clear group and other write bits in
`normalizeReadModesForDockerCopy()` before adding the read, traverse,
and executable permissions required by Docker.
- Cover optimized and legacy staging with `0775` directory and
executable fixtures plus a `0664` non-executable fixture. The tests
assert exact staged modes of `0755` and `0644`.
- Retain coverage that normalizes restrictive `0700` directories and
executables plus `0600` ordinary files.
- Confirm the regression history: #3664 introduced read-mode
normalization, #7072 applied it to scripts with restrictive-mode
coverage, #7332 added `patch-bundled-npm-tar.mts`, and #7486 made its
preserved `0775` mode fail the exact `0755` assertion.
- Validate the fix on Brev instance `nc-july26` from base SHA
`3b2f6d557`. A transactional rebuild with `0775` and `0664` source
inputs completed the strict payload metadata stage, replacement
creation, state restore, policy restore, and deployment health checks.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: The fix restores the existing
staged-payload permission contract and does not change commands,
configuration, or supported workflows.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: No documentation files changed. The fix restores canonical
staged modes without changing commands, configuration, or supported
workflows. The reviewer found no actionable wording issues.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 14967c5 -->
<!-- docs-review-agents-blob-sha: 9c9b36d -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## 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 check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/sandbox-build-context.test.ts
src/lib/onboard/build-context-stage.test.ts
src/lib/actions/sandbox/rebuild-managed-image-preparation.test.ts`
(22/22 passed); `npm run typecheck:cli` passed; Brev `nc-july26` rebuild
passed the strict Docker payload metadata stage and completed
successfully.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] 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)

---
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression security v0.0.91 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants