Skip to content

[codex] support MCP subdir scans and explain hotspots#19

Merged
limaronaldo merged 2 commits into
mainfrom
codex/agent-27-28-scan-explain
Jun 14, 2026
Merged

[codex] support MCP subdir scans and explain hotspots#19
limaronaldo merged 2 commits into
mainfrom
codex/agent-27-28-scan-explain

Conversation

@limaronaldo

Copy link
Copy Markdown
Collaborator

Summary

  • Support MCP scans from subdirectories by discovering root metadata from ancestors while keeping the requested scan path as the source boundary.
  • Add scan --explain root reporting so subdirectory scans show both scan root and metadata root when they differ.
  • Add Hotspots output to scan --explain, grouping blocking findings by runtime/supply-chain concentration and rule.

Impact

This makes narrowed MCP scans more conclusive for repos where the MCP server lives below the package root, and gives first-run users a clearer starting point when findings are concentrated in a few directories or rules.

Validation

  • cargo fmt --check
  • cargo clippy -- -D warnings
  • cargo test (262 passed)
  • cargo test --all-features (337 passed)
  • CLI QA: agentshield scan <tmp>/src/mcp --explain --fail-on high showed scan root, metadata root, one parsed TypeScript file, and one tool.
  • CLI QA: agentshield scan <tmp> --explain --fail-on high showed Hotspots with runtime concentration in scripts/.

Huly: AGENT-27 and AGENT-28 are marked Done.

@limaronaldo limaronaldo marked this pull request as ready for review June 14, 2026 17:19
@limaronaldo limaronaldo merged commit 7b49e59 into main Jun 14, 2026
9 checks passed
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