Commit 28b0823
Address P0/P1 review feedback: credential isolation, fail-closed, name sanitization
Four issues from wesbillman/Carl's review:
P0 — Extra MCP processes received Buzz identity credentials despite the
PR's isolation claim. build_mcp_servers gave extras an empty per-server
env, but buzz-agent's spawn_one cleared and repopulated every MCP child's
environment from PASSTHROUGH_ENV, which includes BUZZ_PRIVATE_KEY,
BUZZ_RELAY_URL, and BUZZ_AUTH_TAG. Added a trusted flag to McpServer and
McpServerStdio; spawn_one now withholds identity credentials from
untrusted servers. The primary buzz-dev-mcp server is trusted; extras are
not.
P1 — BUZZ_ACP_EXTRA_MCP_COMMANDS was absent from Desktop's reserved env
key list, allowing a portable persona or per-agent env to inject an
arbitrary command. Added to reserved_env_keys.rs and its test.
P1 — Malformed quoting logged the raw command (which may contain an
embedded API key) and silently skipped the entry. Now fails closed with
only the entry index; the raw command is never echoed.
P1 — Generated names used the executable stem verbatim, violating
McpRegistry's ASCII alphanumeric/hyphen and 128-byte contract. Added
sanitize_mcp_name to replace non-conforming characters with hyphens,
strip leading/trailing hyphens, and truncate to 128 bytes.
Co-authored-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: Brad Groux <brad@digitalmeld.com>1 parent cff8957 commit 28b0823
9 files changed
Lines changed: 259 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
2538 | 2549 | | |
2539 | 2550 | | |
2540 | 2551 | | |
| 2552 | + | |
2541 | 2553 | | |
2542 | 2554 | | |
2543 | 2555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
| |||
0 commit comments