Skip to content

test(e2e): prove security posture parity for both agents - #6010

Merged
cv merged 6 commits into
mainfrom
codex/e2e-security-posture-parity
Jun 29, 2026
Merged

cv merged 6 commits into
mainfrom
codex/e2e-security-posture-parity

Conversation

@cv

@cv cv commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Promote the frozen security-posture checks into a dedicated two-agent Vitest lane before the legacy E2E retirement. This gives OpenClaw and Hermes the same non-root, capability, policy, and secret-boundary proof under one reviewable workflow contract.

Related Issue

Contributes to #5919.

Changes

  • Extract shared security-posture assertions into a typed E2E fixture.
  • Exercise the assertions from the OpenClaw and Hermes live tests.
  • Add a default-enabled, two-agent workflow matrix with isolated artifacts and step-scoped inference credentials.
  • Add focused support tests and a workflow mutation ratchet for agent coverage, mode configuration, action pinning, and credential scope.

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 — justification: internal E2E coverage and workflow wiring only; no product behavior or user-facing interface changes.
  • 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: the new job withholds Docker credentials, scopes NVIDIA_INFERENCE_API_KEY to the live test step, sanitizes the OpenShell install environment, pins actions by full SHA, and uploads only its isolated artifact roots.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • 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)

Targeted verification:

  • VITEST_MAX_WORKERS=16 npx vitest run --project e2e-vitest-support test/e2e-scenario/support-tests/security-posture.test.ts test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts
  • npm run typecheck:cli
  • normal commit and push hooks

Signed-off-by: Carlos Villela [email protected]

Summary by CodeRabbit

  • New Features
    • Added security posture validation to supported agent end-to-end runs, with posture results included in scenario reporting.
    • Introduced a dedicated security-posture Vitest job that runs for both agent variants and uploads agent-specific artifacts.
  • Bug Fixes
    • Strengthened checks to ensure host/sandbox posture and runtime guard behavior are correctly enforced when enabled.
  • Tests
    • Added new end-to-end security posture fixtures and unit coverage for posture helper behavior and env normalization.
    • Added workflow boundary tests to verify the security-posture job is correctly dispatched and securely configured.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a security posture E2E fixture, integrates it into both live scenarios, adds workflow validation tests, and wires a new CI job into PR reporting.

Changes

Security Posture E2E Feature

Layer / File(s) Summary
Security posture fixture API
test/e2e-scenario/fixtures/security-posture.ts
Defines security-posture helpers for capability decoding, feature gating, expectation parsing, and env construction.
Security posture assertions
test/e2e-scenario/fixtures/security-posture.ts
assertSecurityPosture checks host user state, sandbox PID 1 status, rc file and runtime proxy script permissions, configure guard behavior, and startup log markers, then returns SecurityPostureSummary.
Live E2E test integration
test/e2e-scenario/live/full-e2e.test.ts, test/e2e-scenario/live/hermes-e2e.test.ts
Both live tests add security posture env wiring, conditional contract checks, conditional assertSecurityPosture(...) calls, and posture fields in scenario result output.
Workflow validation tooling and tests
tools/e2e-scenarios/security-posture-workflow-boundary.mts, test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts, test/e2e-scenario/support-tests/security-posture.test.ts
validateSecurityPostureWorkflow reads and checks the workflow structure, and the support tests verify selector behavior, mutation rejection, capability decoding, and env forwarding.
Security posture CI job
.github/workflows/e2e-vitest-scenarios.yaml
Adds the security-posture-vitest matrix job for openclaw and hermes, uploads agent-specific artifacts, and includes the job in report-to-pr dependencies.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

area: e2e, area: ci

Suggested reviewers

  • ericksoa
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding security posture E2E coverage for both agents.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/e2e-security-posture-parity

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

@github-code-quality

github-code-quality Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the codex/e2e-security-p... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/e2e-security-p... 552c465 +/-
nemoclaw/src/se...cret-scanner.ts — 100% —
nemoclaw/src/commands/slash.ts — 100% —
nemoclaw/src/li...bprocess-env.ts — 100% —
nemoclaw/src/bl...eprint/state.ts — 98% —
nemoclaw/src/onboard/config.ts — 98% —
nemoclaw/src/bl...int/snapshot.ts — 97% —
nemoclaw/src/bl...print/runner.ts — 95% —
nemoclaw/src/co...ration-state.ts — 94% —
nemoclaw/src/bl...ate-networks.ts — 94% —
nemoclaw/src/index.ts — 94% —

TypeScript / code-coverage/cli

The overall coverage in the codex/e2e-security-p... branch is 68%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/e2e-security-p... 552c465 +/-
src/lib/actions...all/run-plan.ts — 80% —
src/lib/state/o...oard-session.ts — 79% —
src/lib/actions...dbox/rebuild.ts — 74% —
src/lib/state/sandbox.ts — 72% —
src/lib/shields/index.ts — 70% —
src/lib/onboard/preflight.ts — 69% —
src/lib/actions...licy-channel.ts — 59% —
src/lib/onboard...er-gpu-patch.ts — 59% —
src/lib/policy/index.ts — 52% —
src/lib/onboard.ts — 20% —

Updated June 29, 2026 19:38 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: security-posture-vitest
Optional E2E: full-e2e-vitest, hermes-e2e-vitest

Dispatch hint: security-posture-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • security-posture-vitest (high): This PR introduces the security-posture live E2E job and changes the OpenClaw and Hermes live tests under NEMOCLAW_E2E_SECURITY_POSTURE. Run the new matrix job to prove both agent legs execute with the intended workflow environment, scoped inference secret, sandbox lifecycle, inference, and security-posture assertions.

Optional E2E

  • full-e2e-vitest (high): Useful regression check that the standard OpenClaw full E2E path still works with security-posture mode disabled after the shared full-e2e.test.ts changes.
  • hermes-e2e-vitest (high): Useful regression check that the standard Hermes E2E path still works with security-posture mode disabled after the shared hermes-e2e.test.ts changes.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: security-posture-vitest

@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: full-e2e-vitest, hermes-dashboard-vitest, security-posture-vitest
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=full-e2e-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-dashboard-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=security-posture-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • full-e2e-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/full-e2e.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=full-e2e-vitest
  • hermes-dashboard-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/hermes-e2e.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-dashboard-vitest
  • security-posture-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/full-e2e.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=security-posture-vitest

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/fixtures/security-posture.ts
  • test/e2e-scenario/live/full-e2e.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/security-posture.test.ts
  • tools/e2e-scenarios/security-posture-workflow-boundary.mts

@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-2: Credential scoping correct — inference key scoped to live test step only; then add or justify PRA-T1.
Open items: 2 required · 9 warnings · 5 suggestions · 6 test follow-ups
Since last review: 0 prior items resolved · 3 still apply · 4 new items found

