Skip to content

Commit 94aaef5

Browse files
committed
fix(deps): scope security exceptions and patch desktop archives
Keep Mesh-LLM ZIP advisory exceptions in its smoke-only policy. Check runtime and desktop dependency graphs separately and include desktop Rust changes in the security gate. Upgrade desktop ZIP and pin the upstream updater ZIP fix. Verify that the desktop ringbuf exception remains an unused dependency of pinned NetEQ. Preserve the upstream dependency repairs and explicit bans on vulnerable trust roots. Signed-off-by: Tee8z <[email protected]>
1 parent 44bb203 commit 94aaef5

13 files changed

Lines changed: 743 additions & 336 deletions

File tree

‎.github/workflows/_ci-security.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2727
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
28-
- name: Dependency policy
29-
run: cargo-deny check
28+
- name: Runtime dependency policy
29+
run: cargo-deny --exclude buzz-mesh-smoke check
30+
- name: Mesh-LLM smoke dependency policy
31+
run: cargo-deny --manifest-path crates/buzz-mesh-smoke/Cargo.toml check --config deny-mesh.toml
32+
- name: Verify desktop dependency exceptions
33+
run: python3 scripts/check-desktop-dependency-exceptions.py
34+
- name: Desktop dependency policy
35+
run: cargo-deny --manifest-path desktop/src-tauri/Cargo.toml check --config deny-desktop.toml
3036

3137

3238
results:

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
- 'scripts/test-postgres-test-discovery.sh'
5858
- 'scripts/test-postgres-test-wrapper.sh'
5959
- 'deny.toml'
60+
- 'deny-mesh.toml'
61+
- 'deny-desktop.toml'
62+
- 'scripts/check-desktop-dependency-exceptions.py'
6063
- '.github/workflows/ci.yml'
6164
- '.github/workflows/_ci-*.yml'
6265
- 'docker-compose.yml'
@@ -255,10 +258,10 @@ jobs:
255258
security-domain:
256259
name: Security Domain
257260
needs: [changes]
258-
if: github.event_name == 'push' || needs.changes.outputs.rust == 'true'
261+
if: github.event_name == 'push' || (needs.changes.outputs.rust == 'true' || needs.changes.outputs.desktop-rust == 'true')
259262
uses: ./.github/workflows/_ci-security.yml
260263
with:
261-
rust: ${{ needs.changes.outputs.rust == 'true' }}
264+
rust: ${{ (needs.changes.outputs.rust == 'true' || needs.changes.outputs.desktop-rust == 'true') }}
262265

263266
rust-lint:
264267
name: Rust Lint
@@ -430,7 +433,7 @@ jobs:
430433

431434
security:
432435
name: Security
433-
if: always() && (needs.changes.result != 'success' || ((github.event_name == 'push' || needs.changes.outputs.rust == 'true')))
436+
if: always() && (needs.changes.result != 'success' || ((github.event_name == 'push' || needs.changes.outputs.rust == 'true' || needs.changes.outputs.desktop-rust == 'true')))
434437
needs: [changes, security-domain]
435438
runs-on: ubuntu-latest
436439
timeout-minutes: 5

‎Cargo.lock‎

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎SECURITY.md‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,24 @@ controllers.
122122

123123
### Dependency Management
124124

125-
We use `cargo audit` in CI to scan for known vulnerabilities in dependencies.
125+
CI checks runtime, Mesh-LLM smoke, and desktop dependencies with separate
126+
`cargo-deny` policies. The desktop policy checks every feature, including the
127+
optional `mesh-llm` graph that release builds enable. Its ZIP advisory
128+
exceptions cover only `zip` below 9 under `mesh-llm`. The guard script verifies
129+
that the default desktop graph has no `zip` below 9, that `mesh-llm` is its
130+
only consumer, and that `mesh-llm` never calls the affected extract APIs. It also
131+
verifies that the `ringbuf` exception remains an unused dependency of the pinned
132+
NetEQ source.
133+
134+
Run the same checks locally from the repository root:
135+
136+
```bash
137+
cargo-deny --exclude buzz-mesh-smoke check
138+
cargo-deny --manifest-path crates/buzz-mesh-smoke/Cargo.toml check --config deny-mesh.toml
139+
python3 scripts/check-desktop-dependency-exceptions.py
140+
cargo-deny --manifest-path desktop/src-tauri/Cargo.toml check --config deny-desktop.toml
141+
```
142+
126143
`#![deny(unsafe_code)]` is enforced across all crates — no unsafe Rust.
127144

128145
---

‎deny-desktop.toml‎

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Desktop policy. Every feature is checked, including the Mesh-LLM graph that
2+
# release builds enable.
3+
[graph]
4+
all-features = true
5+
6+
[advisories]
7+
ignore = [
8+
# zip 8.6.0 < 9: extraction keeps setuid/setgid bits (0367), creates
9+
# symlinks that escape the destination (0368) and applies permissions through
10+
# symlinks (0369). Only path: the optional mesh-llm feature → mesh-llm v0.76.2
11+
# → mesh-llm-host-runtime / mesh-llm-plugin-manager / mesh-llm-system → zip 8.
12+
# No mesh-llm release uses zip 9 yet. Its readers copy entries through
13+
# enclosed_name() and never call the affected extract APIs;
14+
# check-desktop-dependency-exceptions.py verifies that, and that the default
15+
# graph has no zip below 9. Remove on the mesh-llm bump that moves to zip 9.
16+
{ id = "RUSTSEC-2026-0367", reason = "zip 8.6.0 only via the optional mesh-llm feature; manual entry copy, never extracts; guard-verified" },
17+
{ id = "RUSTSEC-2026-0368", reason = "zip 8.6.0 only via the optional mesh-llm feature; manual entry copy, never extracts; guard-verified" },
18+
{ id = "RUSTSEC-2026-0369", reason = "zip 8.6.0 only via the optional mesh-llm feature; manual entry copy, never extracts; guard-verified" },
19+
# These desktop transitive dependencies have maintenance notices, not
20+
# vulnerability reports. Remove when opus, user-idle, and GTK migrate.
21+
{ id = "RUSTSEC-2026-0150", reason = "audiopus_sys via opus; unmaintained with no safe upstream upgrade" },
22+
{ id = "RUSTSEC-2020-0168", reason = "mach via user-idle; unmaintained with no safe upstream upgrade" },
23+
{ id = "RUSTSEC-2024-0370", reason = "proc-macro-error via GTK glib-macros; unmaintained with no safe upstream upgrade" },
24+
# neteq 0.8.3 declares ringbuf but never uses it: its buffer is VecDeque.
25+
# CI verifies the pinned source has no reference and no other graph parent.
26+
# Remove when neteq drops its unused dependency or upgrades to ringbuf 0.5.2.
27+
{ id = "RUSTSEC-2026-0293", reason = "unused dependency of pinned neteq 0.8.3; check-desktop-dependency-exceptions.py verifies it stays unreachable" },
28+
# 0.26.11 contains no roots: it re-exports webpki-roots 1.x. Both lockfiles
29+
# resolve that parent to 1.0.10, which removes the distrusted emSign root.
30+
# The advisory also flags this compatibility wrapper. The bans below keep
31+
# every other affected version forbidden while this false positive remains.
32+
{ id = "RUSTSEC-2026-0381", reason = "0.26.11 only re-exports the patched 1.0.10 roots; bans enforce patched versions for all other releases" },
33+
# instant 0.1.13 — unmaintained crate. Transitive dep: nostr → instant.
34+
# Will be resolved when nostr crate updates its dependencies.
35+
{ id = "RUSTSEC-2024-0384", reason = "transitive dep via nostr; no upstream fix available" },
36+
# paste 1.0.15 — unmaintained. Transitive dep: mesh-llm → iroh → netlink-* → paste.
37+
# No safe upgrade available; tracked for upstream (iroh/netlink) replacement.
38+
{ id = "RUSTSEC-2024-0436", reason = "transitive dep via mesh-llm → iroh → netlink; no upstream fix available" },
39+
# quick-xml < 0.41: quadratic runtime on duplicate-attribute check (0194) and
40+
# unbounded namespace-declaration allocation in NsReader (0195). Both DoS-class,
41+
# requiring attacker-controlled XML. Our two locked versions only parse trusted
42+
# input: 0.38.4 (rust-s3/aws-creds — responses from our own S3/MinIO endpoint)
43+
# and 0.39.4 (mesh-llm → iroh → netdev → plist — local macOS system plists).
44+
# Patched release (>= 0.41.0) is unreachable until rust-s3 and plist/netdev bump;
45+
# remove these when upstream catches up.
46+
{ id = "RUSTSEC-2026-0194", reason = "transitive via rust-s3 and mesh-llm→plist; trusted-input XML only; no upstream fix available yet" },
47+
{ id = "RUSTSEC-2026-0195", reason = "transitive via rust-s3 and mesh-llm→plist; trusted-input XML only; no upstream fix available yet" },
48+
# unsafe-libyaml 0.2.11 — unmaintained (repository archived 2024-03-25), not a
49+
# vulnerability report. Transitive dep: serde_yaml → unsafe-libyaml. The serde_yaml_ng
50+
# fork uses the same crate, so removing it means migrating YAML parsing in
51+
# buzz-agent, buzz-persona, buzz-relay, buzz-workflow and desktop.
52+
{ id = "RUSTSEC-2024-0449", reason = "transitive via serde_yaml; unmaintained, not vulnerable; removal needs a YAML parser migration" },
53+
# zbus 5 D-Bus crates (zvariant, zbus_names, zvariant_derive) — unmaintained,
54+
# not vulnerable. Only path: buzz-mesh-smoke → mesh-llm → keyring 4 →
55+
# zbus-secret-service-keyring-store / secret-service 5 → zbus 5.
56+
# Remove when mesh-llm's keyring stack moves off zbus 5.
57+
{ id = "RUSTSEC-2026-0370", reason = "zvariant via buzz-mesh-smoke → mesh-llm → keyring 4 → secret-service 5 → zbus 5; unmaintained, not vulnerable" },
58+
{ id = "RUSTSEC-2026-0371", reason = "zbus_names via buzz-mesh-smoke → mesh-llm → keyring 4 → secret-service 5 → zbus 5; unmaintained, not vulnerable" },
59+
{ id = "RUSTSEC-2026-0372", reason = "zvariant_derive via buzz-mesh-smoke → mesh-llm → keyring 4 → secret-service 5 → zbus 5; unmaintained, not vulnerable" },
60+
]
61+
62+
[licenses]
63+
allow = [
64+
"MIT",
65+
"Apache-2.0",
66+
"Apache-2.0 WITH LLVM-exception",
67+
"BSD-2-Clause",
68+
"BSD-3-Clause",
69+
"ISC",
70+
"Unicode-3.0",
71+
"Unicode-DFS-2016",
72+
"Zlib",
73+
"OpenSSL",
74+
"CC0-1.0",
75+
"CDLA-Permissive-2.0",
76+
"MITNFA",
77+
"MPL-2.0",
78+
"BSL-1.0",
79+
"Unlicense",
80+
# minicbor's permissive, OSI-approved license. Used for strict App Attest
81+
# assertion CBOR parsing and also transitively by appattest.
82+
"BlueOak-1.0.0",
83+
# bzip2/libbzip2's permissive BSD-like license. New via desktop zip/bzip2
84+
# transitive deps; compatible with Apache-2.0 distribution.
85+
"bzip2-1.0.6",
86+
]
87+
confidence-threshold = 0.8
88+
89+
# mesh-llm workspace crates (pinned git dep) omit a per-crate `license` field in
90+
# their manifests, so cargo-deny reports them as unlicensed. The mesh-llm repo is
91+
# licensed "MIT OR Apache-2.0" (workspace Cargo.toml + top-level LICENSE = Apache-2.0);
92+
# clarify each pulled-in member to that expression. Remove once mesh sets the field
93+
# upstream (filed).
94+
[[licenses.clarify]]
95+
crate = "mesh-llm-config"
96+
expression = "MIT OR Apache-2.0"
97+
license-files = []
98+
99+
[[licenses.clarify]]
100+
crate = "mesh-llm-gpu-bench"
101+
expression = "MIT OR Apache-2.0"
102+
license-files = []
103+
104+
[[licenses.clarify]]
105+
crate = "mesh-llm-host-runtime"
106+
expression = "MIT OR Apache-2.0"
107+
license-files = []
108+
109+
[[licenses.clarify]]
110+
crate = "mesh-llm-plugin"
111+
expression = "MIT OR Apache-2.0"
112+
license-files = []
113+
114+
[[licenses.clarify]]
115+
crate = "mesh-llm-system"
116+
expression = "MIT OR Apache-2.0"
117+
license-files = []
118+
119+
[[licenses.clarify]]
120+
crate = "mesh-mixture-of-agents"
121+
expression = "MIT OR Apache-2.0"
122+
license-files = []
123+
124+
[[licenses.clarify]]
125+
crate = "buzz-desktop"
126+
expression = "Apache-2.0"
127+
license-files = []
128+
129+
[licenses.private]
130+
ignore = true
131+
132+
[bans]
133+
# RUSTSEC-2026-0381: allow only the 0.26.11 re-export wrapper or patched roots.
134+
deny = [
135+
{ name = "webpki-roots", version = "<0.26.11" },
136+
{ name = "webpki-roots", version = ">0.26.11, <1.0.10" },
137+
]
138+
multiple-versions = "warn"
139+
wildcards = "allow"

0 commit comments

Comments
 (0)