Agent-Hellboy / Agent-Hellboy/mcp-runtime
feat(security): add scheduled MCP server auditing with Cisco MCP Scanner
- Lingua principale
- Go
- Stelle
- 6
- Fork
- 1
- Merge medio
- 11h 33m
- PR unite (30g)
- 13
Descrizione
## Summary
Add an optional platform auditing feature that scans deployed MCP servers through their consumer-facing gateway routes and reports security findings in Sentinel.
Use the Apache-2.0-licensed [Cisco MCP Scanner](https://github.com/cisco-ai-defense/mcp-scanner) for tool, prompt, resource, and instruction analysis. The default mode must run locally without paid API keys or sending metadata to external services.
A proof of concept was validated against the live platform on June 10, 2026: Cisco MCP Scanner successfully scanned all advertised tools through the public gateway, and a dedicated audit identity verified allow, deny, and anonymous-access behavior.
## Requirements
- Support manual and scheduled audits for selected `MCPServer` resources.
- Connect through the public/consumer-facing Streamable HTTP gateway route.
- Discover and scan tools, prompts, resources, and server instructions.
- Run local YARA analysis by default.
- Treat Cisco AI Defense, LLM, and VirusTotal analyzers as explicit opt-in integrations requiring separately managed credentials.
- Use a dedicated low-trust audit identity and short-lived `MCPAgentSession`.
- Grant only explicitly safe, read-only audit tool calls.
- Verify platform controls in addition to metadata scanning:
- permitted read-only call succeeds;
- ungranted tool call is denied;
- anonymous tool call is denied;
- revoked or expired session is denied.
- Never automatically invoke write-capable or otherwise side-effecting tools.
- Store versioned machine-readable reports with scanner version, target, timestamp, and analyzer configuration.
- Expose latest audit status, findings, and report history through Sentinel API/UI.
- Emit audit events for scan execution and policy-test outcomes.
- Isolate the scanner with restricted RBAC, resource limits, timeouts, and controlled network access.
- Pin the scanner version and retain Apache 2.0 license/notice attribution.
- Make audit failures visible without affecting normal gateway request handling or server readiness.
## Suggested design
- Add a platform audit controller/job runner rather than placing scanning in the gateway request path.
- Create or renew a narrowly scoped audit session immediately before each run.
- Capture MCP metadata through the gateway and feed it to the scanner's local/static analyzers.
- Persist normalized results in Sentinel storage and retain the scanner's original JSON report as an artifact.
- Allow per-server schedules and analyzer configuration with conservative platform defaults.
## Acceptance criteria
- An administrator can trigger an audit for one deployed `MCPServer`.
- An administrator can configure a recurring audit schedule.
- A completed run produces a persisted JSON report and a Sentinel summary.
- The default configuration works without Cisco, LLM-provider, or VirusTotal API keys.
- The audit detects and reports a deliberately malicious tool description fixture.
- The policy tests fail the audit when an anonymous or ungranted tool call succeeds.
- No write-capable tool is invoked during an audit.
- Scanner credentials, when configured, are stored in Kubernetes Secrets and never included in reports or logs.
- Unit and integration tests cover scheduling, session renewal, report normalization, failure handling, and policy-boundary checks.
- Documentation explains licensing, privacy implications, analyzer modes, and operational limits.
## Non-goals
- Blocking gateway traffic synchronously based on scanner results.
- Enabling external analyzers by default.
- Treating a clean scan as proof that an MCP server is secure.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.