feat(cli): add manus-agent silent-patches subcommand for silent patch detection - #138
Open
manus-use wants to merge 1 commit into
Open
feat(cli): add manus-agent silent-patches subcommand for silent patch detection#138manus-use wants to merge 1 commit into
manus-use wants to merge 1 commit into
Conversation
… detection Implement the silent-patches CLI subcommand documented in the README but previously unimplemented. Scans a GitHub repository commit history for security fixes that were never assigned a CVE. Features: - Two-stage heuristic scoring: commit message keywords + diff keywords - 14 bug-class classification (auth_bypass, buffer_overflow, xss, etc.) - Automatic exclusion of commits that already reference a CVE - Graceful degradation on diff fetch failure (message score only) - --fast mode to skip diff scoring - --since/--until date range filtering - --max-commits limit - Text and JSON output formats New files: - src/manus_agent/tools/detect_silent_patches.py (tool module, ~280 lines) - tests/test_detect_silent_patches.py (68 tests, fully mocked)
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
Implement the
manus-agent silent-patchesCLI subcommand — documented in the README but previously completely unimplemented (no tool module, no CLI wiring existed).What it does
Scans a GitHub repository's commit history for security fixes that were never assigned a CVE. Uses two-stage heuristic scoring:
Each candidate commit is classified into one of 14 bug classes:
auth_bypass,buffer_overflow,command_injection,csrf,directory_traversal,information_disclosure,integer_overflow,memory_corruption,null_dereference,privilege_escalation,race_condition,sql_injection,use_after_free,xss.Usage (matches README documentation)
manus-agent silent-patches torvalds/linux manus-agent silent-patches torvalds/linux --since 2025-01-01 manus-agent silent-patches torvalds/linux --output json | jq .[].classification manus-agent silent-patches owner/repo --fast --max-commits 100Flags
--since YYYY-MM-DD--until YYYY-MM-DD--max-commits N500--fast--output {text,json}textFiles changed
src/manus_agent/tools/detect_silent_patches.py— new tool module (~280 lines)src/manus_agent/cli.py— addedsilent-patchesto_SUBCOMMANDS, parser, runner, and dispatchtests/test_detect_silent_patches.py— 68 fully-mocked tests covering message scoring, diff scoring, classification, GitHub API mocking, CLI text/JSON output, error handling, and edge casesTest results
Duplicate check
Checked all 50 open PRs (#77–#137) and 30 merged PRs (#39–#102). No open or merged PR implements
silent-patchesor a silent patch detector. Related but distinct PRs: