Repository navigation
feat(mcp): supply-chain audit subcommand for effective servers - #269
Closed
raymondginger2018-sudo wants to merge 1 commit into
Closed
raymondginger2018-sudo wants to merge 1 commit into
raymondginger2018-sudo wants to merge 1 commit into
Conversation
Add core/mcp/audit.py (declaration audit over the flat McpInventory: transport provenance, tool filter, missing env keys; pure mechanism, no network) plus 'deepcode mcp audit [--json]' with human risk lines. Disabled servers introduce no runtime exposure and yield no risk lines, mirroring the posture rules in _posture_summary.
Collaborator
|
Thank you for putting this together. We're going to close it, and here is why:
What we'd gladly take: a small PR that adds a concern to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
deepcode mcp audit [--json]: a supply-chain declaration audit over theeffective MCP inventory (lesson 13, third-party / supply-chain warning).
Pure mechanism — no network, no execution.
Changes
core/mcp/audit.py(new, +142): per-server entries from the flatMcpInventory(transport provenance: stdio command vs remote URL, toolfilter, approval mode, missing env keys) + risk lines. Disabled servers
introduce no runtime exposure and yield no risk lines, mirroring the
posture rules in
mcp list.cli/mcp_cli.py(+23):auditsubcommand wired through the existingapplication.mcp.list(project_id)path; human output prints a servertable plus
risk:lines,--jsonemits the full report.tests/test_mcp_audit.py(new, 6 cases with duck-typed fakes) +tests/test_mcp_cli.py(+1 end-to-end case with a direct-config server).Tests
pytest tests/test_mcp_audit.py tests/test_mcp_cli.py-> 14 passed;ruff check+ruff formatgreen (pre-commit pinned rev, hooks passed atcommit).
Dependency note
the missing
core.mcp.naming.server_allowedsymbol that killed theearlier audit attempt (feat(mcp): supply-chain audit declarations for MCP servers #220); complements the landed
mcp listconcerns/posture work (feat(mcp): name per-server concerns and default posture in
mcp list#241) with a diffable audit report.