Skip to content

fix(images): keep security inventory usable in reduced contexts - #13578

Merged
rsliter merged 3 commits into
mainfrom
codex/fix-staging-launchable-inventory-context
Oct 21, 2026
Merged

rsliter merged 3 commits into
mainfrom
codex/fix-staging-launchable-inventory-context

Conversation

@rsliter

@rsliter rsliter commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Staging Brev Launchable image builds can consume NemoClaw's reduced build contexts again. The final OpenClaw and Hermes image checks still verify the same pinned security package inventories.

Reason

The nemoclaw-image producer includes scripts/ in its reduced build contexts but excludes src/lib/sandbox-base-image/security-package-specs.ts. NemoClaw's final Dockerfiles began requiring that source file after #13513, so the image build stops before publication.

Changes

  • Add a standalone security package inventory renderer under scripts/ for the final image checks. A regression test compares its output with the canonical package specs across profiles and architectures. Leave the shared renderer unchanged so Pi qualification receipts do not need refreshing.
  • Remove the unavailable src/ mount and copy from the final OpenClaw and Hermes Dockerfiles. Admit the standalone source in the optimized OpenClaw and Hermes portable build contexts and refresh the exact dashboard Dockerfile instruction digest.
  • Follow up in brevdev/nemoclaw-image during normal business hours to update its context assembly and validation. This PR changes only NVIDIA/NemoClaw.

Verification

  • Security inventory and optimized context focused tests: 149 passed, 2 skipped.
  • Hermes portable context: 27 passed. Portable installer admission: 3 passed.
  • Remote dashboard bind lifecycle focused test: passed.
  • Repository pre-commit, commit-msg, and credential-isolated pre-push checks: passed.
  • Published head ff5b9fa7a0b15e47367005a657a5b7dc54c112ca is signed and GitHub Verified. Exact-head CI and automated review are pending.
  • Diff contains no secrets, API keys, or credentials.

Review notes

The review on the previous head identified a real Hermes portable context blocker (P1) and a Pi receipt gate (P2). The latest head updates the portable COPY allowlist and file inventory for P1. It avoids the Pi input change altogether for P2 by leaving the shared renderer unchanged. The latest head also updates the remote dashboard's exact Dockerfile instruction check.


Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com

Summary by CodeRabbit

  • Security

    • Added standalone security-package inventory verification for sandbox, OpenClaw, and Hermes-compatible environments.
    • Validates package versions, inventory integrity, file ownership, permissions, and supported architectures.
    • Hermes-compatible checks support pinned inventory variations where applicable.
  • Builds

    • Updated sandbox and Hermes image builds to include the standalone security inventory verification.
  • Tests

    • Added coverage for profile-specific inventories, architecture-specific output, and isolated probe execution.

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
@rsliter rsliter self-assigned this Oct 21, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 4b801bc4-13b5-406c-9521-ca4bf338fe4a
📥 Commits

Reviewing files that changed from the base of the PR and between 5af1ad0 and ff5b9fa.

📒 Files selected for processing: 9
  • Dockerfile
  • agents/hermes/Dockerfile
  • scripts/security/standalone-security-package-inventory.mts
  • src/lib/onboard/dockerfile-remote-dashboard-bind-contract.ts
  • src/lib/onboard/experimental/hermes-portable-build-context-files.ts
  • src/lib/onboard/experimental/hermes-portable-build-context.ts
  • src/lib/sandbox/build-context.ts
  • test/runtime/sandbox/sandbox-base-security-packages.test.ts
  • test/runtime/sandbox/sandbox-build-context.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The change adds a standalone security inventory script with package inventories and verification probes. Dockerfiles and build contexts now use the script, and tests cover its output for supported profiles and architectures, as well as its staging.

Changes: Security inventory verification

