Repository navigation
fix(as2): match MCP config files of Claude Desktop, Claude Code, Cline and Roo Code - #881
Conversation
…e and Roo Code AS2 matched only mcp.json and mcp_config.json, so a skill that read the server list of Claude Desktop (claude_desktop_config.json), Claude Code (~/.claude.json), Cline (cline_mcp_settings.json) or Roo Code (mcp_settings.json) got no AS2 finding. The direct-access patterns now share one file-name pattern that covers these files. Signed-off-by: Dmitry Sergeev <sergeevdms@gmail.com>
|
The red |
…nfig-files Signed-off-by: Dmitry Sergeev <sergeevdms@gmail.com>
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Value and readiness
Ready. The shared filename fragment adds the missing MCP client configuration names to the three direct-access patterns and keeps configuration-registration prose outside those patterns.
Material findings
No required changes found.
PIC tradeoffs
This remains a lexical direct-access detector. Paths constructed through another function retain the pre-existing limitation documented in the description. The broader filename families can report a direct open used for writing, consistent with the existing AS2 behavior.
Verification and gaps
Reviewed the complete diff, description, linked issue material, all previous reviews/comments/replies and pinned-head surrounding source at 3003ba2e44a6e573934a180e4071aa81bb34e9b1. Verified the Cline suffix match, literal .claude.json spelling, all four new client fixtures, setup-prose negative control and unchanged remaining AS2 patterns. GitHub reports changes: SUCCESS, lint: SUCCESS, test-unit: SUCCESS, OpenCode TypeScript Tests: SUCCESS, DCO Check: SUCCESS, docker-smoke: SUCCESS. No contributor code, tests, imports, build steps or scanner invocations were executed during this review.
…e and Roo Code (#881) AS2 matched only mcp.json and mcp_config.json, so a skill that read the server list of Claude Desktop (claude_desktop_config.json), Claude Code (~/.claude.json), Cline (cline_mcp_settings.json) or Roo Code (mcp_settings.json) got no AS2 finding. The direct-access patterns now share one file-name pattern that covers these files. Signed-off-by: Dmitry Sergeev <sergeevdms@gmail.com> (cherry picked from commit 3ae98af) Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Fixes #880.
AS2 matched only
mcp.jsonandmcp_config.json. A skill that read the MCP server list, and the tokens in it, of Claude Desktop, Claude Code, Cline or Roo Code got no AS2 finding and was reported asscore: 7, recommendation: SAFE. The same read of~/.cursor/mcp.jsongives AS2 HIGH andscore: 36, recommendation: CAUTION.Fix
The three direct-access AS2 patterns (
open(...),Path(...), andcat/less/head/grep) now share one file-name pattern. In addition tomcp.jsonandmcp_config.json, it matches:claude_desktop_config.json(Claude Desktop);mcp_settings.json, which also covers Cline'scline_mcp_settings.json(Roo Code, Cline);.claude.json(Claude Code user and local scopes).The
.claude/mcp.jsonpath pattern and the file-name-then-token pattern are unchanged, so setup instructions that only name one of these files are not flagged. The AS2 explanation and remediation now giveclaude_desktop_config.jsonas a second example.Tests
test_as2_other_mcp_client_configs_produce_findingcovers the four clients throughopen,Pathandcat. All four cases fail onmain.test_as2_setup_instructions_naming_a_client_config_are_not_accesschecks that aSKILL.mdasking the user to add a server toclaude_desktop_config.jsongets no AS2.skillspector scan --no-llmnow reports AS2 HIGH andscore: 36, recommendation: CAUTIONfor each.skills/andtests/fixtures/.ruff checkandruff format --checkpass.pytest -m "not integration and not provider" tests/: 14,327 passed, 6 failed. The 6 failures aretest_native_claude_55_accepts_default_temperature_in_request_and_provenanceintests/unit/test_anthropic_provider.py(KeyError: 'temperature'), which fail the same way onmain.Not changed here: AS2 does not match a path passed through another call, such as
open(os.path.expanduser("~/.cursor/mcp.json")), for any file name includingmcp.json.