-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Description
In scripts/nemoclaw-start.sh (lines 218–223), when the container runs as a non-root user, the SHA256 config integrity check failure is non-fatal. The script logs a warning but continues execution, completely bypassing the security model that protects openclaw.json from tampering.
What happens: In non-root mode, if verify_config_integrity() fails (indicating openclaw.json has been modified), the script prints a warning and proceeds to start the gateway with the tampered config.
What should happen: The config integrity check failure should be fatal in all modes. If the config hash doesn't match, the sandbox should refuse to start regardless of whether it's running as root or non-root.
Reproduction Steps
- Start a NemoClaw sandbox in non-root mode (e.g., in an environment where the container cannot run as root)
- Modify
/sandbox/.openclaw/openclaw.json— change the auth token, model, or provider - The SHA256 hash in
/sandbox/.openclaw/.config-hashno longer matches - When
nemoclaw-start.shruns, observe the output:[gateway] Running as non-root (uid=1000) — privilege separation disabled [SECURITY WARNING] Config integrity check failed — proceeding anyway (non-root mode) - The gateway starts with the tampered config
Environment
- Code review of
mainbranch (commit HEAD as of 2026-03-26) - Affected file:
scripts/nemoclaw-start.shlines 218–223 - Contrasted with root path at line 252 where the check IS fatal
Logs
Non-root path (lines 218–223) — check is NON-FATAL:
if [ "$(id -u)" -ne 0 ]; then
echo "[gateway] Running as non-root (uid=$(id -u)) — privilege separation disabled"
export HOME=/sandbox
if ! verify_config_integrity; then
echo "[SECURITY WARNING] Config integrity check failed — proceeding anyway (non-root mode)"
fiRoot path (line 252) — check IS fatal (exits on failure):
verify_config_integrityUnder set -euo pipefail (line 16), the root path exits on failure. But in the non-root path, the if statement catches the error and continues.
Checklist
- I confirmed this bug is reproducible
- I searched existing issues and this is not a duplicate