NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[Feature] Verify real bot token is never exposed inside the sandbox

Open hunglp6d opened this issue 7 months ago • 0 comments

Problem Statement

Real bot token must not appear in sandbox environment variables, process cmdlines output, or any file under the sandbox filesystem. Currently only the specific TELEGRAM_BOT_TOKEN and DISCORD_BOT_TOKEN env vars are checked (M3 in test-messaging-providers.sh); the full environment, process cmdlines, and filesystem are not scanned.

Proposed Design

In nightly/PR workflow: Extend Phase 2 (Credential Isolation) of test-messaging-providers.sh with the following checks after the existing M5 assertion:

  1. Capture the full environment (env) and process cmdlines from inside the sandbox via SSH.
  2. Assert the real bot token does not appear in:
  • The full environment dump -- catches leaks into any env var, not just TELEGRAM_BOT_TOKEN and DISCORD_BOT_TOKEN
  • The process cmdlines -- catches tokens passed as CLI arguments
  • Any file under the sandbox filesystem (/sandbox, /home, /etc, /tmp, /var) via recursive fixed-string grep -- catches tokens written to config files, logs, or caches
  1. Assert the placeholder string does appear in the sandbox environment (positive check confirming OpenShell injected it).

Alternatives Considered

No response

Category

enhancement: feature

Checklist

  • [x] I searched existing issues and this is not a duplicate
  • [x] This is a design proposal, not a "please build this" request

hunglp6d avatar Apr 14 '26 00:04 hunglp6d