fix(security): bundle Telegram allowlist and update hardening#1500
fix(security): bundle Telegram allowlist and update hardening#150013ernkastel wants to merge 5 commits intoNVIDIA:mainfrom
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces sandbox name validation with reserved-name collision detection, extends the CLI with a Changes
Sequence DiagramssequenceDiagram
participant User
participant CLI as nemoclaw CLI
participant Dispatch
participant Sandbox as Sandbox Actions
participant TgBridge as Telegram Bridge
User->>CLI: nemoclaw start --discover-chat-id
CLI->>Dispatch: Parse --discover-chat-id flag
Dispatch->>Dispatch: Set NEMOCLAW_TELEGRAM_DISCOVERY=1
Dispatch->>Sandbox: start-services.sh with discovery flag
Sandbox->>TgBridge: Launch telegram-bridge.js (DISCOVERY_ONLY=true)
TgBridge->>TgBridge: Receive Telegram message
TgBridge->>User: Reply with chat ID (discovery mode)
TgBridge->>TgBridge: Skip OpenClaw forwarding
sequenceDiagram
participant User
participant CLI as nemoclaw CLI
participant Dispatch
participant Registry as Sandbox Registry
participant GlobalCmds as Reserved Names
User->>CLI: nemoclaw telegram start
CLI->>Dispatch: Dispatch sandbox action
Dispatch->>GlobalCmds: Check if "telegram" is global/reserved
GlobalCmds-->>Dispatch: "telegram" is reserved
Dispatch->>User: Error: collision detected
User->>CLI: nemoclaw -- telegram start
CLI->>Dispatch: Parse -- escape sequence
Dispatch->>Registry: Lookup sandbox "telegram"
Dispatch->>Dispatch: Invoke "start" action on sandbox "telegram"
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
#1218with the sandbox self-update-hint fix from#1215#1416and#1499separate on purposemainRelated PRs / Issues
#1218#1215#1416separate#1499separate#896#1029Why
These two changes both tighten the default runtime posture for operator-managed deployments:
#1218makes Telegram bridge access fail closed unless a chat allowlist is configured, with a safe discovery mode for retrieving chat IDs#1215removes misleading in-sandbox self-update hints so the supported upgrade path stays image-based instead of mutable in-container updatesGrouping them into one cleanup PR reduces review fragmentation for the remaining security work without collapsing unrelated security follow-ups like
#1416or#1499.Changes
nemoclaw telegramsubcommands andnemoclaw start --discover-chat-idmainFollow-up Improvement
src/lib/deploy.tsso a locally saved allowlist is not lost when operators use the remotedeployflowValidation
npm run build:clinpx vitest run src/lib/deploy.test.ts test/onboard.test.js test/cli.test.js test/runner.test.js test/service-env.test.jsRisks / Notes
npm run typecheck:clistill hits the repo’s existingsrc/lib/*.test.ts -> ../../dist/lib/*type-resolution issue in this environment, so validation here relies on the targeted build plus Vitest coverage above#1416and#1499are intentionally left out of this bundleSummary by CodeRabbit
New Features
nemoclaw start --discover-chat-idto retrieve chat IDs without forwarding messages to the agent.nemoclaw telegrammanagement commands (allow,show,clear,discover) for Telegram allowlist configuration.nemoclaw -- <name> <action>to invoke sandboxes with names matching global commands.Improvements
Documentation