Action checklist

  • PRA-2 Fix: Credential scoping correct — inference key scoped to live test step only in .github/workflows/e2e-vitest-scenarios.yaml:3395
  • PRA-3 Fix: Workflow job permissions and hardening correct in .github/workflows/e2e-vitest-scenarios.yaml:3355
  • PRA-1 Resolve or justify: Source-of-truth review needed: .github/workflows/e2e-vitest-scenarios.yaml:3361 (legacy-parity contract comment)
  • PRA-4 Resolve or justify: Proxy-env validation uses shell string interpolation in test/e2e-scenario/fixtures/security-posture.ts:189
  • PRA-6 Resolve or justify: allowNonRootOwner string used in shell arithmetic context in test/e2e-scenario/fixtures/security-posture.ts:184
  • PRA-7 Resolve or justify: Duplicate NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST setting in test/e2e-scenario/live/full-e2e.test.ts:56
  • PRA-8 Resolve or justify: Unnecessary OPENSHELL_GATEWAY env fallback (PRA-1 unaddressed) in test/e2e-scenario/fixtures/security-posture.ts:49
  • PRA-9 Resolve or justify: Unused workflowPath parameter (PRA-2 unaddressed) in tools/e2e-scenarios/security-posture-workflow-boundary.mts:49
  • PRA-10 Resolve or justify: DEFAULT_WORKFLOW_PATH constant only used internally in tools/e2e-scenarios/security-posture-workflow-boundary.mts:10
  • PRA-11 Resolve or justify: Acceptance clause Complete the Vitest E2E cutover with job-variant parity evidence #5919 mapping not explicit in test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts:1
  • PRA-16 Resolve or justify: Legacy-parity fallback for non-root host not fully documented in .github/workflows/e2e-vitest-scenarios.yaml:3361
  • PRA-T1 Add or justify test follow-up: Mocked behavioral coverage
  • PRA-T2 Add or justify test follow-up: Mocked behavioral coverage
  • PRA-T3 Add or justify test follow-up: Missing integration test coverage for assertSecurityPosture branches
  • PRA-T4 Add or justify test follow-up: No test validates agent-specific proxy-env differentiation
  • PRA-T5 Add or justify test follow-up: Acceptance clause
  • PRA-T6 Add or justify test follow-up: .github/workflows/e2e-vitest-scenarios.yaml:3361 (legacy-parity contract comment)
  • PRA-5 In-scope improvement: Comprehensive sandbox escape validation in assertSecurityPosture in test/e2e-scenario/fixtures/security-posture.ts:90
  • PRA-12 In-scope improvement: Missing integration test coverage for assertSecurityPosture branches in test/e2e-scenario/support-tests/security-posture.test.ts:1
  • PRA-13 In-scope improvement: No test validates agent-specific proxy-env differentiation in test/e2e-scenario/live/hermes-e2e.test.ts:530
  • PRA-14 In-scope improvement: OPENSHELL_GATEWAY env fallback simplification in test/e2e-scenario/fixtures/security-posture.ts:49
  • PRA-15 In-scope improvement: workflowPath parameter removal in tools/e2e-scenarios/security-posture-workflow-boundary.mts:49

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture — Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Required security .github/workflows/e2e-vitest-scenarios.yaml:3395 No action needed; this is correct behavior
PRA-3 Required security .github/workflows/e2e-vitest-scenarios.yaml:3355 No action needed; this is correct behavior
PRA-4 Resolve/justify security test/e2e-scenario/fixtures/security-posture.ts:189 Rewrite proxy-env validation in TypeScript using sandbox.exec with structured stat/grep commands, or extract shell script to a named constant with explanatory comment (addresses PRA-3 from previous review)
PRA-5 Improvement security test/e2e-scenario/fixtures/security-posture.ts:90 No action needed; comprehensive sandbox escape validation
PRA-6 Resolve/justify correctness test/e2e-scenario/fixtures/security-posture.ts:184 Change to const allowNonRootOwner = true; and in shell use test "${allowNonRootOwner}" = true or restructure logic
PRA-7 Resolve/justify correctness test/e2e-scenario/live/full-e2e.test.ts:56 Remove duplicate or document why both exist
PRA-8 Resolve/justify scope test/e2e-scenario/fixtures/security-posture.ts:49 Replace with constant "nemoclaw". If a second gateway ever exists, reintroduce env override with documentation
PRA-9 Resolve/justify scope tools/e2e-scenarios/security-posture-workflow-boundary.mts:49 Remove parameter and use DEFAULT_WORKFLOW_PATH directly. If a second workflow ever needs validation, add separate validator or parameterize at that time
PRA-10 Resolve/justify scope tools/e2e-scenarios/security-posture-workflow-boundary.mts:10 Keep for readability; not a significant issue
PRA-11 Resolve/justify acceptance test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts:1 Add explicit comment in test file or PR description mapping each acceptance clause to test evidence. If #5919 has specific clauses, enumerate them
PRA-12 Improvement tests test/e2e-scenario/support-tests/security-posture.test.ts:1 Add focused integration test (can use mocked sandbox/host clients) for assertSecurityPosture success/failure paths, especially: non-root host failure, dangerous capability retention, rc file mode/owner/guard failures, proxy env failures, configure guard bypass, startup log rc write failure detection
PRA-13 Improvement tests test/e2e-scenario/live/hermes-e2e.test.ts:530 Add unit test for proxy-env validation logic with both agent variants, verifying grep patterns for 'hermes() {' and 'openclaw() {' and guardArg 'setup' vs 'configure'
PRA-14 Improvement correctness test/e2e-scenario/fixtures/security-posture.ts:49 Apply simplification (PRA-1)
PRA-15 Improvement correctness tools/e2e-scenarios/security-posture-workflow-boundary.mts:49 Apply simplification (PRA-2)
PRA-16 Resolve/justify correctness .github/workflows/e2e-vitest-scenarios.yaml:3361 Document in PR or code: what invalid state is handled (PID 1 initially root), where created (OpenShell sandbox entrypoint), why source cannot be fixed in this PR (legacy parity contract), regression test proving source cannot regress (assertSecurityPosture hostNonRoot/entrypoint checks), and when workaround can be removed (when runtime no longer needs legacy parity)

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-2 Required — Credential scoping correct — inference key scoped to live test step only

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3395
  • Category: security
  • Problem: NVIDIA_INFERENCE_API_KEY correctly scoped only to the live test step; install step sanitizes DOCKER_CONFIG, DOCKERHUB_USERNAME, DOCKERHUB_TOKEN, NVIDIA_API_KEY, NVIDIA_INFERENCE_API_KEY, GITHUB_TOKEN via env -u. No secrets leaked at job scope.
  • Impact: No credential leakage; follows least-privilege principle for CI secrets
  • Required action: No action needed; this is correct behavior
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check workflow lines 3395-3400 for install step env -u and line 3410 for step-scoped NVIDIA_INFERENCE_API_KEY
  • Missing regression test: Existing workflow-boundary test validates key not exposed at job scope and install step sanitization
  • Done when: The required change is committed and verification passes: Check workflow lines 3395-3400 for install step env -u and line 3410 for step-scoped NVIDIA_INFERENCE_API_KEY.
  • Evidence: Workflow lines 3395-3410 show env -u for 6 variables at install step and NVIDIA_INFERENCE_API_KEY only in live test step env

PRA-3 Required — Workflow job permissions and hardening correct

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3355
  • Category: security
  • Problem: Job permissions correctly set to contents: read only. No write permissions. Actions pinned by full SHA ([email protected], [email protected], [email protected]). Matrix fail-fast: false. Timeout 75 minutes for two-agent budget.
  • Impact: Least-privilege CI job; supply-chain hardening via action pinning
  • Required action: No action needed; this is correct behavior
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Read workflow lines 3355-3365 for permissions, strategy, timeout, and runs-on
  • Missing regression test: workflow-boundary test validates permissions, action pinning, fail-fast, and timeout
  • Done when: The required change is committed and verification passes: Read workflow lines 3355-3365 for permissions, strategy, timeout, and runs-on.
  • Evidence: Workflow lines 3355-3365: permissions.contents=read, strategy.fail-fast=false, timeout-minutes=75, runs-on=ubuntu-latest
Review findings by urgency: 2 required fixes, 9 items to resolve/justify, 5 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Source-of-truth review needed: .github/workflows/e2e-vitest-scenarios.yaml:3361 (legacy-parity contract comment)

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: assertSecurityPosture validates hostNonRoot and entrypoint uid != 0 when EXPECT_NON_ROOT_ENTRYPOINT=1
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: Workflow comment lines 3361-3367; assertSecurityPosture lines 90-120 validate uid != 0 when nonRootEntrypoint expectation enabled

PRA-4 Resolve/justify — Proxy-env validation uses shell string interpolation

  • Location: test/e2e-scenario/fixtures/security-posture.ts:189
  • Category: security
  • Problem: Proxy-env validation uses trustedSandboxShellScript with inline shell script containing ${functionName} and ${guardArg} template interpolation. functionName/guardArg derived from agent parameter (validated as 'hermes'|'openclaw'), so injection risk is low but shell string execution is harder to audit than TypeScript exec calls.
  • Impact: Reduced auditability; shell strings harder to review/debug than structured TypeScript commands
  • Recommended action: Rewrite proxy-env validation in TypeScript using sandbox.exec with structured stat/grep commands, or extract shell script to a named constant with explanatory comment (addresses PRA-3 from previous review)
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read security-posture.ts lines 189-215 and compare to rc-files validation at lines 160-187
  • Missing regression test: Existing security-posture-workflow-boundary.test.ts and security-posture.test.ts cover fixture behavior; no new test needed for refactoring
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read security-posture.ts lines 189-215 and compare to rc-files validation at lines 160-187.
  • Evidence: Lines 189-215: trustedSandboxShellScript with shell script using ${functionName} and ${guardArg}; lines 160-187 use similar pattern for rc-files but with loop

PRA-6 Resolve/justify — allowNonRootOwner string used in shell arithmetic context

  • Location: test/e2e-scenario/fixtures/security-posture.ts:184
  • Category: correctness
  • Problem: allowNonRootOwner = "1" is a string but used in shell arithmetic context test "${allowNonRootOwner}" = 1. Works in bash but confusing; should be boolean or numeric for clarity.
  • Impact: Code clarity; potential confusion for maintainers
  • Recommended action: Change to const allowNonRootOwner = true; and in shell use test "${allowNonRootOwner}" = true or restructure logic
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read line 184 and shell usage at line 197
  • Missing regression test: Unit test for proxy-env validation with non-root owner scenario
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read line 184 and shell usage at line 197.
  • Evidence: Line 184: const allowNonRootOwner = "1"; line 197: test "${allowNonRootOwner}" = 1

PRA-7 Resolve/justify — Duplicate NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST setting

  • Location: test/e2e-scenario/live/full-e2e.test.ts:56
  • Category: correctness
  • Problem: securityPostureModeEnv() spreads into env() but NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST is hardcoded to "1" in securityPostureModeEnv while workflow also sets it explicitly. Double-setting is harmless but redundant.
  • Impact: Minor redundancy; workflow env takes precedence anyway
  • Recommended action: Remove duplicate or document why both exist
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare full-e2e.test.ts line 56 with workflow line 3374
  • Missing regression test: None needed; cosmetic
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare full-e2e.test.ts line 56 with workflow line 3374.
  • Evidence: securityPostureModeEnv() returns NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST: "1"; workflow line 3374 also sets NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST: "1"

