fix(sandbox): reject managed startup env wrapper without nemoclaw-start terminator - #8609
Conversation
…rt terminator Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…cases Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
📝 WalkthroughWalkthroughThe entrypoint wrapper centralizes managed-variable validation, tracks leading assignments, rejects malformed startup handoffs, and preserves command-tail arguments. Tests cover valid command tails and unsafe or malformed assignment sequences. ChangesManaged environment validation
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit e402ed4 in the TypeScript / code-coverage/cliThe overall coverage in commit e402ed4 in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/entrypoint-env-wrapper.test.ts`:
- Around line 87-100: Update the two affected test titles in the enclosing
describe block, including “leaves a user command tail that only looks like a
managed assignment,” by appending the exact suffix “(`#8595`)” to each title while
preserving their existing wording.
🪄 Autofix
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: 4c49839e-841c-4474-9014-9a9e4f262e5d
📒 Files selected for processing (2)
scripts/lib/entrypoint-env-wrapper.shtest/entrypoint-env-wrapper.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
3 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
4 additional E2E selections from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite against this exact revision. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
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. |
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
Accepted issue #8595 scope is implemented without a product-surface expansion. The wrapper uses one exact managed-variable set, rejects missing terminators before environment mutation, preserves user command tails, and adds positive and negative regression tests. Security review found no blocker across all nine rubric categories. No competing PR exists, the automated finding is resolved, the current advisor reports no findings, the PR is not behind main, and no maintainer review exists.
|
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. |
Security review — PASS\n\nReviewed the current change in scripts/lib/entrypoint-env-wrapper.sh and its regression tests against all nine repository security categories. No security findings.\n\n- Secrets and Credentials — PASS: The wrapper does not print assignment values or trust payloads. Diagnostics contain only fixed guidance and managed variable names.\n- Input Validation and Data Sanitization — PASS: Managed names are matched against the supported allowlist, and the existing validation for names, lengths, newlines, and duplicates remains intact for valid handoff.\n- Authentication and Authorization — PASS: The change does not alter an authentication or authorization boundary. It tightens the root entrypoint handoff boundary.\n- Dependencies and Supply Chain — PASS: The change adds no dependency, image, or package update.\n- Error Handling and Logging — PASS: Missing terminators fail closed with a nonzero result before managed values are exported, without disclosing their contents.\n- Cryptography and Data Protection — PASS: The change does not alter cryptography, and encoded trust data is never logged.\n- Configuration and Security Controls — PASS: Detection and validation use the same supported managed-variable set, with restrictive default behavior when the terminator is absent.\n- Security Testing — PASS: Focused tests cover the reported sequence, mixed assignments, trust data in an ordinary command tail, unsupported names, repeated names, and preservation of ordinary command tails.\n- System Security — PASS: A degraded managed-startup sequence is rejected before state mutation, while valid nemoclaw-start handoff and ordinary user commands keep their prior behavior.\n\nCurrent code scanning, shell checks, focused tests, sandbox tests, and required repository checks pass. The OpenClaw managed-startup job remains in progress and must also pass before merge. |
<!-- markdownlint-disable MD041 --> ## Summary This PR updates the August 10, 2026 v0.0.106 release entry with gateway readiness fixes that merged after PR #8756. PRs #8765, #8767, and #8768 remain outside this entry because they are open and do not carry the `v0.0.106` release label. ## Changes - Document acceptance of OpenShell v0.0.101 `Server:` endpoint output and target-bound process tags when trusted listener evidence matches the configured gateway. - Document preservation of selected-gateway stale state so onboarding can reconcile a registered gateway when a gateway-scoped OpenShell status check cannot connect. - Record evidence-backed exclusions for internal image, startup, qualification, proxy-environment, CI, and test-harness changes in PRs #8754, #8609, #8762, #8432, #8766, and #8581. - Exclude PRs #8765, #8767, and #8768 because their changes are absent from `main` and the PRs do not carry the `v0.0.106` release label. The release entry must be updated after any of those PRs merges for v0.0.106. ## 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 SPDX placement, version headings, forbidden terms, and link form. - [ ] 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: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-08-10.mdx`; an independent Codex Desktop subagent reviewed the writing rules and documentation style, terminology, structure, voice, code-sample presentation, links, source and test accuracy, release meaning, product scope, and evidence-backed exclusions at commit `190bf882c`. - Agent: Codex Desktop <!-- docs-review-head-sha: 190bf88 --> <!-- docs-review-agents-blob-sha: c4923a3 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable; `scripts/prepare-dgx-station-host.sh` is unchanged. - 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 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 — command/result or justification: `npx vitest run test/changelog-docs.test.ts` passed 6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not applicable to a documentation-only release-entry update. - [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) — result: passed with 0 errors and 2 existing 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) — no page was added. --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved gateway readiness detection for OpenShell v0.0.101 endpoint output. * Process tags are now accepted only when they match trusted listener information for the configured gateway. * Preserved stale gateway status during connection failures to support accurate onboarding reconciliation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Summary
The managed startup env wrapper only rejected a missing
nemoclaw-startterminator when the argument sequence carriedNEMOCLAW_STARTUP_PROFILE_B64orNEMOCLAW_CORPORATE_CA_B64, soenv NEMOCLAW_AUTO_PAIR_FAST_REENTRY_INTERVAL_SECS=5 /bin/shreturned success and kept the unnormalized arguments. It now rejects any supported managed variable name that appears in the leading assignment run without the terminator, while a user command tail that only looks like an assignment still passes through unchanged.Related Issue
Fixes #8595
Changes
scripts/lib/entrypoint-env-wrapper.shout of the inlinecaseinto one_nemoclaw_supported_namesvalue, so the terminator-missing branch and the assignment validation loop read the same list instead of drifting apart.NEMOCLAW_STARTUP_PROFILE_B64andNEMOCLAW_CORPORATE_CA_B64in any argument position is unchanged, so no current guarantee is relaxed.env FOO=bar /bin/sh -c NEMOCLAW_SANDBOX_NAME=probestays a user command.test/entrypoint-env-wrapper.test.tspins that boundary.test/entrypoint-env-wrapper.test.tscovering the reported sequence, a two-assignment variant, and a trust payload in the command tail, and give every case in that table a distinct name so a failure identifies the broken contract.Type of Change
Quality Gates
docs/, and the only producer of this argument sequence is the launch renderer, which always emits the terminator. The newly rejected shape is reachable only by a hand-built container command.Documentation Writer Review
no-docs-needed/usr/local/bin/nemoclaw-start, and public documentation does not expose this OCI argument grammar.docs/reference/commands.mdxalready documents the affected environment variable.Verification
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 test/entrypoint-env-wrapper.test.ts— 12/12 pass.npx vitest run test/pr-risk-plan.test.ts test/sandbox-provisioning-helper-permissions.test.ts test/sandbox-rlimit-hooks.test.ts test/hermes-doctor-config-hash.test.ts— 128/128 pass.test/hermes-start.test.ts,test/service-env.test.ts,test/sandbox-provisioning.test.ts,test/sandbox-build-context.test.ts,test/openclaw-final-image-layout.test.ts, andtest/hermes-final-image-layout.test.tsalso pass.npm 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: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit