From c8807641ba4c9206d7f4ad0aa9a2605a0b35e408 Mon Sep 17 00:00:00 2001 From: Batuhan Saka Date: Wed, 18 Nov 2026 00:03:54 +0300 Subject: [PATCH 1/4] deps: bump rmcp to 3.11 and rustix to 1.1.6 (RUSTSEC-2026-0462, RUSTSEC-2026-0486) rmcp 1.7 -> 3.11: patches RUSTSEC-2026-0462, unbounded response body buffering in the Streamable HTTP clients. borg-mcp only uses the child-process transport (which already bounds lines itself), so it was not reachable, but the advisory fails the audit job. Port borg-mcp to the 3.x API: - `Content` / `RawContent` -> `ContentBlock` (same `type`-tagged wire shape) - `CancelledNotificationParam` is non-exhaustive with an optional `request_id`; build it with `::new` rustix 1.1.4 -> 1.1.6 (lockfile only): patches RUSTSEC-2026-0486, unsound xattr reads on zero-length buffers. Dev-only via tempfile. Fixes #1 Fixes #2 Claude-Session: https://claude.ai/code/session_01131vjxGVdfLmeKTTbm3TCe --- Cargo.lock | 154 ++++++++++++++++++++++++++++----- Cargo.toml | 2 +- crates/borg-mcp/src/client.rs | 8 +- crates/borg-mcp/src/convert.rs | 17 ++-- 4 files changed, 147 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b36589b..929999a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,9 +88,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "base64" -version = "0.22.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] name = "bitflags" @@ -98,6 +98,15 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + [[package]] name = "borg" version = "1.0.0" @@ -318,12 +327,27 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +[[package]] +name = "const-oid" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" + [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "criterion" version = "0.5.1" @@ -393,11 +417,20 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + [[package]] name = "darling" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" dependencies = [ "darling_core", "darling_macro", @@ -405,26 +438,37 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" dependencies = [ "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn 3.0.9", ] [[package]] name = "darling_macro" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" dependencies = [ "darling_core", "quote", - "syn 2.0.117", + "syn 3.0.9", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", ] [[package]] @@ -621,6 +665,15 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + [[package]] name = "iana-time-zone" version = "0.1.65" @@ -852,6 +905,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a" +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -907,9 +966,9 @@ dependencies = [ [[package]] name = "process-wrap" -version = "9.1.0" +version = "10.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e842efad9119158434d193c6682e2ebee4b44d6ad801d7b349623b3f57cdf55" +checksum = "1f21b97672d2dc848e7b25701ab4535618b92f4861c13cc3f7f7bed52ad3c8da" dependencies = [ "futures", "indexmap", @@ -1014,46 +1073,52 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rmcp" -version = "1.7.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0810a9f717d9828f475fe1f629f4c305c8464b7f496c3a854b58d29e65f4058e" +checksum = "391f153431ab68664d946513ea0cb3edbca78eaf99c5a983036cacab6220d85b" dependencies = [ - "async-trait", "base64", "chrono", "futures", + "indexmap", + "libc", "pastey", + "percent-encoding", "pin-project-lite", "process-wrap", "rmcp-macros", "schemars", "serde", "serde_json", + "sha2", "thiserror", "tokio", "tokio-stream", "tokio-util", "tracing", + "unicode-general-category", + "unicode-normalization", + "uuid", ] [[package]] name = "rmcp-macros" -version = "1.7.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aefac48c364756e97f04c0401ba3231e8607882c7c1d92da0437dc16307904d" +checksum = "3598e3f36f4af2b5219b133baf7d97a2197039225adc3d4acf3dd8805b5a2aef" dependencies = [ "darling", "proc-macro2", "quote", "serde_json", - "syn 2.0.117", + "syn 3.0.9", ] [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags", "errno", @@ -1169,6 +1234,17 @@ dependencies = [ "zmij", ] +[[package]] +name = "sha2" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -1302,6 +1378,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + [[package]] name = "tokio" version = "1.54.1" @@ -1437,18 +1519,50 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +[[package]] +name = "unicode-normalization" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" +dependencies = [ + "tinyvec", +] + [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "uuid" +version = "1.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" +dependencies = [ + "getrandom", + "js-sys", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index 1a83ee8..b4a8c3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ lru = "0.18" parking_lot = "0.12" proc-macro2 = "1" quote = "1" -rmcp = { version = "1.7", features = ["client", "transport-child-process"] } +rmcp = { version = "3.11", features = ["client", "transport-child-process"] } serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" syn = { version = "2", features = ["full"] } diff --git a/crates/borg-mcp/src/client.rs b/crates/borg-mcp/src/client.rs index c27bcc7..392ab03 100644 --- a/crates/borg-mcp/src/client.rs +++ b/crates/borg-mcp/src/client.rs @@ -397,10 +397,10 @@ impl McpClient { // Best effort: tell the server to stop working on it. Bounded so // a wedged transport can't turn a timeout into another hang. - let notify = self.peer.notify_cancelled(CancelledNotificationParam { - request_id: id, - reason: Some(reason.to_string()), - }); + let notify = self.peer.notify_cancelled(CancelledNotificationParam::new( + Some(id), + Some(reason.to_string()), + )); let _ = tokio::time::timeout(Duration::from_secs(1), notify).await; Err(err) } diff --git a/crates/borg-mcp/src/convert.rs b/crates/borg-mcp/src/convert.rs index e40a721..15ff6bc 100644 --- a/crates/borg-mcp/src/convert.rs +++ b/crates/borg-mcp/src/convert.rs @@ -14,7 +14,7 @@ //! `ServiceError`) become `BorgError::Internal`. use borg::{BorgError, ToolCallResult, ToolSchema}; -use rmcp::model::{CallToolResult, RawContent, Tool}; +use rmcp::model::{CallToolResult, ContentBlock, Tool}; /// Convert an rmcp `Tool` (from `tools/list`) to a borg `ToolSchema`. /// @@ -99,10 +99,10 @@ pub(crate) fn cap_result(result: ToolCallResult, max_bytes: usize) -> ToolCallRe /// Join all `text` blocks in a content vec with `\n` for an /// `is_error: true` result. Non-text blocks are skipped. -fn joined_text(content: &[rmcp::model::Content]) -> String { +fn joined_text(content: &[ContentBlock]) -> String { let mut buf = String::new(); for block in content { - if let RawContent::Text(t) = &block.raw { + if let ContentBlock::Text(t) = block { if !buf.is_empty() { buf.push('\n'); } @@ -119,7 +119,7 @@ fn joined_text(content: &[rmcp::model::Content]) -> String { /// Serialize a content vec to a JSON array, preserving block types via /// rmcp's own `Serialize` impls (canonical MCP wire shape). -fn content_vec_to_json(content: &[rmcp::model::Content]) -> serde_json::Value { +fn content_vec_to_json(content: &[ContentBlock]) -> serde_json::Value { let items: Vec = content .iter() .filter_map(|block| serde_json::to_value(block).ok()) @@ -130,7 +130,6 @@ fn content_vec_to_json(content: &[rmcp::model::Content]) -> serde_json::Value { #[cfg(test)] mod tests { use super::*; - use rmcp::model::Content; use std::sync::Arc; fn make_tool(name: &'static str, desc: Option<&'static str>) -> Tool { @@ -175,8 +174,8 @@ mod tests { #[test] fn result_to_borg_success_with_content_array() { let result = CallToolResult::success(vec![ - Content::text("first line"), - Content::text("second line"), + ContentBlock::text("first line"), + ContentBlock::text("second line"), ]); let borg_result = result_to_borg(result).unwrap(); let output = borg_result.output.unwrap(); @@ -194,8 +193,8 @@ mod tests { #[test] fn result_to_borg_error_joins_text() { let result = CallToolResult::error(vec![ - Content::text("file not found"), - Content::text("path: /tmp/missing"), + ContentBlock::text("file not found"), + ContentBlock::text("path: /tmp/missing"), ]); let borg_result = result_to_borg(result).unwrap(); assert!(borg_result.output.is_none()); From 00fc6c707272a0d77c3b12faccb878da78686d94 Mon Sep 17 00:00:00 2001 From: Batuhan Saka Date: Wed, 18 Nov 2026 00:09:53 +0300 Subject: [PATCH 2/4] ci: keep MSRV 1.88 and cargo deny green after the rmcp bump - rmcp: disable default features. borg-mcp only needs `client` and `transport-child-process`; the default `server` feature pulled in uuid 1.29, which requires rustc 1.89 and broke the 1.88 clippy/test jobs. Also drops ~150 lines of unused deps from the lockfile. - deny.toml: ignore RUSTSEC-2026-0543 (chrono unmaintained). It is informational with no patched version, and chrono is a non-optional dependency of rmcp, so there is nothing to upgrade to yet. Claude-Session: https://claude.ai/code/session_01131vjxGVdfLmeKTTbm3TCe --- Cargo.lock | 150 ----------------------------------------------------- Cargo.toml | 2 +- deny.toml | 7 ++- 3 files changed, 7 insertions(+), 152 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 929999a..e27d4b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,12 +86,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "base64" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" - [[package]] name = "bitflags" version = "2.11.1" @@ -426,40 +420,6 @@ dependencies = [ "hybrid-array", ] -[[package]] -name = "darling" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" -dependencies = [ - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 3.0.9", -] - -[[package]] -name = "darling_macro" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" -dependencies = [ - "darling_core", - "quote", - "syn 3.0.9", -] - [[package]] name = "digest" version = "0.11.3" @@ -471,12 +431,6 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dyn-clone" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" - [[package]] name = "either" version = "1.16.0" @@ -704,12 +658,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "indexmap" version = "2.14.0" @@ -899,12 +847,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "pastey" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a" - [[package]] name = "percent-encoding" version = "2.3.2" @@ -1022,26 +964,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "ref-cast" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "regex" version = "1.12.3" @@ -1077,17 +999,13 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391f153431ab68664d946513ea0cb3edbca78eaf99c5a983036cacab6220d85b" dependencies = [ - "base64", "chrono", "futures", "indexmap", "libc", - "pastey", "percent-encoding", "pin-project-lite", "process-wrap", - "rmcp-macros", - "schemars", "serde", "serde_json", "sha2", @@ -1098,20 +1016,6 @@ dependencies = [ "tracing", "unicode-general-category", "unicode-normalization", - "uuid", -] - -[[package]] -name = "rmcp-macros" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3598e3f36f4af2b5219b133baf7d97a2197039225adc3d4acf3dd8805b5a2aef" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "serde_json", - "syn 3.0.9", ] [[package]] @@ -1142,32 +1046,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schemars" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" -dependencies = [ - "chrono", - "dyn-clone", - "ref-cast", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.117", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -1210,17 +1088,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "serde_json" version = "1.0.150" @@ -1298,12 +1165,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - [[package]] name = "syn" version = "2.0.117" @@ -1552,17 +1413,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "uuid" -version = "1.29.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" -dependencies = [ - "getrandom", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.1" diff --git a/Cargo.toml b/Cargo.toml index b4a8c3f..2d1813b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ lru = "0.18" parking_lot = "0.12" proc-macro2 = "1" quote = "1" -rmcp = { version = "3.11", features = ["client", "transport-child-process"] } +rmcp = { version = "3.11", default-features = false, features = ["client", "transport-child-process"] } serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" syn = { version = "2", features = ["full"] } diff --git a/deny.toml b/deny.toml index ec8e6be..f55912b 100644 --- a/deny.toml +++ b/deny.toml @@ -4,7 +4,12 @@ all-features = true [advisories] version = 2 yanked = "deny" -ignore = [] +ignore = [ + # chrono is unmaintained (informational, no vulnerability, no patched + # version). It is a non-optional dependency of rmcp, borg-mcp's MCP SDK, + # so it can't be dropped from here. Remove once rmcp moves off chrono. + { id = "RUSTSEC-2026-0543", reason = "unmaintained, transitive via rmcp; no alternative upstream yet" }, +] [licenses] version = 2 From 4cc42d5f55e53cae87072bfb70e6aefd2874edec Mon Sep 17 00:00:00 2001 From: Batuhan Saka Date: Wed, 18 Nov 2026 00:15:24 +0300 Subject: [PATCH 3/4] build: fix cargo 1.100 workspace manifest warnings - Crates now inherit `publish` via `publish.workspace = true` instead of each repeating `publish = false`, so the workspace field is actually used (as its comment intends: new crates are unpublishable by default). - Drop workspace dependencies no crate inherits: borg-loop, borg-mcp, borg-tools, borg-tracing (nothing depends on them) and dashmap (unused). No resolved-dependency change; Cargo.lock is untouched. Claude-Session: https://claude.ai/code/session_01131vjxGVdfLmeKTTbm3TCe --- Cargo.toml | 5 ----- crates/borg-loop/Cargo.toml | 2 +- crates/borg-macros/Cargo.toml | 2 +- crates/borg-mcp/Cargo.toml | 2 +- crates/borg-sandbox/Cargo.toml | 2 +- crates/borg-tools/Cargo.toml | 2 +- crates/borg-tracing/Cargo.toml | 2 +- crates/borg/Cargo.toml | 2 +- 8 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d1813b..4b32526 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,16 +25,11 @@ publish = false [workspace.dependencies] borg = { path = "crates/borg" } -borg-loop = { path = "crates/borg-loop" } borg-macros = { path = "crates/borg-macros" } -borg-mcp = { path = "crates/borg-mcp" } -borg-tools = { path = "crates/borg-tools" } -borg-tracing = { path = "crates/borg-tracing" } arc-swap = "1" async-stream = "0.3" async-trait = "0.1" -dashmap = "6" futures = "0.3" lru = "0.18" # Non-poisoning locks: a panic while holding a `std::sync` guard makes diff --git a/crates/borg-loop/Cargo.toml b/crates/borg-loop/Cargo.toml index cef1c12..bd187ea 100644 --- a/crates/borg-loop/Cargo.toml +++ b/crates/borg-loop/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-loop" version.workspace = true edition.workspace = true diff --git a/crates/borg-macros/Cargo.toml b/crates/borg-macros/Cargo.toml index 7968a68..2a205e6 100644 --- a/crates/borg-macros/Cargo.toml +++ b/crates/borg-macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-macros" version.workspace = true edition.workspace = true diff --git a/crates/borg-mcp/Cargo.toml b/crates/borg-mcp/Cargo.toml index bb27738..d4198c1 100644 --- a/crates/borg-mcp/Cargo.toml +++ b/crates/borg-mcp/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-mcp" version.workspace = true edition.workspace = true diff --git a/crates/borg-sandbox/Cargo.toml b/crates/borg-sandbox/Cargo.toml index dc7bd0f..0ded7f8 100644 --- a/crates/borg-sandbox/Cargo.toml +++ b/crates/borg-sandbox/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-sandbox" version.workspace = true edition.workspace = true diff --git a/crates/borg-tools/Cargo.toml b/crates/borg-tools/Cargo.toml index a852ee2..3640a74 100644 --- a/crates/borg-tools/Cargo.toml +++ b/crates/borg-tools/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-tools" version.workspace = true edition.workspace = true diff --git a/crates/borg-tracing/Cargo.toml b/crates/borg-tracing/Cargo.toml index 8425b9d..ba694ef 100644 --- a/crates/borg-tracing/Cargo.toml +++ b/crates/borg-tracing/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg-tracing" version.workspace = true edition.workspace = true diff --git a/crates/borg/Cargo.toml b/crates/borg/Cargo.toml index b9deea9..393e57d 100644 --- a/crates/borg/Cargo.toml +++ b/crates/borg/Cargo.toml @@ -1,5 +1,5 @@ [package] -publish = false # GitHub-only distribution; consumers pin a release tag +publish.workspace = true name = "borg" version.workspace = true edition.workspace = true From 403457ab5d704f1101794e041c0941e324ab05ad Mon Sep 17 00:00:00 2001 From: Batuhan Saka Date: Wed, 18 Nov 2026 00:21:19 +0300 Subject: [PATCH 4/4] ci(audit): run audit-check nightly only, on Node 24; mirror chrono ignore - The `cargo audit` job failed on pull requests: rustsec/audit-check reports through a check run there, and updating it 404s. cargo deny already gates advisories on push/PR, so audit-check now runs only on schedule/workflow_dispatch, where it opens an issue per advisory. - `push` is limited to main (as in ci.yml), so PR branches no longer run the workflow twice. - Pin audit-check to upstream main (858dc40), which is v2.0.0 with the runtime moved to Node 24; Node 20 actions are deprecated. - .cargo/audit.toml ignores RUSTSEC-2026-0543 (chrono unmaintained), like deny.toml, so the nightly job does not file an issue for it. Claude-Session: https://claude.ai/code/session_01131vjxGVdfLmeKTTbm3TCe --- .cargo/audit.toml | 10 ++++++++++ .github/workflows/audit.yml | 16 ++++++++++++++-- deny.toml | 3 ++- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .cargo/audit.toml diff --git a/.cargo/audit.toml b/.cargo/audit.toml new file mode 100644 index 0000000..206b3f4 --- /dev/null +++ b/.cargo/audit.toml @@ -0,0 +1,10 @@ +# cargo-audit config (local `cargo audit` and the nightly Audit workflow). +# Keep in sync with the advisory ignores in deny.toml. + +[advisories] +ignore = [ + # chrono is unmaintained (informational, no vulnerability, no patched + # version). It is a non-optional dependency of rmcp, borg-mcp's MCP SDK. + # Remove once rmcp moves off chrono. + "RUSTSEC-2026-0543", +] diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 924ce85..53b28f0 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -1,16 +1,24 @@ name: Audit +# Two jobs over the same RustSec advisory database: +# - `cargo deny` gates every change to the dependency graph (push to main, +# pull requests) and is the advisory check that blocks merges. +# - `cargo audit` runs nightly and on demand, and opens an issue per new +# advisory, so advisories published after a merge still surface. on: push: + branches: [main] paths: - "**/Cargo.toml" - "**/Cargo.lock" + - ".cargo/audit.toml" - ".github/workflows/audit.yml" - "deny.toml" pull_request: paths: - "**/Cargo.toml" - "**/Cargo.lock" + - ".cargo/audit.toml" - ".github/workflows/audit.yml" - "deny.toml" schedule: @@ -23,17 +31,21 @@ permissions: jobs: audit: name: cargo audit + # Not on push/pull_request: there audit-check reports through a check + # run that 404s on pull requests, and `cargo deny` already covers + # advisories for those events. + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest permissions: contents: read - # audit-check opens an issue (scheduled runs) and posts a check run. issues: write checks: write steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 + # Unreleased main: v2.0.0 plus the Node 24 runtime (Node 20 is deprecated). + - uses: rustsec/audit-check@858dc40f52ca2b8570b7a997c1c4e35c6fc9a432 # main (node24) with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/deny.toml b/deny.toml index f55912b..36bb703 100644 --- a/deny.toml +++ b/deny.toml @@ -7,7 +7,8 @@ yanked = "deny" ignore = [ # chrono is unmaintained (informational, no vulnerability, no patched # version). It is a non-optional dependency of rmcp, borg-mcp's MCP SDK, - # so it can't be dropped from here. Remove once rmcp moves off chrono. + # so it can't be dropped from here. Remove once rmcp moves off chrono, + # together with the matching ignore in .cargo/audit.toml. { id = "RUSTSEC-2026-0543", reason = "unmaintained, transitive via rmcp; no alternative upstream yet" }, ]