Skip to content

feat(cli): add manus-agent advisory subcommand for GitHub Security Advisory lookup - #128

Open
manus-use wants to merge 1 commit into
mainfrom
feat/cli-advisory
Open

feat(cli): add manus-agent advisory subcommand for GitHub Security Advisory lookup#128
manus-use wants to merge 1 commit into
mainfrom
feat/cli-advisory

Conversation

@manus-use

Copy link
Copy Markdown
Owner

Summary

Add manus-agent advisory <CVE-ID> CLI subcommand that fetches GitHub Security Advisory (GHSA) details for a given CVE from the public GitHub Advisory Database.

What this PR does

  1. Refactors get_github_advisory.py — extracts a reusable fetch_github_advisory() library function (no Strands dependency) that the CLI and the agent tool both call. The @tool-decorated wrapper now delegates to this function.

  2. Adds advisory CLI subcommand — users can look up GHSA data from the terminal without spinning up the full agent:

    manus-agent advisory CVE-2024-3094
    manus-agent advisory CVE-2023-44487 --output json | jq .vulnerabilities
  3. Rich text output displays:

    • GHSA ID, severity, published/updated/withdrawn dates
    • CVSS score and vector string
    • CWE classifications
    • Affected packages with vulnerable version ranges and patched versions
    • References (truncated at 10)
    • Credits
  4. 33 new tests (tests/test_cli_advisory.py) — 100% mocked, no real HTTP calls. Covers text output, JSON output, edge cases (no CVSS, no CWEs, withdrawn advisories, long descriptions, string references), and the library function directly.

  5. README updates — TOC entry + documentation section for the new subcommand.

Test results

1191 passed, 3 deselected, 3 warnings in 25.48s

All existing tests continue to pass. Zero failures.

Duplicate check

Checked all 46 open PRs (#53, #54, #58, #60, #64, #65, #67, #74-90, #96, #98, #100, #103-127) and 30 most recent merged PRs. No existing open or merged PR adds an advisory CLI subcommand. PR #92 (merged) adds tool-level tests for get_github_advisory but does not touch the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant