fix: resolve cargo audit vulnerabilities (rmcp 1.x migration) - #1332
Open
geoffjay wants to merge 1 commit into
Open
fix: resolve cargo audit vulnerabilities (rmcp 1.x migration)#1332geoffjay wants to merge 1 commit into
geoffjay wants to merge 1 commit into
Conversation
Resolve all 5 vulnerabilities reported by cargo audit by upgrading the affected crates, without adding any new advisory suppressions. - crossbeam-epoch 0.9.18 -> 0.9.21 (RUSTSEC-2026-0204) - h2 0.4.13 -> 0.4.19 (RUSTSEC-2026-0258) - quinn-proto 0.11.14 -> 0.11.17 (RUSTSEC-2026-0185) - rust_decimal pinned to 1.43.0, which drops its rkyv dependency entirely (RUSTSEC-2026-0235; rkyv, bytecheck, rend, ptr_meta and seahash are removed from Cargo.lock) - rmcp 0.1.5 -> 1.8.0 (RUSTSEC-2026-0189, DNS rebinding in the Streamable HTTP server transport, severity 8.8) The rmcp major-version upgrade required migrating crates/mcp to the rmcp 1.x handler model: - #[tool(tool_box)] -> #[tool_router] on the tools impl and #[tool_handler] on the ServerHandler impl - the per-argument #[tool(param)] + #[schemars(description)] style is gone; each of the 50 parameterised tools now takes a Parameters<Args> extractor backed by a dedicated #[derive(Deserialize, JsonSchema)] struct. Field docs carry over as doc comments, so the JSON Schemas exposed to MCP clients are unchanged (59 tools, same required lists and types) - ServerInfo is #[non_exhaustive] in 1.x; get_info now uses ServerInfo::new(capabilities).with_instructions(...) - schemars dependency 0.8 -> 1, matching rmcp 1.8's schema pipeline Verification: - cargo audit exits 0 with no vulnerabilities (only pre-existing allowed warnings remain) - cargo build --workspace clean; cargo clippy -p agentd-mcp clean; cargo fmt --check clean - cargo test -p agentd-mcp -p agentd-common: 184 passed, 0 failed - live stdio smoke test against the release binary: initialize handshake (protocol 2025-06-18) advertises tools capability and instructions, tools/list returns all 59 tools with correct schemas, tools/call executes and degrades gracefully when services are down, and a missing required argument returns an in-band isError result naming the missing field
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1332 +/- ##
===========================================
+ Coverage 49.19% 69.14% +19.95%
===========================================
Files 468 220 -248
Lines 31606 8998 -22608
Branches 3121 3171 +50
===========================================
- Hits 15547 6222 -9325
+ Misses 16027 2744 -13283
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
cargo auditwas failing with 5 vulnerabilities. This resolves all of them by upgrading the affected crates — no new advisory suppressions were added to.cargo/audit.toml.cargo update(transitive)cargo update(transitive)cargo update(transitive)rust_decimalto 1.43.0, which drops rkyvrust_decimal1.43.0 drops itsrkyvdependency, sorkyv,bytecheck,rend,ptr_metaandseahashare removed fromCargo.lockentirely.rmcp 0.1 → 1.8 migration (
crates/mcp)rmcp 1.x replaced the old macro/handler model, so
crates/mcp/src/server.rswas migrated:#[tool(tool_box)]→#[tool_router]on the tools impl;#[tool_handler]on theServerHandlerimpl.#[tool(param)]+#[schemars(description)]style is gone. Each of the 50 parameterised tools now takes aParameters<Args>extractor backed by a dedicated#[derive(Deserialize, JsonSchema)]struct; field docs carry over as doc comments, so the JSON Schemas exposed to MCP clients are unchanged (59 tools total, samerequiredlists and field types).ServerInfois#[non_exhaustive]in 1.x;get_infonow usesServerInfo::new(capabilities).with_instructions(...).schemarsdependency0.8→1, matching rmcp 1.8's schema pipeline.Note: RUSTSEC-2026-0189 is a DNS-rebinding issue in rmcp's Streamable HTTP server transport; this crate only uses the stdio transport, but the upgrade clears the advisory regardless.
Verification
cargo auditexits 0 — no vulnerabilities (only the pre-existing allowed warnings remain).cargo build --workspaceclean;cargo clippy -p agentd-mcpclean;cargo fmt --checkclean.cargo test -p agentd-mcp -p agentd-common: 184 passed, 0 failed.initializehandshake (protocol 2025-06-18) advertises the tools capability and instructions,tools/listreturns all 59 tools with correct schemas,tools/callexecutes and degrades gracefully when backing services are down, and a missing required argument returns an in-bandisErrorresult naming the missing field.