Skip to content

test(images): verify historical OpenClaw security revisions#7294

Merged
apurvvkumaria merged 2 commits into
mainfrom
codex/test-openclaw-historical-security-revision
Jul 21, 2026
Merged

test(images): verify historical OpenClaw security revisions#7294
apurvvkumaria merged 2 commits into
mainfrom
codex/test-openclaw-historical-security-revision

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an independent, opt-in container E2E verifier for the historical OpenClaw security revision image produced by #7276. Normal CI validates the harness contracts; configured live execution checks supported state selectors, the reviewed Slack dependency remediation, transactional state and credential restoration, and fail-closed rejection of a state directory outside HOME.

Related Issue

Related to #7272. Validates #7276. PR #7276 must merge before this PR can merge.

Changes

  • Add a hermetic-by-default integration contract with an explicitly enabled live Docker lane.
  • Resolve the configured candidate image to an immutable image ID and run it non-root, read-only, capability-dropped, resource-bounded, and without host mounts or Docker socket access.
  • Pack the exact integrity-pinned @openclaw/slack@2026.6.10 archive and verify Axios, https-proxy-agent, and agent-base remediation across profile, development, and in-home custom-state selectors.
  • Prove failed post-install remediation restores prior state and credentials, and prove an outside-home state directory is rejected before the original installer runs.
  • Record structured image identity and assertion evidence for the live run.

This PR covers the runtime wrapper and plugin-remediation boundary. The focused tests in #7276 remain responsible for its historical-version, tar-graph, workflow, and multi-architecture contracts.

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: test-only verification; no command, flag, default, configuration, API, or policy behavior 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: pending maintainer review
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

DGX Station Hardware Evidence

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

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project integration test/historical-openclaw-security-revision-container-e2e.test.ts (7 passed, live candidate lane explicitly skipped until configured)
  • Applicable broad gate passed — CI pending; local typecheck and repository structural gates passed
  • 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)

Merge Dependencies

Human review can proceed now, but #7294 must not merge until all items below are complete:


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

Summary by CodeRabbit

  • Tests
    • Added an end-to-end test suite for the “historical security revision” Docker wrapper contract.
    • Validates reviewed plugin remediation outcomes, evidence output, and approved dependency versions.
    • Ensures hardened container execution settings and enforces safety checks that reject unsafe state directories.
    • Covers successful remediation, remediation failure behavior, and safeguards against running the installer in invalid contexts.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria apurvvkumaria added area: security Security controls, permissions, secrets, or hardening v0.0.91 Release target labels Jul 21, 2026
@apurvvkumaria apurvvkumaria self-assigned this Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1df1e1c1-5c0e-4032-8efb-16a674d91e34

📥 Commits

Reviewing files that changed from the base of the PR and between 8c1c3b2 and fcee7ca.

📒 Files selected for processing (1)
  • test/historical-openclaw-security-revision-container-e2e.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/historical-openclaw-security-revision-container-e2e.test.ts

📝 Walkthrough

Walkthrough

Adds an opt-in Vitest E2E suite that runs hardened Docker scenarios for OpenClaw security remediation, validates dependency and state evidence, and covers successful, failed, and outside-home installation cases.

Changes

Historical security revision E2E

Layer / File(s) Summary
Test contracts and installation configuration
test/historical-openclaw-security-revision-container-e2e.test.ts
Defines typed models, supported installation cases, Docker image gating, container-name sanitization, and per-case install arguments.
Container probes and hardened execution
test/historical-openclaw-security-revision-container-e2e.test.ts
Adds bounded state inspection, installer markers, evidence emission, and least-privilege Docker command construction.
Evidence validation and Docker scenarios
test/historical-openclaw-security-revision-container-e2e.test.ts
Tests evidence contracts and executes successful remediation, post-install failure, and outside-home state scenarios with artifact output and assertion flags.

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

Sequence Diagram(s)

