Secrets are exposed to plugins and subprocesses via environment variables #51

Closed
opened 2026-02-22 06:36:30 +00:00 by nazim · 1 comment
Contributor

Problem

Cobot currently has no secret management. Credentials (API keys, bot tokens, wallet keys) live in environment variables or config files and are accessible to:

  1. Every plugin — any plugin can read os.environ["TELEGRAM_BOT_TOKEN"] or any other secret, regardless of whether it needs it
  2. Every subprocessexec calls, shell tools, and scripts inherit the full environment including all secrets
  3. LLM output — if the model accidentally echoes a secret, nothing catches it before it reaches Telegram/Nostr/logs

This means a single misbehaving plugin, a prompt injection that triggers a tool call, or even a careless env command can leak every credential the agent has.

What we want

  • Plugins should only access the secrets they actually need
  • Subprocesses should never see raw credentials
  • Outbound messages should be scanned for accidental secret leakage
  • Secrets should be encrypted at rest, decrypted only in RAM at runtime

Prior art

  • IronClaw (nearai/ironclaw) — Rust agent with WASM-sandboxed tools. Secrets injected at host boundary, never exposed to tool code. Leak detection on all outputs.
  • avault — NIP-44 encrypted vault with NIP-46 remote signing (operator phone as hardware key). Secrets in RAM only while daemon runs. Built as a standalone tool, not yet integrated into cobot.

Impact

Without this, cobot cannot safely:

  • Run untrusted or third-party plugins
  • Execute arbitrary tool commands from LLM decisions
  • Operate in multi-user or DVM scenarios where external job requests trigger tool execution
## Problem Cobot currently has no secret management. Credentials (API keys, bot tokens, wallet keys) live in environment variables or config files and are accessible to: 1. **Every plugin** — any plugin can read `os.environ["TELEGRAM_BOT_TOKEN"]` or any other secret, regardless of whether it needs it 2. **Every subprocess** — `exec` calls, shell tools, and scripts inherit the full environment including all secrets 3. **LLM output** — if the model accidentally echoes a secret, nothing catches it before it reaches Telegram/Nostr/logs This means a single misbehaving plugin, a prompt injection that triggers a tool call, or even a careless `env` command can leak every credential the agent has. ### What we want - Plugins should only access the secrets they actually need - Subprocesses should never see raw credentials - Outbound messages should be scanned for accidental secret leakage - Secrets should be encrypted at rest, decrypted only in RAM at runtime ### Prior art - **IronClaw** ([nearai/ironclaw](https://github.com/nearai/ironclaw)) — Rust agent with WASM-sandboxed tools. Secrets injected at host boundary, never exposed to tool code. Leak detection on all outputs. - **avault** — NIP-44 encrypted vault with NIP-46 remote signing (operator phone as hardware key). Secrets in RAM only while daemon runs. Built as a standalone tool, not yet integrated into cobot. ### Impact Without this, cobot cannot safely: - Run untrusted or third-party plugins - Execute arbitrary tool commands from LLM decisions - Operate in multi-user or DVM scenarios where external job requests trigger tool execution
Owner

duplicate of #50

duplicate of #50
k9ert closed this issue 2026-02-27 00:34:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ultanio/cobot#51
No description provided.