feat: support snake_case MCP schema variants#3
Merged
brandonwise merged 1 commit intomainfrom Apr 16, 2026
Merged
Conversation
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
mcp_servers+contextServersvariants inparse_configallowed_tools/tool_allowlistandallowed_directoriesaliases to prevent false positives for AW-007/AW-002testdata/snake-case-mcp.json) and tests proving snake_case allowlist fields are honoredWhy this matters
Recent MCP ecosystem telemetry shows teams mixing config schemas across tools and wrappers. Without alias support, users can get false positives even when they configured least-privilege allowlists correctly.
Validation evidence
All commands run from repo root.
1) Repo-level/full suite
cargo testβ PASS (208 unit + 36 integration tests)2) Targeted tests for changed modules
cargo test config::tests::test_parse_snake_case_mcp_servers_and_fieldsβ PASScargo test test_snake_case_allowlist_and_directories_are_respectedβ PASS3) Lint/type/build checks
cargo clippy --all-targets --all-features -- -D warningsβ PASScargo checkβ PASScargo build --releaseβ PASS4) Smoke/integration check for changed behavior
./target/release/agentwise scan testdata/snake-case-mcp.json --format json | python3 -c 'import json,sys; d=json.load(sys.stdin); ids={f["rule_id"] for f in d.get("findings",[])}; banned={"AW-002","AW-007"}; bad=sorted(ids & banned); print("findings", len(d.get("findings",[])), "score", d.get("score")); print("banned_rules", bad if bad else "none"); sys.exit(1 if bad else 0)'β PASSfindings 0 score 100,banned_rules noneRisk
Low. Backward-compatible parser aliases + tests only; no rule severity changes or output schema changes.