PRA-8 Resolve/justify — Unnecessary OPENSHELL_GATEWAY env fallback (PRA-1 unaddressed)

  • Location: test/e2e-scenario/fixtures/security-posture.ts:49
  • Category: scope
  • Problem: probeEnv() defaults OPENSHELL_GATEWAY to process.env.OPENSHELL_GATEWAY ?? "nemoclaw" but workflow explicitly sets OPENSHELL_GATEWAY=nemoclaw for security-posture-vitest job. No caller overrides this. Unnecessary configurability (PRA-1 from previous review, still unaddressed).
  • Impact: Unnecessary configurability adds cognitive load and theoretical injection surface if env were ever polluted
  • Recommended action: Replace with constant "nemoclaw". If a second gateway ever exists, reintroduce env override with documentation
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts && grep OPENSHELL_GATEWAY .github/workflows/e2e-vitest-scenarios.yaml | grep security-posture
  • Missing regression test: Existing security-posture.test.ts unit tests cover fixture behavior
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts && grep OPENSHELL_GATEWAY .github/workflows/e2e-vitest-scenarios.yaml | grep security-posture.
  • Evidence: Line 49: OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw"; workflow line 3361 sets OPENSHELL_GATEWAY: nemoclaw explicitly

PRA-9 Resolve/justify — Unused workflowPath parameter (PRA-2 unaddressed)

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:49
  • Category: scope
  • Problem: readSecurityPostureWorkflow accepts optional workflowPath parameter defaulting to DEFAULT_WORKFLOW_PATH, but only caller (security-posture-workflow-boundary.test.ts line 18) uses default. No other consumers (PRA-2 from previous review, still unaddressed).
  • Impact: Unused configurability increases maintenance surface and test complexity without benefit
  • Recommended action: Remove parameter and use DEFAULT_WORKFLOW_PATH directly. If a second workflow ever needs validation, add separate validator or parameterize at that time
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep -r readSecurityPostureWorkflow test/ tools/ --include="*.ts" --include="*.mts"
  • Missing regression test: Existing workflow boundary tests validate same behavior against real workflow file
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep -r readSecurityPostureWorkflow test/ tools/ --include="*.ts" --include="*.mts".
  • Evidence: Line 49: export function readSecurityPostureWorkflow(workflowPath = DEFAULT_WORKFLOW_PATH); only called from test line 18 with no argument

PRA-10 Resolve/justify — DEFAULT_WORKFLOW_PATH constant only used internally

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:10
  • Category: scope
  • Problem: DEFAULT_WORKFLOW_PATH constant defined but only used internally. Could be inlined or kept for clarity (minor).
  • Impact: Minor; constant provides readability for the single use site
  • Recommended action: Keep for readability; not a significant issue
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read lines 10 and 49
  • Missing regression test: None needed
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read lines 10 and 49.
  • Evidence: Line 10: const DEFAULT_WORKFLOW_PATH = join(REPO_ROOT, ".github", "workflows", "e2e-vitest-scenarios.yaml"); used only at line 49

PRA-11 Resolve/justify — Acceptance clause #5919 mapping not explicit

  • Location: test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts:1
  • Category: acceptance
  • Problem: PR body states 'Contributes to Complete the Vitest E2E cutover with job-variant parity evidence #5919' but issue content unavailable. Workflow boundary tests verify: both agents run by default and via selectors; mutations reject missing agent coverage, missing NEMOCLAW_E2E_SECURITY_POSTURE, write permissions, exposed inference key, unsanitized install step. These map to 'dedicated two-agent Vitest lane with isolated artifacts and step-scoped inference credentials' from PR description.
  • Impact: Traceability gap between issue requirements and test evidence
  • Recommended action: Add explicit comment in test file or PR description mapping each acceptance clause to test evidence. If Complete the Vitest E2E cutover with job-variant parity evidence #5919 has specific clauses, enumerate them
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read security-posture-workflow-boundary.test.ts describe blocks and compare to PR body 'Changes' section
  • Missing regression test: Tests exist for each workflow contract property; acceptance mapping is documentation
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read security-posture-workflow-boundary.test.ts describe blocks and compare to PR body 'Changes' section.
  • Evidence: Test file has two describe blocks: 'runs both agent modes by default and through either selector' and 'rejects missing agent coverage, mode drift, and broadly scoped credentials'

PRA-16 Resolve/justify — Legacy-parity fallback for non-root host not fully documented

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3361
  • Category: correctness
  • Problem: Comment: 'Legacy-parity contract: enforce a non-root host user. PID 1 must stay root long enough to step down child processes, so its uid, bounding set, and NoNewPrivs remain evidence unless an opt-in expectation is set.' This documents a fallback/tolerance for runtime behavior where PID 1 starts as root. The test validates the contract but the source (runtime entrypoint) is not fixed here.
  • Impact: Workaround behavior not fully traced to source; removal condition unclear
  • Recommended action: Document in PR or code: what invalid state is handled (PID 1 initially root), where created (OpenShell sandbox entrypoint), why source cannot be fixed in this PR (legacy parity contract), regression test proving source cannot regress (assertSecurityPosture hostNonRoot/entrypoint checks), and when workaround can be removed (when runtime no longer needs legacy parity)
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read workflow line 3361-3367 and assertSecurityPosture entrypoint validation lines 90-120
  • Missing regression test: assertSecurityPosture already validates hostNonRoot and entrypoint uid != 0 when EXPECT_NON_ROOT_ENTRYPOINT=1
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read workflow line 3361-3367 and assertSecurityPosture entrypoint validation lines 90-120.
  • Evidence: Workflow comment at lines 3361-3367 describes legacy-parity contract; assertSecurityPosture validates uid != 0 when nonRootEntrypoint expectation enabled

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-5 Improvement — Comprehensive sandbox escape validation in assertSecurityPosture

  • Location: test/e2e-scenario/fixtures/security-posture.ts:90
  • Category: security
  • Problem: assertSecurityPosture validates non-root host user, entrypoint PID 1 capabilities (CapBnd, CapEff, NoNewPrivs, Uid), dropped dangerous capabilities (SYS_ADMIN, SYS_PTRACE, NET_RAW, NET_BIND_SERVICE, DAC_OVERRIDE), rc files locked (mode 444, root:root, no inline guards), proxy env locked (mode 444, owner check with allowNonRootOwner for non-root host), configure guard blocks modification, startup log clean. All checks are fail-closed.
  • Impact: Strong defense-in-depth against sandbox escape, capability retention, config tampering
  • Suggested action: No action needed; comprehensive sandbox escape validation
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read assertSecurityPosture function lines 90-250
  • Missing regression test: Live tests full-e2e.test.ts and hermes-e2e.test.ts exercise these checks when NEMOCLAW_E2E_SECURITY_POSTURE=1
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: assertSecurityPosture function covers hostNonRoot, entrypoint capabilities, rcFilesLocked, runtimeProxyEnvLocked, configureGuard, startupLogClean all with fail-closed assertions

PRA-12 Improvement — Missing integration test coverage for assertSecurityPosture branches

  • Location: test/e2e-scenario/support-tests/security-posture.test.ts:1
  • Category: tests
  • Problem: Unit tests cover dangerousCapabilities decoding and env normalization but not the full assertSecurityPosture integration behavior (host check, entrypoint, rc files, proxy env, configure guard, startup log). These are exercised in live tests but only when NEMOCLAW_E2E_SECURITY_POSTURE=1.
  • Impact: No fast-feedback test for security assertion logic; live tests are slow and require full sandbox
  • Suggested action: Add focused integration test (can use mocked sandbox/host clients) for assertSecurityPosture success/failure paths, especially: non-root host failure, dangerous capability retention, rc file mode/owner/guard failures, proxy env failures, configure guard bypass, startup log rc write failure detection
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check security-posture.test.ts coverage vs assertSecurityPosture branches
  • Missing regression test: New Vitest test file or describe block in security-posture.test.ts with mocked clients covering each assertion branch
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: security-posture.test.ts only tests dangerousCapabilities, securityPostureEnabled, securityPostureExpectations, securityPostureModeEnv — not assertSecurityPosture