Layer / File(s) Summary
Define inventories and validate packages
scripts/security/standalone-security-package-inventory.mts, test/runtime/sandbox/sandbox-base-security-packages.test.ts
The script defines package inventories for sandbox, OpenClaw, and Hermes-compatible profiles. It generates probes that check inventory files and installed package versions. Tests verify probe output and architecture-specific inventories.
Update build inputs and staging
Dockerfile, agents/hermes/Dockerfile, src/lib/onboard/dockerfile-remote-dashboard-bind-contract.ts, src/lib/onboard/experimental/hermes-portable-build-context-files.ts, src/lib/onboard/experimental/hermes-portable-build-context.ts, src/lib/sandbox/build-context.ts, test/runtime/sandbox/sandbox-build-context.test.ts
Dockerfiles and build contexts now use the standalone script instead of the previous inventory and specification sources. The instruction validator accepts the reviewed probe digest. Build-context tests verify staging.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: prekshivyas

Merge Risk: ⚪ Minimal · up to ff5b9

No actionable build or inventory-verification issue remains from this review; the PR is ready for normal merge checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 describes the main change: keeping the security inventory usable in reduced build contexts.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Checkov (3.3.20)
Dockerfile

Checkov output exceeded the maximum buffer for this file

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

@rsliter
rsliter marked this pull request as ready for review October 21, 2026 03:54
@github-code-quality

github-code-quality Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/fix-staging-la... ff5b9fa +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd codex/fix-staging-la... ff5b9fa +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd codex/fix-staging-la... ff5b9fa +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/fix-staging-la... ff5b9fa +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/actions...ess-recovery.ts 65% 81% +16%
src/lib/state/l...diness-lease.ts 66% 83% +17%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/inferen...er/lifecycle.ts 0% 72% +72%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 21, 2026 04:42 UTC

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>

@sandl99 sandl99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed commit 5af1ad0ca7bfec3b21736723d24fea2359430e4f. Please address these two blockers before merging.

  1. [P1] Update the Hermes portable context allowlist with the Dockerfile change. Removing the security-package-specs.ts COPY at agents/hermes/Dockerfile:48 leaves LOCAL_COPY_SOURCES in src/lib/onboard/experimental/hermes-portable-build-context.ts requiring that source. parseDockerfileSources() compares the complete source lists and throws Dockerfile local COPY sources disagree with the reviewed allowlist, which blocks portable onboarding during context creation. Update the reviewed COPY allowlist and reconcile the affected portable context file inventory in the same change.

  2. [P2] Refresh Pi qualification receipts for the shared image input change. scripts/security/security-package-inventory.mts:4 changes a direct input to the Pi images. The repository gate rejects this commit because neither qualification receipt was refreshed. Publish matching Linux AMD64 and ARM64 Pi candidates from one commit and workflow run, update both ci/pi-agent-qualification-v1-linux-*.json receipts, and update their authority digests.

