Skip to content

feat(plugin): doctor warns about unpinned launchers, unsandboxed third-party servers and broad grants - #785

Merged
ajianaz merged 1 commit into
developfrom
feat/plugin-doctor-clean
Nov 14, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/plugin-doctor-clean

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

Last part of the first slice of #600. tole doctor warns about three things in the configured MCP servers and the plugin lock.

Why

The lock pins a launcher's binary, not the package it fetches, a third-party stdio server is code that should run in the sandbox, and a grant of several secrets to a server the owner did not write is easy to miss. Doctor is where the owner looks.

Changes

  • plugin/warn.rs, a pure function over the lock, the configured servers, the first-party list, the sandbox policy and backend:
    • unpinned launcher (npx, bunx, pnpm dlx, uvx, pipx run, docker/podman run without an exact version or digest; uses plugin_launcher from feat(core): one-shot probe for unapproved MCP servers and an unpinned launcher check #777);
    • a third-party stdio server no sandbox applies to (mode off, skipped, no bubblewrap, not Linux), with the note that add and approve refuse it;
    • a broad grant: any secret on a third-party server, or more than 3 on any server (revoked entries skipped).
  • Wired into tole doctor next to the plugin lock lines; starts nothing. first_party_names() shared with plugin list/diff/add.
  • CHANGELOG and design note §9.

Testing

  • Unit tests: pinned and unpinned launchers, the three ways a sandbox can be missing, wrapped and skipped names, a remote server, broad grants by tier, revoked entries.
  • E2E against the real binary: tole doctor --tier offline with an unpinned and a pinned npx server prints the launcher and sandbox warnings only for the unpinned one.
  • cargo clippy --workspace --all-targets -D warnings, cargo fmt --check.

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

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