PRA-13 Improvement — No test validates agent-specific proxy-env differentiation

  • Location: test/e2e-scenario/live/hermes-e2e.test.ts:530
  • Category: tests
  • Problem: Hermes test calls assertSecurityPosture with agent="hermes" but full-e2e.test.ts calls with agent="openclaw". No test validates that the agent-specific function names (hermes setup vs openclaw configure) and guard messages are correctly differentiated in the proxy-env validation.
  • Impact: Agent-specific guard logic untested in isolation; relies on live E2E only
  • Suggested action: Add unit test for proxy-env validation logic with both agent variants, verifying grep patterns for 'hermes() {' and 'openclaw() {' and guardArg 'setup' vs 'configure'
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read security-posture.ts lines 219-240 for configureGuard and lines 189-215 for proxyEnv
  • Missing regression test: Unit test for proxy-env validation with agent="hermes" and agent="openclaw"
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: proxyEnv validation uses ${functionName}() { grep; configureGuard uses ${functionName} ${guardArg} with different values per agent

PRA-14 Improvement — OPENSHELL_GATEWAY env fallback simplification

  • Location: test/e2e-scenario/fixtures/security-posture.ts:49
  • Category: correctness
  • Problem: OPENSHELL_GATEWAY env fallback (shrink): replace process.env.OPENSHELL_GATEWAY ?? "nemoclaw" with constant "nemoclaw". Net 0 lines. Workflow contract fixes this value.
  • Impact: Reduces cognitive load and theoretical injection surface
  • Suggested action: Apply simplification (PRA-1)
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts
  • Missing regression test: Existing security-posture.test.ts covers fixture behavior
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 49: OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw"; workflow line 3361 sets OPENSHELL_GATEWAY: nemoclaw

PRA-15 Improvement — workflowPath parameter removal

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:49
  • Category: correctness
  • Problem: workflowPath parameter (yagni): remove optional parameter from readSecurityPostureWorkflow. Net -1 lines. Single caller uses default.
  • Impact: Reduces maintenance surface and test complexity
  • Suggested action: Apply simplification (PRA-2)
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep -r readSecurityPostureWorkflow test/ tools/
  • Missing regression test: Existing workflow boundary tests validate behavior
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 49: function parameter workflowPath = DEFAULT_WORKFLOW_PATH; only caller uses default
Simplification opportunities: 5 possible cuts, net -7 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-4 native (test/e2e-scenario/fixtures/security-posture.ts:189): trustedSandboxShellScript(String.raw`f=/tmp/nemoclaw-proxy-env.sh...`) inline shell script
    • Replacement: TypeScript validation using sandbox.exec with stat -c '%a %U:%G' and grep commands, or named constant with comment
    • Net: -5 lines
    • Safety boundary: Must preserve exact validation: file exists, not symlink, mode 444, owner root:root (or current user if non-root host), contains guard markers and agent function
  • PRA-8 shrink (test/e2e-scenario/fixtures/security-posture.ts:49): OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw",
    • Replacement: OPENSHELL_GATEWAY: "nemoclaw",
    • Net: 0 lines
    • Safety boundary: Workflow explicitly sets OPENSHELL_GATEWAY=nemoclaw for security-posture-vitest job. No other callers of probeEnv() exist
  • PRA-9 yagni (tools/e2e-scenarios/security-posture-workflow-boundary.mts:49): export function readSecurityPostureWorkflow(workflowPath = DEFAULT_WORKFLOW_PATH): WorkflowRecord {
    • Replacement: export function readSecurityPostureWorkflow(): WorkflowRecord {
    • Net: -1 lines
    • Safety boundary: Single caller in security-posture-workflow-boundary.test.ts passes no argument. No external consumers
  • PRA-14 shrink (test/e2e-scenario/fixtures/security-posture.ts:49): OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw",
    • Replacement: OPENSHELL_GATEWAY: "nemoclaw",
    • Net: 0 lines
    • Safety boundary: Workflow explicitly sets OPENSHELL_GATEWAY=nemoclaw for security-posture-vitest job. No other callers of probeEnv() exist
  • PRA-15 yagni (tools/e2e-scenarios/security-posture-workflow-boundary.mts:49): export function readSecurityPostureWorkflow(workflowPath = DEFAULT_WORKFLOW_PATH): WorkflowRecord {
    • Replacement: export function readSecurityPostureWorkflow(): WorkflowRecord {
    • Net: -1 lines
    • Safety boundary: Single caller in security-posture-workflow-boundary.test.ts passes no argument. No external consumers
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Mocked behavioral coverage — Add mocked integration test for assertSecurityPosture covering each assertion branch (host non-root failure, capability retention, rc file failures, proxy env failures, configure guard bypass, startup log rc write failure). Runtime/sandbox/infrastructure paths need behavioral runtime validation: workflow and workflow boundary validator. Unit tests cover helpers but assertSecurityPosture integration branches untested without full sandbox.
  • PRA-T2 Mocked behavioral coverage — Add unit test for proxy-env validation with both agent variants (hermes/openclaw) verifying function name and guardArg differentiation. Runtime/sandbox/infrastructure paths need behavioral runtime validation: workflow and workflow boundary validator. Unit tests cover helpers but assertSecurityPosture integration branches untested without full sandbox.
  • PRA-T3 Missing integration test coverage for assertSecurityPosture branches — Add focused integration test (can use mocked sandbox/host clients) for assertSecurityPosture success/failure paths, especially: non-root host failure, dangerous capability retention, rc file mode/owner/guard failures, proxy env failures, configure guard bypass, startup log rc write failure detection
  • PRA-T4 No test validates agent-specific proxy-env differentiation — Add unit test for proxy-env validation logic with both agent variants, verifying grep patterns for 'hermes() {' and 'openclaw() {' and guardArg 'setup' vs 'configure'
  • PRA-T5 Acceptance clause — Contributes to Complete the Vitest E2E cutover with job-variant parity evidence #5919 — add test evidence or identify existing coverage. PR body states contribution; issue content unavailable to verify specific clauses. Workflow boundary tests map to described changes but explicit clause mapping missing
  • PRA-T6 .github/workflows/e2e-vitest-scenarios.yaml:3361 (legacy-parity contract comment) — assertSecurityPosture validates hostNonRoot and entrypoint uid != 0 when EXPECT_NON_ROOT_ENTRYPOINT=1. Workflow comment lines 3361-3367; assertSecurityPosture lines 90-120 validate uid != 0 when nonRootEntrypoint expectation enabled
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: .github/workflows/e2e-vitest-scenarios.yaml:3361 (legacy-parity contract comment)

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: assertSecurityPosture validates hostNonRoot and entrypoint uid != 0 when EXPECT_NON_ROOT_ENTRYPOINT=1
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: Workflow comment lines 3361-3367; assertSecurityPosture lines 90-120 validate uid != 0 when nonRootEntrypoint expectation enabled

PRA-2 Required — Credential scoping correct — inference key scoped to live test step only

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3395
  • Category: security
  • Problem: NVIDIA_INFERENCE_API_KEY correctly scoped only to the live test step; install step sanitizes DOCKER_CONFIG, DOCKERHUB_USERNAME, DOCKERHUB_TOKEN, NVIDIA_API_KEY, NVIDIA_INFERENCE_API_KEY, GITHUB_TOKEN via env -u. No secrets leaked at job scope.
  • Impact: No credential leakage; follows least-privilege principle for CI secrets
  • Required action: No action needed; this is correct behavior
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check workflow lines 3395-3400 for install step env -u and line 3410 for step-scoped NVIDIA_INFERENCE_API_KEY
  • Missing regression test: Existing workflow-boundary test validates key not exposed at job scope and install step sanitization
  • Done when: The required change is committed and verification passes: Check workflow lines 3395-3400 for install step env -u and line 3410 for step-scoped NVIDIA_INFERENCE_API_KEY.
  • Evidence: Workflow lines 3395-3410 show env -u for 6 variables at install step and NVIDIA_INFERENCE_API_KEY only in live test step env

PRA-3 Required — Workflow job permissions and hardening correct

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3355
  • Category: security
  • Problem: Job permissions correctly set to contents: read only. No write permissions. Actions pinned by full SHA ([email protected], [email protected], [email protected]). Matrix fail-fast: false. Timeout 75 minutes for two-agent budget.
  • Impact: Least-privilege CI job; supply-chain hardening via action pinning
  • Required action: No action needed; this is correct behavior
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Read workflow lines 3355-3365 for permissions, strategy, timeout, and runs-on
  • Missing regression test: workflow-boundary test validates permissions, action pinning, fail-fast, and timeout
  • Done when: The required change is committed and verification passes: Read workflow lines 3355-3365 for permissions, strategy, timeout, and runs-on.
  • Evidence: Workflow lines 3355-3365: permissions.contents=read, strategy.fail-fast=false, timeout-minutes=75, runs-on=ubuntu-latest

PRA-4 Resolve/justify — Proxy-env validation uses shell string interpolation

  • Location: test/e2e-scenario/fixtures/security-posture.ts:189
  • Category: security
  • Problem: Proxy-env validation uses trustedSandboxShellScript with inline shell script containing ${functionName} and ${guardArg} template interpolation. functionName/guardArg derived from agent parameter (validated as 'hermes'|'openclaw'), so injection risk is low but shell string execution is harder to audit than TypeScript exec calls.
  • Impact: Reduced auditability; shell strings harder to review/debug than structured TypeScript commands
  • Recommended action: Rewrite proxy-env validation in TypeScript using sandbox.exec with structured stat/grep commands, or extract shell script to a named constant with explanatory comment (addresses PRA-3 from previous review)
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read security-posture.ts lines 189-215 and compare to rc-files validation at lines 160-187
  • Missing regression test: Existing security-posture-workflow-boundary.test.ts and security-posture.test.ts cover fixture behavior; no new test needed for refactoring
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read security-posture.ts lines 189-215 and compare to rc-files validation at lines 160-187.
  • Evidence: Lines 189-215: trustedSandboxShellScript with shell script using ${functionName} and ${guardArg}; lines 160-187 use similar pattern for rc-files but with loop

PRA-5 Improvement — Comprehensive sandbox escape validation in assertSecurityPosture

  • Location: test/e2e-scenario/fixtures/security-posture.ts:90
  • Category: security
  • Problem: assertSecurityPosture validates non-root host user, entrypoint PID 1 capabilities (CapBnd, CapEff, NoNewPrivs, Uid), dropped dangerous capabilities (SYS_ADMIN, SYS_PTRACE, NET_RAW, NET_BIND_SERVICE, DAC_OVERRIDE), rc files locked (mode 444, root:root, no inline guards), proxy env locked (mode 444, owner check with allowNonRootOwner for non-root host), configure guard blocks modification, startup log clean. All checks are fail-closed.
  • Impact: Strong defense-in-depth against sandbox escape, capability retention, config tampering
  • Suggested action: No action needed; comprehensive sandbox escape validation
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read assertSecurityPosture function lines 90-250
  • Missing regression test: Live tests full-e2e.test.ts and hermes-e2e.test.ts exercise these checks when NEMOCLAW_E2E_SECURITY_POSTURE=1
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: assertSecurityPosture function covers hostNonRoot, entrypoint capabilities, rcFilesLocked, runtimeProxyEnvLocked, configureGuard, startupLogClean all with fail-closed assertions

PRA-6 Resolve/justify — allowNonRootOwner string used in shell arithmetic context

  • Location: test/e2e-scenario/fixtures/security-posture.ts:184
  • Category: correctness
  • Problem: allowNonRootOwner = "1" is a string but used in shell arithmetic context test "${allowNonRootOwner}" = 1. Works in bash but confusing; should be boolean or numeric for clarity.
  • Impact: Code clarity; potential confusion for maintainers
  • Recommended action: Change to const allowNonRootOwner = true; and in shell use test "${allowNonRootOwner}" = true or restructure logic
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read line 184 and shell usage at line 197
  • Missing regression test: Unit test for proxy-env validation with non-root owner scenario
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read line 184 and shell usage at line 197.
  • Evidence: Line 184: const allowNonRootOwner = "1"; line 197: test "${allowNonRootOwner}" = 1

PRA-7 Resolve/justify — Duplicate NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST setting

  • Location: test/e2e-scenario/live/full-e2e.test.ts:56
  • Category: correctness
  • Problem: securityPostureModeEnv() spreads into env() but NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST is hardcoded to "1" in securityPostureModeEnv while workflow also sets it explicitly. Double-setting is harmless but redundant.
  • Impact: Minor redundancy; workflow env takes precedence anyway
  • Recommended action: Remove duplicate or document why both exist
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare full-e2e.test.ts line 56 with workflow line 3374
  • Missing regression test: None needed; cosmetic
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare full-e2e.test.ts line 56 with workflow line 3374.
  • Evidence: securityPostureModeEnv() returns NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST: "1"; workflow line 3374 also sets NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST: "1"

PRA-8 Resolve/justify — Unnecessary OPENSHELL_GATEWAY env fallback (PRA-1 unaddressed)

  • Location: test/e2e-scenario/fixtures/security-posture.ts:49
  • Category: scope
  • Problem: probeEnv() defaults OPENSHELL_GATEWAY to process.env.OPENSHELL_GATEWAY ?? "nemoclaw" but workflow explicitly sets OPENSHELL_GATEWAY=nemoclaw for security-posture-vitest job. No caller overrides this. Unnecessary configurability (PRA-1 from previous review, still unaddressed).
  • Impact: Unnecessary configurability adds cognitive load and theoretical injection surface if env were ever polluted
  • Recommended action: Replace with constant "nemoclaw". If a second gateway ever exists, reintroduce env override with documentation
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts && grep OPENSHELL_GATEWAY .github/workflows/e2e-vitest-scenarios.yaml | grep security-posture
  • Missing regression test: Existing security-posture.test.ts unit tests cover fixture behavior
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts && grep OPENSHELL_GATEWAY .github/workflows/e2e-vitest-scenarios.yaml | grep security-posture.
  • Evidence: Line 49: OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw"; workflow line 3361 sets OPENSHELL_GATEWAY: nemoclaw explicitly

PRA-9 Resolve/justify — Unused workflowPath parameter (PRA-2 unaddressed)

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:49
  • Category: scope
  • Problem: readSecurityPostureWorkflow accepts optional workflowPath parameter defaulting to DEFAULT_WORKFLOW_PATH, but only caller (security-posture-workflow-boundary.test.ts line 18) uses default. No other consumers (PRA-2 from previous review, still unaddressed).
  • Impact: Unused configurability increases maintenance surface and test complexity without benefit
  • Recommended action: Remove parameter and use DEFAULT_WORKFLOW_PATH directly. If a second workflow ever needs validation, add separate validator or parameterize at that time
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: grep -r readSecurityPostureWorkflow test/ tools/ --include="*.ts" --include="*.mts"
  • Missing regression test: Existing workflow boundary tests validate same behavior against real workflow file
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: grep -r readSecurityPostureWorkflow test/ tools/ --include="*.ts" --include="*.mts".
  • Evidence: Line 49: export function readSecurityPostureWorkflow(workflowPath = DEFAULT_WORKFLOW_PATH); only called from test line 18 with no argument

PRA-10 Resolve/justify — DEFAULT_WORKFLOW_PATH constant only used internally

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:10
  • Category: scope
  • Problem: DEFAULT_WORKFLOW_PATH constant defined but only used internally. Could be inlined or kept for clarity (minor).
  • Impact: Minor; constant provides readability for the single use site
  • Recommended action: Keep for readability; not a significant issue
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read lines 10 and 49
  • Missing regression test: None needed
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read lines 10 and 49.
  • Evidence: Line 10: const DEFAULT_WORKFLOW_PATH = join(REPO_ROOT, ".github", "workflows", "e2e-vitest-scenarios.yaml"); used only at line 49

PRA-11 Resolve/justify — Acceptance clause #5919 mapping not explicit

  • Location: test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts:1
  • Category: acceptance
  • Problem: PR body states 'Contributes to Complete the Vitest E2E cutover with job-variant parity evidence #5919' but issue content unavailable. Workflow boundary tests verify: both agents run by default and via selectors; mutations reject missing agent coverage, missing NEMOCLAW_E2E_SECURITY_POSTURE, write permissions, exposed inference key, unsanitized install step. These map to 'dedicated two-agent Vitest lane with isolated artifacts and step-scoped inference credentials' from PR description.
  • Impact: Traceability gap between issue requirements and test evidence
  • Recommended action: Add explicit comment in test file or PR description mapping each acceptance clause to test evidence. If Complete the Vitest E2E cutover with job-variant parity evidence #5919 has specific clauses, enumerate them
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read security-posture-workflow-boundary.test.ts describe blocks and compare to PR body 'Changes' section
  • Missing regression test: Tests exist for each workflow contract property; acceptance mapping is documentation
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read security-posture-workflow-boundary.test.ts describe blocks and compare to PR body 'Changes' section.
  • Evidence: Test file has two describe blocks: 'runs both agent modes by default and through either selector' and 'rejects missing agent coverage, mode drift, and broadly scoped credentials'

PRA-12 Improvement — Missing integration test coverage for assertSecurityPosture branches

  • Location: test/e2e-scenario/support-tests/security-posture.test.ts:1
  • Category: tests
  • Problem: Unit tests cover dangerousCapabilities decoding and env normalization but not the full assertSecurityPosture integration behavior (host check, entrypoint, rc files, proxy env, configure guard, startup log). These are exercised in live tests but only when NEMOCLAW_E2E_SECURITY_POSTURE=1.
  • Impact: No fast-feedback test for security assertion logic; live tests are slow and require full sandbox
  • Suggested action: Add focused integration test (can use mocked sandbox/host clients) for assertSecurityPosture success/failure paths, especially: non-root host failure, dangerous capability retention, rc file mode/owner/guard failures, proxy env failures, configure guard bypass, startup log rc write failure detection
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Check security-posture.test.ts coverage vs assertSecurityPosture branches
  • Missing regression test: New Vitest test file or describe block in security-posture.test.ts with mocked clients covering each assertion branch
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: security-posture.test.ts only tests dangerousCapabilities, securityPostureEnabled, securityPostureExpectations, securityPostureModeEnv — not assertSecurityPosture

PRA-13 Improvement — No test validates agent-specific proxy-env differentiation

  • Location: test/e2e-scenario/live/hermes-e2e.test.ts:530
  • Category: tests
  • Problem: Hermes test calls assertSecurityPosture with agent="hermes" but full-e2e.test.ts calls with agent="openclaw". No test validates that the agent-specific function names (hermes setup vs openclaw configure) and guard messages are correctly differentiated in the proxy-env validation.
  • Impact: Agent-specific guard logic untested in isolation; relies on live E2E only
  • Suggested action: Add unit test for proxy-env validation logic with both agent variants, verifying grep patterns for 'hermes() {' and 'openclaw() {' and guardArg 'setup' vs 'configure'
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read security-posture.ts lines 219-240 for configureGuard and lines 189-215 for proxyEnv
  • Missing regression test: Unit test for proxy-env validation with agent="hermes" and agent="openclaw"
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: proxyEnv validation uses ${functionName}() { grep; configureGuard uses ${functionName} ${guardArg} with different values per agent

PRA-14 Improvement — OPENSHELL_GATEWAY env fallback simplification

  • Location: test/e2e-scenario/fixtures/security-posture.ts:49
  • Category: correctness
  • Problem: OPENSHELL_GATEWAY env fallback (shrink): replace process.env.OPENSHELL_GATEWAY ?? "nemoclaw" with constant "nemoclaw". Net 0 lines. Workflow contract fixes this value.
  • Impact: Reduces cognitive load and theoretical injection surface
  • Suggested action: Apply simplification (PRA-1)
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep OPENSHELL_GATEWAY test/e2e-scenario/fixtures/security-posture.ts
  • Missing regression test: Existing security-posture.test.ts covers fixture behavior
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 49: OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY ?? "nemoclaw"; workflow line 3361 sets OPENSHELL_GATEWAY: nemoclaw

PRA-15 Improvement — workflowPath parameter removal

  • Location: tools/e2e-scenarios/security-posture-workflow-boundary.mts:49
  • Category: correctness
  • Problem: workflowPath parameter (yagni): remove optional parameter from readSecurityPostureWorkflow. Net -1 lines. Single caller uses default.
  • Impact: Reduces maintenance surface and test complexity
  • Suggested action: Apply simplification (PRA-2)
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep -r readSecurityPostureWorkflow test/ tools/
  • Missing regression test: Existing workflow boundary tests validate behavior
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Line 49: function parameter workflowPath = DEFAULT_WORKFLOW_PATH; only caller uses default

PRA-16 Resolve/justify — Legacy-parity fallback for non-root host not fully documented

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:3361
  • Category: correctness
  • Problem: Comment: 'Legacy-parity contract: enforce a non-root host user. PID 1 must stay root long enough to step down child processes, so its uid, bounding set, and NoNewPrivs remain evidence unless an opt-in expectation is set.' This documents a fallback/tolerance for runtime behavior where PID 1 starts as root. The test validates the contract but the source (runtime entrypoint) is not fixed here.
  • Impact: Workaround behavior not fully traced to source; removal condition unclear
  • Recommended action: Document in PR or code: what invalid state is handled (PID 1 initially root), where created (OpenShell sandbox entrypoint), why source cannot be fixed in this PR (legacy parity contract), regression test proving source cannot regress (assertSecurityPosture hostNonRoot/entrypoint checks), and when workaround can be removed (when runtime no longer needs legacy parity)
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read workflow line 3361-3367 and assertSecurityPosture entrypoint validation lines 90-120
  • Missing regression test: assertSecurityPosture already validates hostNonRoot and entrypoint uid != 0 when EXPECT_NON_ROOT_ENTRYPOINT=1
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read workflow line 3361-3367 and assertSecurityPosture entrypoint validation lines 90-120.
  • Evidence: Workflow comment at lines 3361-3367 describes legacy-parity contract; assertSecurityPosture validates uid != 0 when nonRootEntrypoint expectation enabled

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Add negative-path tests for assertSecurityPosture failure modes.
Open items: 0 required · 1 warning · 0 suggestions · 7 test follow-ups
Since last review: 1 prior item resolved · 0 still apply · 1 new item found

Action checklist

  • PRA-1 Resolve or justify: Add negative-path tests for assertSecurityPosture failure modes in test/e2e-scenario/fixtures/security-posture.ts:114
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Add negative-path tests for assertSecurityPosture failure modes
  • PRA-T7 Add or justify test follow-up: Acceptance clause

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify tests test/e2e-scenario/fixtures/security-posture.ts:114 Add targeted mocked support tests for `assertSecurityPosture()` failure paths in this PR. Keep the live workflow matrix, but use mocked `HostCliClient` and `SandboxClient` results for fast deterministic coverage of the bad states.
Review findings by urgency: 0 required fixes, 1 item to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Add negative-path tests for assertSecurityPosture failure modes

  • Location: test/e2e-scenario/fixtures/security-posture.ts:114
  • Category: tests
  • Problem: The PR adds `assertSecurityPosture()` as the central security-posture ratchet, but the changed support tests only cover capability decoding, environment normalization, and workflow YAML mutation checks. They do not exercise the actual assertion function when host or sandbox posture probes return unsafe states.
  • Impact: A later edit could stop failing on a root host, retained dangerous PID 1 capabilities, missing NoNewPrivs, mutable rc files, or a broken proxy-env guard while the current static workflow tests still pass. That weakens confidence in this security boundary without requiring an actual sandbox escape in the test environment.
  • Recommended action: Add targeted mocked support tests for `assertSecurityPosture()` failure paths in this PR. Keep the live workflow matrix, but use mocked `HostCliClient` and `SandboxClient` results for fast deterministic coverage of the bad states.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `test/e2e-scenario/support-tests/security-posture.test.ts`; confirm it calls `assertSecurityPosture()` with mocked host/sandbox clients and asserts rejection for unsafe probe outputs, not just `dangerousCapabilities()` and `securityPostureModeEnv()`.
  • Missing regression test: Add tests that mock: (1) `HostCliClient.command()` returning the root-host UID probe failure; (2) `/proc/1/status` with `CapBnd: 00200000` while `NEMOCLAW_E2E_EXPECT_DROPPED_BOUNDS=1`; (3) `/proc/1/status` with `NoNewPrivs: 0` while `NEMOCLAW_E2E_EXPECT_NO_NEW_PRIVS=1`; (4) `/proc/1/status` with `Uid: 0` while `NEMOCLAW_E2E_EXPECT_NON_ROOT_ENTRYPOINT=1`; and (5) rc/proxy-env probe failures such as `BAD_MODE`, `SYMLINK`, `INLINE_GUARD`, or `MISSING_*` causing `assertSecurityPosture()` to reject.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `test/e2e-scenario/support-tests/security-posture.test.ts`; confirm it calls `assertSecurityPosture()` with mocked host/sandbox clients and asserts rejection for unsafe probe outputs, not just `dangerousCapabilities()` and `securityPostureModeEnv()`.
  • Evidence: `assertSecurityPosture()` throws for unsafe posture states in `test/e2e-scenario/fixtures/security-posture.ts`, while the changed support tests named in the static inventory are `decodes the dangerous Linux capability bits`, `only forwards the explicit security-posture mode`, `normalizes opt-in PID 1 hardening expectations`, and workflow-boundary selector/mutation checks.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Mock `HostCliClient.command()` returning a root-host UID probe failure and assert `assertSecurityPosture()` rejects the host.. The changed behavior crosses workflow dispatch, installer trust boundaries, OpenShell, hosted-inference credential scoping, and sandbox runtime probes. Static workflow tests are useful, but targeted mocked negative tests and live validation evidence are needed for confidence in the security posture ratchet.
  • PRA-T2 Runtime validation — Mock `/proc/1/status` with `CapBnd: 00200000` and `NEMOCLAW_E2E_EXPECT_DROPPED_BOUNDS=1`, then assert `assertSecurityPosture()` rejects retained `CAP_SYS_ADMIN`.. The changed behavior crosses workflow dispatch, installer trust boundaries, OpenShell, hosted-inference credential scoping, and sandbox runtime probes. Static workflow tests are useful, but targeted mocked negative tests and live validation evidence are needed for confidence in the security posture ratchet.
  • PRA-T3 Runtime validation — Mock `/proc/1/status` with `NoNewPrivs: 0` and `NEMOCLAW_E2E_EXPECT_NO_NEW_PRIVS=1`, then assert `assertSecurityPosture()` rejects the missing no-new-privileges state.. The changed behavior crosses workflow dispatch, installer trust boundaries, OpenShell, hosted-inference credential scoping, and sandbox runtime probes. Static workflow tests are useful, but targeted mocked negative tests and live validation evidence are needed for confidence in the security posture ratchet.
  • PRA-T4 Runtime validation — Mock `/proc/1/status` with `Uid: 0` and `NEMOCLAW_E2E_EXPECT_NON_ROOT_ENTRYPOINT=1`, then assert `assertSecurityPosture()` rejects a root PID 1.. The changed behavior crosses workflow dispatch, installer trust boundaries, OpenShell, hosted-inference credential scoping, and sandbox runtime probes. Static workflow tests are useful, but targeted mocked negative tests and live validation evidence are needed for confidence in the security posture ratchet.
  • PRA-T5 Runtime validation — Mock rc/proxy-env probe failures such as `BAD_MODE`, `SYMLINK`, `INLINE_GUARD`, `MISSING_PROXY_ENV`, or `GUARD_DID_NOT_BLOCK` and assert `assertSecurityPosture()` surfaces each as a failure.. The changed behavior crosses workflow dispatch, installer trust boundaries, OpenShell, hosted-inference credential scoping, and sandbox runtime probes. Static workflow tests are useful, but targeted mocked negative tests and live validation evidence are needed for confidence in the security posture ratchet.
  • PRA-T6 Add negative-path tests for assertSecurityPosture failure modes — Add targeted mocked support tests for `assertSecurityPosture()` failure paths in this PR. Keep the live workflow matrix, but use mocked `HostCliClient` and `SandboxClient` results for fast deterministic coverage of the bad states.
  • PRA-T7 Acceptance clause — No trusted linked issue acceptance clauses were available from the deterministic validation context. — add test evidence or identify existing coverage. The validation context reported `linkedIssues: []`. The PR body mentions an issue, but PR-provided text is untrusted scope evidence and no issue body/comments were available to extract literal clauses.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Add negative-path tests for assertSecurityPosture failure modes

  • Location: test/e2e-scenario/fixtures/security-posture.ts:114
  • Category: tests
  • Problem: The PR adds `assertSecurityPosture()` as the central security-posture ratchet, but the changed support tests only cover capability decoding, environment normalization, and workflow YAML mutation checks. They do not exercise the actual assertion function when host or sandbox posture probes return unsafe states.
  • Impact: A later edit could stop failing on a root host, retained dangerous PID 1 capabilities, missing NoNewPrivs, mutable rc files, or a broken proxy-env guard while the current static workflow tests still pass. That weakens confidence in this security boundary without requiring an actual sandbox escape in the test environment.
  • Recommended action: Add targeted mocked support tests for `assertSecurityPosture()` failure paths in this PR. Keep the live workflow matrix, but use mocked `HostCliClient` and `SandboxClient` results for fast deterministic coverage of the bad states.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `test/e2e-scenario/support-tests/security-posture.test.ts`; confirm it calls `assertSecurityPosture()` with mocked host/sandbox clients and asserts rejection for unsafe probe outputs, not just `dangerousCapabilities()` and `securityPostureModeEnv()`.
  • Missing regression test: Add tests that mock: (1) `HostCliClient.command()` returning the root-host UID probe failure; (2) `/proc/1/status` with `CapBnd: 00200000` while `NEMOCLAW_E2E_EXPECT_DROPPED_BOUNDS=1`; (3) `/proc/1/status` with `NoNewPrivs: 0` while `NEMOCLAW_E2E_EXPECT_NO_NEW_PRIVS=1`; (4) `/proc/1/status` with `Uid: 0` while `NEMOCLAW_E2E_EXPECT_NON_ROOT_ENTRYPOINT=1`; and (5) rc/proxy-env probe failures such as `BAD_MODE`, `SYMLINK`, `INLINE_GUARD`, or `MISSING_*` causing `assertSecurityPosture()` to reject.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `test/e2e-scenario/support-tests/security-posture.test.ts`; confirm it calls `assertSecurityPosture()` with mocked host/sandbox clients and asserts rejection for unsafe probe outputs, not just `dangerousCapabilities()` and `securityPostureModeEnv()`.
  • Evidence: `assertSecurityPosture()` throws for unsafe posture states in `test/e2e-scenario/fixtures/security-posture.ts`, while the changed support tests named in the static inventory are `decodes the dangerous Linux capability bits`, `only forwards the explicit security-posture mode`, `normalizes opt-in PID 1 hardening expectations`, and workflow-boundary selector/mutation checks.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@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: 3

🧹 Nitpick comments (1)
test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts (1)

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

Prefer structural workflow mutation over raw YAML text replacement.

This helper makes the test depend on exact indentation and block formatting, so harmless YAML reshuffles can fail the test without changing the boundary contract. Mutate the parsed workflow object, then serialize it back for validation instead.

As per path instructions, "Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions."

Also applies to: 55-64

🤖 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/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts`
around lines 22 - 27, The helper validateCentralWorkflowMutation currently
mutates raw YAML text, making the security posture boundary test brittle to
formatting changes. Update validateCentralWorkflowMutation and the related test
setup to parse the workflow into a structured object, apply mutations to that
object, then serialize it back before calling readSecurityPostureWorkflow and
validateSecurityPostureWorkflow. Keep the assertion focused on the observable
workflow boundary rather than source-text formatting.

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 @.github/workflows/e2e-vitest-scenarios.yaml:
- Around line 3335-3366: Add an explicit least-privilege permissions block to
the security-posture-vitest job so it does not inherit the default GITHUB_TOKEN
scope. Update the job definition identified by security-posture-vitest in the
workflow to declare only the minimal read access it needs, while leaving the
step-scoped inference secret handling unchanged. Keep the job’s security posture
tight by ensuring any values remain passed as data, not expanded into shell
commands.

In `@test/e2e-scenario/fixtures/security-posture.ts`:
- Around line 119-130: The security posture assertions in
securityPostureModeEnv()/the PID 1 checks are reading process.env directly, so
the default enabled posture can be skipped when only
NEMOCLAW_E2E_SECURITY_POSTURE is set. Centralize the expectation defaults by
routing these checks through the same helper-backed mode resolution used for
child commands, and update the non-root/capability/NoNewPrivs branches
(including the non-root-host default at the referenced helper call site) to
honor that resolved default instead of raw env flags.

In `@test/e2e-scenario/support-tests/security-posture.test.ts`:
- Around line 15-20: The afterEach in security-posture.test.ts restores two
environment variables with branching, which triggers the growth guardrail.
Update the env cleanup to be linear and branch-free by using a direct restore
pattern for the originalSecurityPosture and originalExpectNonRootHost values
inside afterEach, while keeping the same behavior in the security-posture test
setup.

---

Nitpick comments:
In `@test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts`:
- Around line 22-27: The helper validateCentralWorkflowMutation currently
mutates raw YAML text, making the security posture boundary test brittle to
formatting changes. Update validateCentralWorkflowMutation and the related test
setup to parse the workflow into a structured object, apply mutations to that
object, then serialize it back before calling readSecurityPostureWorkflow and
validateSecurityPostureWorkflow. Keep the assertion focused on the observable
workflow boundary rather than source-text formatting.
🪄 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: 2c8658f8-23ea-442d-8e5a-23e30587c99c

📥 Commits

Reviewing files that changed from the base of the PR and between c87ff23 and 4b0d63a.

📒 Files selected for processing (7)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/fixtures/security-posture.ts
  • test/e2e-scenario/live/full-e2e.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/security-posture.test.ts
  • tools/e2e-scenarios/security-posture-workflow-boundary.mts

@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

🤖 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/e2e-scenario/fixtures/security-posture.ts`:
- Line 90: The host probe in assertSecurityPosture still unconditionally checks
for a non-root user, which ignores the opt-out supported by
securityPostureExpectations() and securityPostureModeEnv(). Update
assertSecurityPosture() to only enforce the id -u != 0 failure when
expectations.nonRootHost is true, and keep the existing expectations wiring in
securityPostureExpectations() / securityPostureModeEnv() so
NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST=0 is honored consistently.
🪄 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: ab9dd8a8-de0e-4957-95a4-d8f34d3ccb17

📥 Commits

Reviewing files that changed from the base of the PR and between 5faa0de and 9738c04.

📒 Files selected for processing (5)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/fixtures/security-posture.ts
  • test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/security-posture.test.ts
  • tools/e2e-scenarios/security-posture-workflow-boundary.mts
🚧 Files skipped from review as they are similar to previous changes (4)
  • test/e2e-scenario/support-tests/security-posture.test.ts
  • .github/workflows/e2e-vitest-scenarios.yaml
  • tools/e2e-scenarios/security-posture-workflow-boundary.mts
  • test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts

enabled,
noNewPrivileges: enabled && truthy(env.NEMOCLAW_E2E_EXPECT_NO_NEW_PRIVS),
nonRootEntrypoint: enabled && truthy(env.NEMOCLAW_E2E_EXPECT_NON_ROOT_ENTRYPOINT),
nonRootHost: enabled && truthy(env.NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST ?? "1"),

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Honor the nonRootHost expectation in the host probe.

securityPostureExpectations() and securityPostureModeEnv() allow NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST=0, but assertSecurityPosture() still unconditionally requires id -u != 0. Gate only the failure on expectations.nonRootHost, or remove the opt-out if root-host runs should never be supported.

Proposed fix
-  requireSuccess("non-root host user", hostUser);
+  if (expectations.nonRootHost) {
+    requireSuccess("non-root host user", hostUser);
+  }

Also applies to: 100-100, 112-122

🤖 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/e2e-scenario/fixtures/security-posture.ts` at line 90, The host probe in
assertSecurityPosture still unconditionally checks for a non-root user, which
ignores the opt-out supported by securityPostureExpectations() and
securityPostureModeEnv(). Update assertSecurityPosture() to only enforce the id
-u != 0 failure when expectations.nonRootHost is true, and keep the existing
expectations wiring in securityPostureExpectations() / securityPostureModeEnv()
so NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST=0 is honored consistently.

@cv

cv commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

Fresh security-posture runtime validation is in progress on head 552c4650f: two-agent security-posture-vitest run 28397462103.

Advisor dispositions:

  • The non-root host invariant is now fail-closed. Security-posture mode always tests a non-root host and always passes NEMOCLAW_E2E_EXPECT_NON_ROOT_HOST=1; there is no contradictory opt-out.
  • PID 1 uid, bounding-set, and NoNewPrivs checks remain explicit opt-ins because that is the legacy lane contract. NemoClaw PID 1 intentionally starts as root to perform the child-process step-down; this parity PR must not invent stricter expectations that the retired shell lane did not enforce.
  • Keeping the configurable workflow path is necessary for mutation tests, which validate malformed copies without rewriting the repository workflow.
  • The OPENSHELL_GATEWAY override matches the shared E2E client convention and keeps local/non-default gateway runs possible.
  • The proxy-env shell probe remains one trusted sandbox command so mode, owner, symlink, and guard assertions observe one file state without cross-command races.

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28397462103
Workflow ref: codex/e2e-security-posture-parity
Requested scenarios: (default — all supported)
Requested jobs: security-posture-vitest
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
security-posture-vitest ❌ failure

Failed jobs: security-posture-vitest. Check run artifacts for logs.

@cv
cv merged commit 1546c9f into main Jun 29, 2026
112 of 114 checks passed
@cv
cv deleted the codex/e2e-security-posture-parity branch June 29, 2026 19:53
@cv cv mentioned this pull request Jun 29, 2026
9 of 21 tasks
cv added a commit that referenced this pull request Jun 29, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Fix the shared Vitest E2E sandbox client after the exact-head
security-posture run proved that current OpenShell rejects
newline-bearing command arguments. Multiline trusted scripts are now
base64-encoded into one shell argument at the client boundary instead of
requiring every scenario to invent its own minifier.

## Related Issue

Contributes to #5919. Follow-up to merged #6010 and failed live run
[28397462103](https://github.com/NVIDIA/NemoClaw/actions/runs/28397462103).

## Changes

- Preserve direct single-line `sh -lc` arguments.
- Encode multiline trusted scripts as a single newline-free `eval`
argument and decode inside the sandbox.
- Reject NUL-bearing scripts before process construction.
- Add a round-trip contract test for the exact command argument.

## 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: internal E2E transport
compatibility only; no user-facing product behavior changes.
- [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: pending independent
review.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)

Targeted verification:

- `VITEST_MAX_WORKERS=16 npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/e2e-clients.test.ts
test/e2e-scenario/support-tests/security-posture.test.ts`
- `npm run typecheck:cli`
- `make check`
- normal signed commit and push hooks

---
Signed-off-by: Carlos Villela <[email protected]>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of trusted sandbox shell scripts so multiline
scripts are safely passed without raw line breaks.
* Added stricter script validation to reject empty scripts and scripts
containing NUL characters.
* Updated shell execution behavior to reduce the risk of malformed
command arguments when running scripts.

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

Signed-off-by: Carlos Villela <[email protected]>
@miyoungc miyoungc mentioned this pull request Jun 30, 2026
8 of 21 tasks
jyaunches pushed a commit that referenced this pull request Jun 30, 2026
## Summary
Refreshes the v0.0.70 release docs from the release announcement and the
`v0.0.69..v0.0.70` commit range.
It also documents the `channels start` policy restoration behavior that
was missing from the shared OpenClaw and Hermes command references, and
bumps the Fern CLI version used for docs validation.

## Changes
- Replaced the stale `v0.0.70` release-notes entry with the actual
release themes, including CLI, onboarding, inference, messaging,
Windows, documentation, and release-validation changes.
- Documented that `channels start` reapplies the matching built-in
network policy preset before rebuild and rolls back to disabled if
policy restoration fails.
- Bumped `fern/fern.config.json` from `5.55.0` to `5.59.0` for the docs
refresh.
- Source summary:
- #5754 -> `docs/about/release-notes.mdx`: Notes Docker Desktop gateway
bridge retry behavior during onboarding.
- #5930 -> `docs/about/release-notes.mdx`: Links `nemoclaw use` default
sandbox selection to the command reference.
- #5948 -> `docs/about/release-notes.mdx`: Links reasoning-compatible
endpoint validation to inference documentation.
- #5950 -> `docs/about/release-notes.mdx`: Links Windows bootstrap WSL
recovery behavior to Windows preparation and troubleshooting docs.
- #5856 -> `docs/about/release-notes.mdx`: Notes rebuilt policy preset
registry repair.
- #5882 and #5949 -> `docs/about/release-notes.mdx`: Notes Hermes stale
base-image state repair.
- #6016 -> `docs/reference/commands.mdx`,
`docs/reference/commands-nemohermes.mdx`, and
`docs/manage-sandboxes/messaging-channels.mdx`: Documents channel policy
restoration and rollback on `channels start`.
- #5859 -> `docs/about/release-notes.mdx`: Links quickstart network
approval guidance.
- #5863 -> `docs/about/release-notes.mdx`: Links Teams allowlist
guidance in the messaging page.
- #5756, #5926, #6010, and #6011 -> `docs/about/release-notes.mdx`:
Summarizes the Vitest E2E validation cutover.

## 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
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: doc-only prose refresh with
no runtime behavior change.
- [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:

## Verification
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [ ] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)
- [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)

`npm run docs` exited 0 and Fern reported one existing light-mode accent
contrast warning.
`fern check --warnings` confirmed the warning is the site theme contrast
ratio, not content introduced by this PR.

---
Signed-off-by: Miyoung Choi <[email protected]>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Promote the frozen security-posture checks into a dedicated two-agent
Vitest lane before the legacy E2E retirement. This gives OpenClaw and
Hermes the same non-root, capability, policy, and secret-boundary proof
under one reviewable workflow contract.

## Related Issue

Contributes to NVIDIA#5919.

## Changes

- Extract shared security-posture assertions into a typed E2E fixture.
- Exercise the assertions from the OpenClaw and Hermes live tests.
- Add a default-enabled, two-agent workflow matrix with isolated
artifacts and step-scoped inference credentials.
- Add focused support tests and a workflow mutation ratchet for agent
coverage, mode configuration, action pinning, and credential scope.

## 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: internal E2E coverage and
workflow wiring only; no product behavior or user-facing interface
changes.
- [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: the new job withholds
Docker credentials, scopes NVIDIA_INFERENCE_API_KEY to the live test
step, sanitizes the OpenShell install environment, pins actions by full
SHA, and uploads only its isolated artifact roots.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)

Targeted verification:

- `VITEST_MAX_WORKERS=16 npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/security-posture.test.ts
test/e2e-scenario/support-tests/security-posture-workflow-boundary.test.ts`
- `npm run typecheck:cli`
- normal commit and push hooks

---
Signed-off-by: Carlos Villela <[email protected]>


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

* **New Features**
* Added security posture validation to supported agent end-to-end runs,
with posture results included in scenario reporting.
* Introduced a dedicated security-posture Vitest job that runs for both
agent variants and uploads agent-specific artifacts.
* **Bug Fixes**
* Strengthened checks to ensure host/sandbox posture and runtime guard
behavior are correctly enforced when enabled.
* **Tests**
* Added new end-to-end security posture fixtures and unit coverage for
posture helper behavior and env normalization.
* Added workflow boundary tests to verify the security-posture job is
correctly dispatched and securely configured.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <[email protected]>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Fix the shared Vitest E2E sandbox client after the exact-head
security-posture run proved that current OpenShell rejects
newline-bearing command arguments. Multiline trusted scripts are now
base64-encoded into one shell argument at the client boundary instead of
requiring every scenario to invent its own minifier.

## Related Issue

Contributes to NVIDIA#5919. Follow-up to merged NVIDIA#6010 and failed live run
[28397462103](https://github.com/NVIDIA/NemoClaw/actions/runs/28397462103).

## Changes

- Preserve direct single-line `sh -lc` arguments.
- Encode multiline trusted scripts as a single newline-free `eval`
argument and decode inside the sandbox.
- Reject NUL-bearing scripts before process construction.
- Add a round-trip contract test for the exact command argument.

## 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: internal E2E transport
compatibility only; no user-facing product behavior changes.
- [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: pending independent
review.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)

Targeted verification:

- `VITEST_MAX_WORKERS=16 npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/e2e-clients.test.ts
test/e2e-scenario/support-tests/security-posture.test.ts`
- `npm run typecheck:cli`
- `make check`
- normal signed commit and push hooks

---
Signed-off-by: Carlos Villela <[email protected]>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of trusted sandbox shell scripts so multiline
scripts are safely passed without raw line breaks.
* Added stricter script validation to reject empty scripts and scripts
containing NUL characters.
* Updated shell execution behavior to reduce the risk of malformed
command arguments when running scripts.

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

Signed-off-by: Carlos Villela <[email protected]>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Refreshes the v0.0.70 release docs from the release announcement and the
`v0.0.69..v0.0.70` commit range.
It also documents the `channels start` policy restoration behavior that
was missing from the shared OpenClaw and Hermes command references, and
bumps the Fern CLI version used for docs validation.

## Changes
- Replaced the stale `v0.0.70` release-notes entry with the actual
release themes, including CLI, onboarding, inference, messaging,
Windows, documentation, and release-validation changes.
- Documented that `channels start` reapplies the matching built-in
network policy preset before rebuild and rolls back to disabled if
policy restoration fails.
- Bumped `fern/fern.config.json` from `5.55.0` to `5.59.0` for the docs
refresh.
- Source summary:
- NVIDIA#5754 -> `docs/about/release-notes.mdx`: Notes Docker Desktop gateway
bridge retry behavior during onboarding.
- NVIDIA#5930 -> `docs/about/release-notes.mdx`: Links `nemoclaw use` default
sandbox selection to the command reference.
- NVIDIA#5948 -> `docs/about/release-notes.mdx`: Links reasoning-compatible
endpoint validation to inference documentation.
- NVIDIA#5950 -> `docs/about/release-notes.mdx`: Links Windows bootstrap WSL
recovery behavior to Windows preparation and troubleshooting docs.
- NVIDIA#5856 -> `docs/about/release-notes.mdx`: Notes rebuilt policy preset
registry repair.
- NVIDIA#5882 and NVIDIA#5949 -> `docs/about/release-notes.mdx`: Notes Hermes stale
base-image state repair.
- NVIDIA#6016 -> `docs/reference/commands.mdx`,
`docs/reference/commands-nemohermes.mdx`, and
`docs/manage-sandboxes/messaging-channels.mdx`: Documents channel policy
restoration and rollback on `channels start`.
- NVIDIA#5859 -> `docs/about/release-notes.mdx`: Links quickstart network
approval guidance.
- NVIDIA#5863 -> `docs/about/release-notes.mdx`: Links Teams allowlist
guidance in the messaging page.
- NVIDIA#5756, NVIDIA#5926, NVIDIA#6010, and NVIDIA#6011 -> `docs/about/release-notes.mdx`:
Summarizes the Vitest E2E validation cutover.

## 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
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: doc-only prose refresh with
no runtime behavior change.
- [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:

## Verification
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [ ] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)
- [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)

`npm run docs` exited 0 and Fern reported one existing light-mode accent
contrast warning.
`fern check --warnings` confirmed the warning is the site theme contrast
ratio, not content introduced by this PR.

---
Signed-off-by: Miyoung Choi <[email protected]>
@wscurran wscurran added the area: ci CI workflows, checks, release automation, or GitHub Actions label Aug 1, 2026
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: security Security controls, permissions, secrets, or hardening integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior labels Aug 1, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Aug 4, 2026
12 of 22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: security Security controls, permissions, secrets, or hardening integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants