Repository navigation
fix: require gql 4 and fastmcp 3.2 for mythic-c2 capabilities (ENG-8860) - #175
Merged
Merged
Conversation
Drop the gql<4.0 cap and raise the fastmcp floor to >=3.2.0 to clear the flagged CVEs. Copy the gql 4 get_operation_name shim into mythic-c2-readonly (server and skill script) so mythic 0.2.x keeps working. Bump capability versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Automated agent reviewThis review was run by an agent. It is not a human approval. Verdict: APPROVE (no blocking findings)
|
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
mythic-c2-readonlycapped gql at<4.0. gql 3 needswebsockets<12, which forceduvto resolve fastmcp 2.12.5 and mcp 1.16.0. Black Duck flagged both (fastmcp: 1 critical, 3 high; mcp: 3 high).<4.0cap in the fourmythic-c2-readonlyscript headers. The new spec isgql[aiohttp,websockets]>=4.0.fastmcp>=3.2.0inmythic-c2-readonly/mcp/server.py,test_server.py, and inmythic-c2/mcp_server.pyandtest_mcp.py._patch_mythic_for_gql4()shim frommythic-c2/lib/mythic_api.pyintomythic-c2-readonly/mcp/server.pyandskills/.../scripts/mythic_read.py. mythic 0.2.xget_operation_nameraisesAttributeErroron gql 4GraphQLRequest. Capabilities cannot share code (ENG-7049), so this is a copy.TestGqlOperationNameto both readonly test files. It checks the shimmedget_operation_namewith a gql 4GraphQLRequestand a plainDocumentNode.test_server.py: switchmcp.get_tools()tomcp.list_tools(). fastmcp 4 removedget_tools.mythic-c2-readonly1.0.0 → 1.0.1 andmythic-c22.1.0 → 2.1.1.Linear: ENG-8860
Acceptance evidence (Python 3.13)
uv tree --script capabilities/mythic-c2-readonly/mcp/server.py --depth 1: fastmcp 4.1.0, gql 4.4.0, mythic 0.2.6uv tree --script capabilities/mythic-c2/mcp_server.py --depth 1: fastmcp 4.1.0, mythic 0.2.6uv run capabilities/mythic-c2-readonly/mcp/test_server.py: 27 passeduv run capabilities/mythic-c2-readonly/skills/mythic-c2-readonly/scripts/test_mythic_read.py: 54 passeduv run capabilities/mythic-c2/test_mcp.py: 16 passedRegression evidence
just validate strict=true: 26 validated, 0 failed. The 6 warnings are missing tool binaries in other capabilities.pre-commit run --files <changed paths>: all hooks passNotes
server.py,mythic_read.py, and the two readonly test files isruff-formatoutput. Those files already failruff format --check(ruff 0.8.6) onorigin/main, and the pre-commit hook rewrites them on any edit. The churn is whitespace and line wrapping only.Scope
Base
main@ac4420c7ff446b445f3e1340ab07ff1fb32af8ba, headf5f37526e0492d0db67c098cc7a11906b30850e9. 8 files, matching the ticket scope:capabilities/mythic-c2-readonly/{capability.yaml, mcp/server.py, mcp/test_server.py}capabilities/mythic-c2-readonly/skills/mythic-c2-readonly/scripts/{mythic_read.py, test_mythic_read.py}capabilities/mythic-c2/{capability.yaml, mcp_server.py, test_mcp.py}🤖 Generated with Claude Code