Validation performed:

  • All 136 tests in test/runtime/sandbox/sandbox-base-security-packages.test.ts passed locally.
  • The focused captures the exact allowlist from an ordinary primary Git clone (#9203) test fails with this PR's Hermes Dockerfile and passes with the base Dockerfile. The experiment restored the PR file afterward.
  • GITHUB_BASE_REF=main node scripts/checks/pi-qualification-receipt-refresh.mts reproduces the missing-receipts failure.
  • CI corroborates both findings: installer-integration and static-checks.

Security rubric: PASS for secrets and credentials, input validation, authentication and authorization, dependencies, error handling and logging, cryptography and data protection, and configuration. The change preserves package pins, input constraints, inventory metadata checks, and failure propagation; it adds no credential or authorization surface. WARNING for security testing because Pi qualification remains incomplete, and system security because the portable context transition is blocked. No additional security vulnerability found.

Reviewed all four changed files: Dockerfile, agents/hermes/Dockerfile, scripts/security/security-package-inventory.mts, and test/runtime/sandbox/sandbox-base-security-packages.test.ts. Image-build qualification was still running at the time of review.

@sandl99 sandl99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Follow-up review of commit ff5b9fa7a0b15e47367005a657a5b7dc54c112ca: both findings from my previous review are resolved. No additional code findings.

  • P1 resolved: the Hermes Dockerfile, portable COPY allowlist, and portable file inventory consistently use the standalone renderer. All 27 portable build-context tests and all 3 portable installer admission tests passed locally.
  • P2 resolved: the shared renderer, canonical package specs, and Pi Dockerfiles are unchanged from the PR base. The new standalone renderer is outside Pi's direct inputs, and the Pi qualification receipt gate now exits successfully without receipt changes.
  • The optimized OpenClaw context includes the new renderer. Its output matches the canonical probes for all three profiles and inventories for both supported architectures.
  • The dashboard instruction digest matches the updated completed-image verification instruction. Dashboard lifecycle tests retain rejection coverage for configuration rewrites and custom Dockerfile exposure.

Local validation: 212 tests passed, 2 skipped across security inventories, sandbox build contexts, Hermes portable contexts, installer admission, dashboard request policy, and dashboard lifecycle. The two skipped checks require Docker/Buildx capabilities unavailable on this host. git diff --check also passed. The installer integration CI job passed on this commit.

Security assessment:

Category Verdict and reason
Secrets and credentials PASS — no new credential flow or disclosure
Input validation and sanitization PASS — package constraints preserved; standalone output matches canonical output
Authentication and authorization PASS — portable source checks and dashboard exposure restrictions remain enforced
Dependencies PASS — no new dependencies or changed package pins
Error handling and logging PASS — inventory and context failures continue to stop the operation
Cryptography and data protection PASS — reviewed dashboard instruction uses SHA-256; no data protection change
Configuration PASS — inventory ownership/mode checks and restrictive runtime defaults preserved
Security testing WARNING — focused checks pass; managed-image and live qualification evidence is still pending
System security PASS — portable context composition is repaired and Pi inputs remain unchanged

Reviewed all nine changed files: Dockerfile, agents/hermes/Dockerfile, scripts/security/standalone-security-package-inventory.mts, src/lib/onboard/dockerfile-remote-dashboard-bind-contract.ts, both src/lib/onboard/experimental/hermes-portable-build-context*.ts files, src/lib/sandbox/build-context.ts, and both changed sandbox integration test files.

CI has no reported failures at the time of this review, but static checks, image builds, live qualification, and other jobs are still running. Merge readiness remains subject to those results.

@sandl99

sandl99 commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Advisor follow-up for commit ff5b9fa7a0b15e47367005a657a5b7dc54c112ca: I inspected all nine specialist artifacts from manual run 39544168948.

The architecture, delivery, migration, and security reports repeat one claim: that scripts/security/security-package-inventory.mts changed and requires new Pi qualification receipts. That claim is a false positive for this commit.

Evidence:

  • git diff c1dda570ebf6421467930d33d3f8ff9f82ad1327 ff5b9fa7a0b15e47367005a657a5b7dc54c112ca -- scripts/security/security-package-inventory.mts src/lib/sandbox-base-image/security-package-specs.ts agents/pi/Dockerfile agents/pi/Dockerfile.base is empty.
  • The new file is scripts/security/standalone-security-package-inventory.mts. Neither Pi Dockerfile consumes it.
  • Calling checkPiQualificationReceiptRefresh({baseBranch:"main"}) in the reviewed checkout returns unaffected; the check exits successfully.
  • The reduction and verification specialists independently identify this resolution in their reports. The remaining reports carry forward the previous commit's Pi finding.

Disposition: deduplicate the four reports as one false positive. No Pi receipt refresh or code change is required for this PR's current diff. The manual Advisor blocker gate failed on those reports. CI and the scheduled review after green CI must still finish before the conditionally requested approval.

@rsliter

rsliter commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer disposition for ff5b9fa7a0b15e47367005a657a5b7dc54c112ca: waive the four duplicate Pi qualification findings from Advisor run 39544168948 as false positives for this head.

Architecture ownership, delivery/workflow causality, migration completion, and security each recorded the same P1 claim: that this PR changes scripts/security/security-package-inventory.mts, requiring new Pi AMD64/ARM64 receipts. None was recorded as P0.

The claim does not match the final PR diff against base c1dda570ebf6421467930d33d3f8ff9f82ad1327:

  • The shared renderer has the identical Git blob f4a458f13eba2dae6c9215bc3a62f12e982cbd7d at both base and head.
  • The canonical package specs and both Pi Dockerfiles are unchanged.
  • The new standalone-security-package-inventory.mts is used by the OpenClaw/Hermes final-image paths and is not a direct Pi image input.
  • GITHUB_BASE_REF=main node scripts/checks/pi-qualification-receipt-refresh.mts passed locally for this head against the recorded base before refreshing the local comparison ref.
  • The independent follow-up review confirms that the Pi receipt trigger is removed and the original portable-context blocker is fixed.

These findings appear to treat the restoration of the shared renderer relative to the first PR commit as a remaining change relative to the PR base. No Pi receipt refresh or Pi image publication is required for this repair. This disposition covers only those four findings. CI, image qualification, and applicable E2E validation remain required.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit ff5b9fa. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@sandl99

sandl99 commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Disposition of the automatic Advisor review for ff5b9fa7a0b15e47367005a657a5b7dc54c112ca (run 39545489825):

All nine specialist jobs completed. Architecture, migration, and reduction each report the same concern: future drift between the standalone inventory renderer and the canonical source. The other six specialists report no P0/P1 findings.

I classify the three reports as one advisory maintainability concern, rather than a current P1 behavior or security defect. The added tests execute the standalone file without src/ and compare its complete probe output for all three profiles, plus inventory output for both architectures, with the canonical implementation. A one-sided update fails those tests. The current outputs match, and the focused suites passed. No current divergence or bypass is demonstrated.

Staging the canonical source would remove duplication, but it would require changing the external reduced-context producer that this repair is intended to accommodate. That can be considered in the producer follow-up already described in this PR.

The automated blocker gate nevertheless failed. Approval remains withheld under the requested all-checks-pass condition; the final runtime-activation jobs are also still running.

@rsliter
rsliter merged commit 41f72b5 into main Oct 21, 2026
@rsliter
rsliter deleted the codex/fix-staging-launchable-inventory-context branch October 21, 2026 05:27
rsliter added a commit that referenced this pull request Oct 21, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

Documents the native local provider profile warning restored by merged
PR #13564 in the v0.0.137 cumulative documentation change.

## Reason

The release entry and provider validation guide need to explain that
native local provider attachment can succeed while a follow-up profile
check warns about drift or an incomplete export.

### Related issues

Relates to #13557.

## Changes

- Scope the post-attachment verification warning to native local
provider onboarding in the provider validation guide.
- Add the user-facing change to the dated v0.0.137 release entry and
link merged PR #13564.

## Verification

- `npm run docs` on `c52aed19ab37e57ede5497a9df5225b390d5933e`: passed
with zero Fern errors and 125 published routes.
- `git diff --check`, pre-commit, commit-msg, and pre-push hooks:
passed.
- Independent documentation writer review of the exact two-page diff at
`c52aed19ab37e57ede5497a9df5225b390d5933e`: no blockers. The review
confirmed the PR #13564 implementation and guide-variant scope.
- [Advisor run
39550779577](https://github.com/NVIDIA/NemoClaw/actions/runs/39550779577)
found that the prior head's profile-verification wording was too broad.
This commit narrows the claim to the native local CLI adapter and
removes a mistaken attribution to the separate experimental runtime
identity workflow. All nine prior-head Advisor specialists recommended
no additional E2E selector; the new head will be evaluated separately.
- Repository-owned documentation catch-up [run
39549630158](https://github.com/NVIDIA/NemoClaw/actions/runs/39549630158)
approved the preceding automated cumulative patch for main
`41f72b5ec8c0d07e46ae9ebfac9bf9efdff5b28b`.
- All four published PR commits are GitHub Verified. The diff contains
no secrets, API keys, or credentials.

## Review notes

PR #13578 repairs the reduced-context base-image security inventory
without changing the documented user behavior. Experimental Portable E2E
work from PR #13491 is excluded from public documentation by
`docs/.docs-skip`.

---
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
@wscurran wscurran added area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images labels Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Packages, images, registries, installers, or distribution area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants