feat: uvx detection + incident response UX improvements#40
Merged
Conversation
New rules: - MCPCFG_012: uvx/uv MCP server without version pin (HIGH). Covers the exact litellm attack vector where uvx auto-downloaded the compromised package from PyPI. - MCPCFG_013: pip install without hash verification in MCP setup (MEDIUM). Incident response improvements: - aguara check now always scans pip/uv/npx caches (was opt-in with --include-caches). Cache scanning also checks METADATA in dist-info dirs and .pth files, not just filenames. - aguara clean confirmation defaults to Y (was N). Press Enter to proceed, type n to abort. Removes friction for the common case. 189 rules, 576 tests, 0 lint issues.
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
Covers the exact litellm attack vector (uvx auto-download of compromised package) and simplifies the incident response workflow.
Source: oktsec engineering spec based on Callum McMahon's analysis of the litellm compromise via uvx in Cursor MCP configs.
New rules
MCPCFG_012 is HIGH (vs MCPCFG_001/npx which is LOW) because uvx pulls entire Python packages with deep dependency trees. litellm has 300+ transitive deps. The attack surface per uvx invocation is much larger.
UX improvements
aguara checkalways scans caches - removed--include-cachesflag, caches are always scanned (uv, pip, npx). Cache scanning now also reads METADATA in dist-info dirs and checks .pth files, not just filenames.aguara cleandefaults to Y - confirmation prompt changed from[y/N]to[Y/n]. Press Enter to proceed. Reduces the workflow to 2 commands:aguara check,aguara clean.Stats
189 rules (was 187), 576 tests, 0 lint issues.
Test plan
make build && make test && make vet && make lintall pass