Architecture review item A5: drop dependencies that are declared but never referenced. Only Cargo.toml and Cargo.lock change; no source changes, so behaviour stays the same.
Found with cargo machete, then checked by grepping each crate's src, tests, bin/ and macro/path usage (including the dashboard's server/web feature-gated code).
Candidates
Crate
Dependency
Result
compliance-dast
chromiumoxide
removed (Chrome is driven over CDP via tokio-tungstenite)
compliance-dast
bollard
removed (the docker CLI is called instead)
compliance-agent
jsonwebtoken
removed
compliance-agent
futures-core
removed
compliance-dashboard
dioxus-logger
kept: dioxus_logger::init in bin/main.rs under #[cfg(feature = "web")]
compliance-dashboard
secrecy
removed, plus dep:secrecy in the server feature (secrets go through compliance_core::secret_box)
compliance-mcp
tower-http
removed
compliance-smoke
reqwest
removed
Also flagged by machete and removed after the same check:
compliance-dashboard: bson, plus dep:bson in server (the code uses the mongodb::bson re-export)
compliance-dast: bson, mongodb, serde, thiserror (the only "mongodb" hit is a "mongodb://" string)
compliance-graph: serde_json, thiserror, uuid
The bson chrono-0_4 feature stays on through compliance-core, which declares it unconditionally.
Out of scope (not workspace members): fuzz/ (compliance-core in a stub target) and fixtures/nightly/firmware/cargo-embedded (cortex-m/cortex-m-rt are link-time crates, so machete flags them wrongly).
No [workspace.dependencies] entry was orphaned, so the root Cargo.toml doesn't change.
Lockfile
21 packages removed: chromiumoxide (+ cdp/pdl/types), bollard (+ stubs), async-tungstenite, hyperlocal, hyper-named-pipe, tungstenite 0.23, futures-timer, which, home, winreg, winsafe, and older duplicate versions of hashbrown, heck, indexmap, rustix, linux-raw-sys and schemars. Nothing was added or bumped. The only + lines are dependency references losing their version suffix now that a single version is left.
Verification
cargo fmt --all --check
clippy -D warnings --all-targets: agent, mcp, smoke, dashboard (server and web) all clean
cargo clippy -p compliance-dast -p compliance-graph -- -D warnings is clean. With --all-targets, clippy fails on items_after_test_module in 8 dast tool files and graph/src/parsers/rust_parser.rs. That code is unchanged from main and CI doesn't clippy these crates, so it is not fixed here.
Architecture review item A5: drop dependencies that are declared but never referenced. Only Cargo.toml and Cargo.lock change; no source changes, so behaviour stays the same.
Found with `cargo machete`, then checked by grepping each crate's src, tests, bin/ and macro/path usage (including the dashboard's `server`/`web` feature-gated code).
## Candidates
| Crate | Dependency | Result |
|---|---|---|
| compliance-dast | `chromiumoxide` | removed (Chrome is driven over CDP via `tokio-tungstenite`) |
| compliance-dast | `bollard` | removed (the docker CLI is called instead) |
| compliance-agent | `jsonwebtoken` | removed |
| compliance-agent | `futures-core` | removed |
| compliance-dashboard | `dioxus-logger` | **kept**: `dioxus_logger::init` in `bin/main.rs` under `#[cfg(feature = "web")]` |
| compliance-dashboard | `secrecy` | removed, plus `dep:secrecy` in the `server` feature (secrets go through `compliance_core::secret_box`) |
| compliance-mcp | `tower-http` | removed |
| compliance-smoke | `reqwest` | removed |
Also flagged by machete and removed after the same check:
- compliance-dashboard: `bson`, plus `dep:bson` in `server` (the code uses the `mongodb::bson` re-export)
- compliance-dast: `bson`, `mongodb`, `serde`, `thiserror` (the only "mongodb" hit is a `"mongodb://"` string)
- compliance-graph: `serde_json`, `thiserror`, `uuid`
The bson `chrono-0_4` feature stays on through `compliance-core`, which declares it unconditionally.
Out of scope (not workspace members): `fuzz/` (`compliance-core` in a stub target) and `fixtures/nightly/firmware/cargo-embedded` (`cortex-m`/`cortex-m-rt` are link-time crates, so machete flags them wrongly).
No `[workspace.dependencies]` entry was orphaned, so the root Cargo.toml doesn't change.
## Lockfile
21 packages removed: chromiumoxide (+ cdp/pdl/types), bollard (+ stubs), async-tungstenite, hyperlocal, hyper-named-pipe, tungstenite 0.23, futures-timer, which, home, winreg, winsafe, and older duplicate versions of hashbrown, heck, indexmap, rustix, linux-raw-sys and schemars. Nothing was added or bumped. The only `+` lines are dependency references losing their version suffix now that a single version is left.
## Verification
- `cargo fmt --all --check`
- clippy `-D warnings --all-targets`: agent, mcp, smoke, dashboard (`server` and `web`) all clean
- `cargo clippy -p compliance-dast -p compliance-graph -- -D warnings` is clean. With `--all-targets`, clippy fails on `items_after_test_module` in 8 dast tool files and `graph/src/parsers/rust_parser.rs`. That code is unchanged from main and CI doesn't clippy these crates, so it is not fixed here.
- Tests: dast lib 63 passed, graph lib 86, agent lib 895 (7 ignored), dashboard lib (server) 103, mcp bins 37, smoke 0 (has no tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
cargo machete plus a grep of every source, test and bin file found these
declared but never referenced:
- compliance-agent: jsonwebtoken, futures-core
- compliance-dashboard: bson, secrecy (server feature; reached through
mongodb::bson and compliance_core::secret_box instead)
- compliance-dast: chromiumoxide, bollard, bson, mongodb, serde, thiserror
- compliance-graph: serde_json, thiserror, uuid
- compliance-mcp: tower-http
- compliance-smoke: reqwest
No code changes; Cargo.lock only loses 21 packages.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Architecture review item A5: drop dependencies that are declared but never referenced. Only Cargo.toml and Cargo.lock change; no source changes, so behaviour stays the same.
Found with
cargo machete, then checked by grepping each crate's src, tests, bin/ and macro/path usage (including the dashboard'sserver/webfeature-gated code).Candidates
chromiumoxidetokio-tungstenite)bollardjsonwebtokenfutures-coredioxus-loggerdioxus_logger::initinbin/main.rsunder#[cfg(feature = "web")]secrecydep:secrecyin theserverfeature (secrets go throughcompliance_core::secret_box)tower-httpreqwestAlso flagged by machete and removed after the same check:
bson, plusdep:bsoninserver(the code uses themongodb::bsonre-export)bson,mongodb,serde,thiserror(the only "mongodb" hit is a"mongodb://"string)serde_json,thiserror,uuidThe bson
chrono-0_4feature stays on throughcompliance-core, which declares it unconditionally.Out of scope (not workspace members):
fuzz/(compliance-corein a stub target) andfixtures/nightly/firmware/cargo-embedded(cortex-m/cortex-m-rtare link-time crates, so machete flags them wrongly).No
[workspace.dependencies]entry was orphaned, so the root Cargo.toml doesn't change.Lockfile
21 packages removed: chromiumoxide (+ cdp/pdl/types), bollard (+ stubs), async-tungstenite, hyperlocal, hyper-named-pipe, tungstenite 0.23, futures-timer, which, home, winreg, winsafe, and older duplicate versions of hashbrown, heck, indexmap, rustix, linux-raw-sys and schemars. Nothing was added or bumped. The only
+lines are dependency references losing their version suffix now that a single version is left.Verification
cargo fmt --all --check-D warnings --all-targets: agent, mcp, smoke, dashboard (serverandweb) all cleancargo clippy -p compliance-dast -p compliance-graph -- -D warningsis clean. With--all-targets, clippy fails onitems_after_test_modulein 8 dast tool files andgraph/src/parsers/rust_parser.rs. That code is unchanged from main and CI doesn't clippy these crates, so it is not fixed here.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
05e06a42d1toa4db3ae43e