Skip to content

feat(analysis): add local discovery registry - #66

Merged
limaronaldo merged 1 commit into
mainfrom
feature/local-discovery-d0
Jul 24, 2026
Merged

feat(analysis): add local discovery registry#66
limaronaldo merged 1 commit into
mainfrom
feature/local-discovery-d0

Conversation

@limaronaldo

@limaronaldo limaronaldo commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a crate-private, versioned registry for documented Cursor, Claude Code, and VS Code MCP configuration locations
  • add the deterministic D.0 budgets and a separate agentshield.discovery/v1 result model
  • parse only allowlisted structural metadata and discard command, args, env, headers, URLs, and unknown values
  • enforce redacted path-reference construction so absolute paths and traversal components cannot enter serialized discovery results
  • add deterministic IDs, bounded diagnostics, stable envelope ordering, format fixtures, and secret-leak regression tests

Scope

This is D.0 only. It adds no CLI command, public Rust API, filesystem traversal,
network access, subprocess execution, automatic scan, or changes to existing
scan outputs. The temporary module-level dead_code allowance is required by
the accepted split and must be removed in D.1.

The initial registry entries follow current official client documentation for
Cursor global/workspace MCP configuration, Claude Code project .mcp.json, and
VS Code workspace .vscode/mcp.json.

Validation

  • cargo fmt --all --check
  • cargo check --workspace --all-targets --locked
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --all-targets --locked — 381 passed
  • cargo test --workspace --all-targets --no-default-features --locked — 347 passed
  • git diff --check

@limaronaldo
limaronaldo force-pushed the feature/local-discovery-d0 branch from 66e23cf to 86c4021 Compare July 24, 2026 02:53
@limaronaldo

Copy link
Copy Markdown
Collaborator Author

Code review verdict: no blocking findings after fixes. Review covered privacy-safe serialization, deterministic IDs/order, aggregate budgets, unsupported semantics, dependency/public-API drift, unsafe use, and default/no-default feature behavior. One issue found and fixed before this verdict: the 1,024-entry budget was per-source; the envelope now enforces it across the complete invocation with deterministic truncation and a bounded diagnostic. Local gates: fmt, workspace check, all-feature clippy, 381 default tests, and 347 no-default-feature tests pass. Cargo.lock, public API, scan behavior, and existing outputs are unchanged.

@limaronaldo
limaronaldo marked this pull request as ready for review July 24, 2026 02:54
@limaronaldo
limaronaldo merged commit 9c166ba into main Jul 24, 2026
22 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