feat(analyzer): implement MCP rug-pull detection (RP1-RP3)#161
Open
mimran-khan wants to merge 1 commit into
Open
feat(analyzer): implement MCP rug-pull detection (RP1-RP3)#161mimran-khan wants to merge 1 commit into
mimran-khan wants to merge 1 commit into
Conversation
Replaces the non-functional stub with a real analyzer that detects MCP rug-pull attack indicators: Manifest comparison (when previous_manifest available): - RP1: New parameters added (potential data capture) - RP2: Description changed (potential prompt injection via description) - RP3: Parameters removed (behavior divergence) Static risk analysis (always runs): - RP1: Wildcard permissions that amplify rug-pull impact - RP2: Dynamic tool loading patterns (fetch_tools, runtime discovery) Key behavior changes: - Logs WARNING when previous_manifest unavailable (was silently returning "0 findings" indistinguishable from "checked and found nothing") - Actually detects rug-pull indicators instead of being a no-op - Returns actionable findings with remediations Fixes NVIDIA#150
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
The
mcp_rug_pullanalyzer was a non-functional stub that unconditionally returned empty findings — indistinguishable from "checked and found nothing" in scan output. This gave users a false sense of security when scanning MCP-enabled skills.This PR implements actual rug-pull detection with two analysis modes:
Manifest Comparison (when
previous_manifestis supplied)Static Risk Analysis (always runs)
*) permissionsKey Behavior Changes
previous_manifestis unavailable, the analyzer now logs aWARNINGinstead of silently producing "0 findings"How Rug-Pull Detection Works
Static analysis runs on every scan regardless, catching:
Testing
15 new tests covering:
Fixes #150