Skip to content

feat(core): one-shot probe for unapproved MCP servers and an unpinned launcher check - #777

Merged
ajianaz merged 4 commits into
developfrom
feat/plugin-probe
Nov 14, 2026
Merged

ajianaz merged 4 commits into
developfrom
feat/plugin-probe

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

Fourth part of the first slice of #600: tole_core::mcp::probe_manifest, a one-shot look at a server nobody approved yet, and tole_core::plugin_launcher::unpinned_launcher. Neither is wired to a command yet; tole plugin add uses them in the next part.

Why

Probing an unvetted server through the shared reactor leaves its process (and a launcher's grandchildren) running for the life of the host, passes the [secrets] release to code nobody approved, and can start it outside the sandbox. add needs a probe that ends everything and starts only where the tier allows.

Changes

  • probe_manifest(cfg, require_sandbox): a stdio server runs on its own thread and runtime, leads its own process group, and the whole group is killed on every exit path (returned, failed, timed out, panicked), before the server is reaped so the group id cannot be anyone else's. Empty secret grant (the scrub keeps nothing), stderr discarded, a launch that would run direct is refused before spawning when the sandbox is required. HTTP servers have no local process and use the reactor. Other platforms kill the server process only.
  • unpinned_launcher(command, args): npx, bunx, pnpm dlx, uvx, pipx run, docker/podman run without an exact version or digest; an unknown flag is never guessed at.
  • Integration test with a mock stdio server (env recorded, grandchild started, pids recorded). CHANGELOG entry.

Testing

  • mcp_probe: tools returned; server and grandchild gone after success, after a server that dies (grandchild holds the pipes), and after a timeout; no secret in the server's environment; sandbox required with none configured does not spawn.
  • Mutation checks: no killpg, no process group, or a keep-everything env scrub each fail mcp_probe.
  • Launcher corpus (14 unpinned, 14 pinned or not launchers).
  • cargo clippy -p tole-core --all-targets --features mcp -D warnings; tole-core --no-default-features builds.

Refs #600

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 6607954 into develop Nov 14, 2026
18 checks passed
@ajianaz
ajianaz deleted the feat/plugin-probe branch November 20, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants