NemoClaw
NemoClaw copied to clipboard
[Feature] Verify real bot token is never exposed inside the sandbox
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:
- Capture the full environment (env) and process cmdlines from inside the sandbox via SSH.
- 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
- 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