Repository navigation
Labels
NV QABugs found by the NVIDIA QA Teamarea: sandboxOpenShell sandbox lifecycle, runtime, config, or recoveryplatform: ubuntuAffects Ubuntu Linux environments
Description
Description
Description
nemoclaw shields status reads only the host-side declarative state file (~/.nemoclaw/state/shields-.json) and does not cross-check the actual sandbox filesystem. After a host-root actor (docker exec / kubectl exec as root) reverts /sandbox/.openclaw perms from 444 root:root back to 660 sandbox:sandbox, shields status continues to report "UP (lockdown active)" with no drift signal, and the sandbox uid can then write openclaw.json undetected. Guards against the declared-vs-actual state divergence described in DevTest T5997825.Environment
Device: Ubuntu 24.04 x86_64 dev host OS: Ubuntu 24.04.4 LTS Architecture: x86_64 Node.js: v22.22.2 npm: 10.9.7 Docker: 29.4.1 OpenShell CLI: openshell 0.0.44 NemoClaw: v0.0.50-50-g206737f83 OpenClaw: 2026.5.18Steps to Reproduce
1. Onboard a sandbox.
2. nemoclaw my-assistant shields up
3. nemoclaw my-assistant shields status
→ "Shields: UP (lockdown active)" / "Policy: restrictive"
4. Confirm baseline perms inside sandbox:
CTR=$(docker ps --filter name=openshell-my-assistant -q)
docker exec "$CTR" stat -c "%a %U:%G %n" \
/sandbox/.openclaw /sandbox/.openclaw/openclaw.json /sandbox/.openclaw/.config-hash
→ 755 root:root /sandbox/.openclaw
444 root:root /sandbox/.openclaw/openclaw.json
444 root:root /sandbox/.openclaw/.config-hash
5. Host-root tamper via docker exec:
docker exec "$CTR" bash -c '
chmod 2770 /sandbox/.openclaw
chown sandbox:sandbox /sandbox/.openclaw
chmod 660 /sandbox/.openclaw/openclaw.json /sandbox/.openclaw/.config-hash
chown sandbox:sandbox /sandbox/.openclaw/openclaw.json /sandbox/.openclaw/.config-hash
'
6. nemoclaw my-assistant shields status
→ still "Shields: UP (lockdown active)" (DRIFT NOT DETECTED)
7. Confirm config is now mutable from sandbox uid:
docker exec --user sandbox "$CTR" bash -c \
'echo TAMPERED > /sandbox/.openclaw/openclaw.json; echo exit=$?'
→ exit=0 (write succeeded)
8. nemoclaw my-assistant shields status
→ still "Shields: UP (lockdown active)" (post-tamper-write drift still undetected)
Expected Result
At steps 6 and 8, shields status MUST surface drift between declared state (host JSON: shieldsDown=false) and actual sandbox filesystem state (660 sandbox:sandbox, mutable). Any of the following is acceptable: - "Shields: UP (DRIFTED)" / "INCONSISTENT" - "Shields: UP (verification failed: openclaw.json mode 660, expected 444)" - Non-zero exit code with a clear error The status MUST NOT continue reporting a clean "UP (lockdown active)".Actual Result
Step 6 (after host-root tamper, before write): Shields: UP (lockdown active) Policy: restrictive exit=0 Step 7 (sandbox uid write succeeds): exit=0 cat /sandbox/.openclaw/openclaw.json → TAMPERED Step 8 (after actual tampering write): Shields: UP (lockdown active) Policy: restrictive exit=0 The status command never reads the sandbox filesystem — it only reflects the host-side ~/.nemoclaw/state/shields-.json declarative state.
Bug Details
| Field | Value |
|---|---|
| Priority | Unprioritized |
| Action | Dev - Open - To fix |
| Disposition | Open issue |
| Module | Machine Learning - NemoClaw |
| Keyword | NemoClaw, NEMOCLAW_GH_SYNC_APPROVAL, NemoClaw_Security |
[NVB#6222239]
Metadata
Metadata
Assignees
Labels
NV QABugs found by the NVIDIA QA Teamarea: sandboxOpenShell sandbox lifecycle, runtime, config, or recoveryplatform: ubuntuAffects Ubuntu Linux environments
Activity
laitingsheng commentedon May 26, 2026
Duplicate of #4242
cr7258 commentedon May 27, 2026
Close #4242 as we map this GitHub issue to the nvbug to track it internally.
fix(shields): cross-check sandbox filesystem in shields status (#4294)
wangericnv commentedon May 28, 2026
Reopening — verify FAILED. PR #4294 did not add the cross-check that the original report describes. Re-verified on NemoClaw v0.0.52 / OpenClaw 2026.5.22 (DGX Spark, Ubuntu 24.04 aarch64, 2026-05-28).
Direct tamper-and-check test:
shields statusstill reports the cached policy state without cross-checking the actual sandbox filesystem. No newdrift/tamper/integrity/mismatch/modifiedwording appears for either the happy path or the tampered state.cc @laitingsheng — could you check whether PR #4294 actually added the file-hash cross-check, or if the change ended up only on a related path? Suggested fix direction:
shields up, snapshot a SHA-256 of every shields-protected file (at minimum/sandbox/.openclaw/openclaw.json) into a hidden/sandbox/.openclaw/.shields-seal.jsonoutside the sandbox writable surface.shields status, recompute hashes, compare against the seal, and surface aWARN: drift detected — openclaw.json was modified outside the shields sealline (and exit non-zero) if any mismatch.NVBug #6222239 has been reverted to BugAction=
Dev - Open - To fix, Disposition=Open issuewith the same evidence.(Test footprint: my tamper left
/sandbox/.openclaw/openclaw.jsonwith a trailing space byte. JSON tolerates trailing whitespace so functional impact is nil; anemoclaw my-assistant rebuildrestores the original.)laitingsheng commentedon May 28, 2026
The target release of the PR is v0.0.53, I think you need to retest it with the new release.
wangericnv commentedon May 28, 2026
@laitingsheng thanks — I already re-ran on v0.0.53 today after upgrading the Spark, and the drift-undetected behavior still reproduces unchanged:
So PR #4294 didn't actually add the file-hash cross-check on v0.0.53 either, or it landed on a different code path. The bug's exact symptom — "shields status does not cross-check sandbox filesystem; drift after host-root tamper goes undetected" — is still present on the v0.0.53 build.
Could you confirm whether the PR's intent was to add the seal-and-recompute on
shields status, or only to harden some other aspect? Happy to add detection in another way if I'm probing the wrong angle — but per the original bug's repro recipe, the post-tampershields statusshould surface a drift / mismatch / integrity-violation indicator and currently doesn't.Leaving NVBug #6222239 at
Dev - Open - To fixfor now. Let me know if you'd like additional diagnostic output (e.g.nemoclaw <name> doctor, full shields-status--verboseif one exists, or strace of the shields-status call to see whether any hash file is read).feat(shields): seal locked files with SHA-256 and detect content drift (