sequenceDiagram
  participant TestSuite
  participant FixtureLoader
  participant DockerContainer
  participant EvidenceValidator
  TestSuite->>FixtureLoader: Load reviewed plugin archive
  TestSuite->>DockerContainer: Run remediation scenario
  DockerContainer-->>TestSuite: Emit evidence and installer markers
  TestSuite->>EvidenceValidator: Validate remediation outcome
  EvidenceValidator-->>TestSuite: Return contract assertion result
Loading

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#7286: Introduces the remediation behavior and dependency versions exercised by these Docker tests.
  • NVIDIA/NemoClaw#7137: Changes tmpfs mount preservation and recreation behavior validated by the suite.
  • NVIDIA/NemoClaw#7289: Adds related opt-in Docker security-revision contract tests with structured evidence validation.

Suggested labels: integration: openclaw, area: e2e

Suggested reviewers: jyaunches, cjagwani

🚥 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 is concise and clearly describes the new image test verifying historical OpenClaw security revisions.
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/test-openclaw-historical-security-revision

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

@github-code-quality

github-code-quality Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit fcee7ca in the codex/test-openclaw-... branch remains at 96%, unchanged from commit d3d5171 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit fcee7ca in the codex/test-openclaw-... branch remains at 80%, unchanged from commit d3d5171 in the main branch.

Show a code coverage summary of the most impacted files.
File main d3d5171 codex/test-openclaw-... fcee7ca +/-
src/lib/state/g...way-registry.ts 95% 94% -1%
src/lib/sandbox...rce-identity.ts 91% 91% 0%
src/lib/state/m...ock-identity.ts 95% 95% 0%
src/lib/tunnel/services.ts 73% 73% 0%
src/lib/state/m...-acquisition.ts 84% 89% +5%

Updated July 21, 2026 18:31 UTC

@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/historical-openclaw-security-revision-container-e2e.test.ts`:
- Around line 799-800: Adjust the overall Vitest timeout near the 20-minute
value so it exceeds the seven sequential hardened-container runs governed by
RUN_TIMEOUT_MS, plus image inspection, packaging, fixture-loader, and volume
setup overhead. Preserve the existing per-docker-run timeout and ensure slow
runs reach their intended individual timeout before the enclosing test expires.
🪄 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: 6f42a88a-54e6-46f5-8361-03f506b2830b

📥 Commits

Reviewing files that changed from the base of the PR and between d5fa194 and 8c1c3b2.

📒 Files selected for processing (1)
  • test/historical-openclaw-security-revision-container-e2e.test.ts

Comment thread test/historical-openclaw-security-revision-container-e2e.test.ts Outdated
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: PR review advisor failed: PR review advisor SDK execution failed: session: tests-regressions-analysis omitted required analysis; turn: tests-regressions-analysis: tests-regressions-analysis omitted required analysis

Model lanes

  • GPT-5.6 Terra (primary): Failed
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions

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

E2E guidance

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

Recommended E2E: None

Workflow run details

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

@senthilr-nv senthilr-nv added v0.0.92 v0.0.91 Release target and removed v0.0.91 Release target v0.0.92 labels Jul 21, 2026
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria
apurvvkumaria merged commit 0f743a5 into main Jul 21, 2026
75 of 76 checks passed
@apurvvkumaria
apurvvkumaria deleted the codex/test-openclaw-historical-security-revision branch July 21, 2026 19:35
cv pushed a commit that referenced this pull request Jul 22, 2026
<!-- markdownlint-disable MD041 -->
## Summary

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

## Changes

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

Source summary:

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

## Type of Change

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

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates dated changelog structure, SPDX
syntax, version ordering, and published routes.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable; this documentation-only PR does not
change Station preparation or runtime behavior.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` (6 passed).
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not run; this is a focused
documentation-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors and 2 existing site-wide warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

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


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

## Summary by CodeRabbit

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

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

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: cjagwani <cjagwani@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: security Security controls, permissions, secrets, or hardening v0.0.91 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants