Pre-install security scanning integration: AgentShield + ToolHive
Hi ToolHive team! 👋
I maintain AgentShield, an open-source security scanner for AI agent skills, MCP servers, and plugins. I think there's a natural integration opportunity here.
The fit
ToolHive = secure MCP server deployment (container isolation, registry, governance) AgentShield = MCP server pre-install scanning (static analysis, vulnerability detection)
Together: scan before deploy, deploy with confidence.
What AgentShield does
npx @elliotllliu/agent-shield scan ./server/— 30 rules, <1 second, 100% offline- Detects: data exfiltration, backdoors, prompt injection, tool poisoning, supply chain attacks
- Cross-file data flow analysis + kill chain detection
- Scoring system: 0-100 with risk levels
- JSON output +
--fail-underfor CI/CD
Integration ideas
- Registry pre-scan — Automatically scan servers before they're added to the ToolHive registry
- Trust score — Use AgentShield's 0-100 score as an input to ToolHive's trust/provenance system
- One-click audit — Users browsing the Portal can see scan results before deploying
Happy to discuss and contribute. The goal is the same: make MCP safe for everyone.
🔗 https://github.com/elliotllliu/agent-shield
We are currently already using another scanner for the registry. If you do have a proof of concept of the integration and want to reach out with that, you're welcome!
I'm going to close this, but feel free to re-open if such PoC is ready.
Hey! Following up with the PoC you mentioned.
We built a thv-safe wrapper that hooks into the thv run workflow:
Repo: https://github.com/elliotllliu/agent-shield/tree/main/integrations/toolhive
How it works:
thv-safe run <server>resolves the source repo from ToolHive registry- Shallow-clones the source and runs AgentShield scan (30+ detection rules)
- Shows a security report with letter grade (A–F) across 5 dimensions
- If grade meets threshold → proceeds with
thv run; if not → warns/blocks
thv-safe run fetch # scan → report → confirm → run
thv-safe run fetch --yes # auto-proceed if grade ≥ C
thv-safe scan fetch # scan only
It's a standalone bash script — no changes to ToolHive internals needed. Could also be adapted as a registry-server webhook or a pre-deploy check in the operator.
Happy to iterate on this if you'd like a tighter integration. The scanner is also available as an npm package (@elliotllliu/agent-shield) for programmatic use.