~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

The dependencies are checked by cargo-deny, and no crate has unsafe code

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:check/deny

What changes

Dependencies are checked. The check workflow runs cargo deny check against the new deny.toml, and so does just lint. It fails on any RustSec advisory, including unmaintained crates, unsound crates and yanked versions. It also fails on a licence outside the permissive list, and on a crate from anywhere but crates.io or the atproto registry. CI installs cargo-deny 0.22.0 and caches it in /opt/cargo-deny.

The three advisories it found are fixed by upgrades; none is ignored:

  • RUSTSEC-2026-0387 (crypto-bigint 0.5 isn't constant-time): atproto 0.3.0, which moves to k256/p256 0.14 and crypto-bigint 0.7.11. Its pull is at://did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n2ziso2bmr4f.
  • RUSTSEC-2026-0459 (bundled SQLite older than 3.54 can return uninitialised memory when it opens a crafted db with its -wal file): rusqlite 0.40 → 0.43, which brings libsqlite3-sys 0.40.
  • RUSTSEC-2026-0592 (stack overflow in Url::origin() on nested blob: URLs): url 2.5.8 → 2.5.9, in the lockfile.

No unsafe code. [workspace.lints.rust] unsafe_code = "forbid", and every crate takes the workspace's lints, so the build refuses unsafe code in every target, tests included. There was none to remove.

Workspace tidied. The crates are now publish = false, so cargo-deny doesn't count their path dependencies on each other as wildcards. The workspace drops dependencies it declared but no crate used: base64, blake3, bs58, ciborium, ecdsa, k256, p256, unicode-segmentation and opensocial.

Why

Some of the code at risk here holds keys: the host signs repo commits and service auth with keys from the atproto crate, which is where the crypto-bigint timing issue was. spec-pds already has the same gates, and this brings the host level with it.

How it was checked

Locally on Rust 1.100: cargo clippy --workspace --all-targets -D warnings is clean, and cargo deny check reports advisories, bans, licences and sources all ok. I ran the SQLite-heavy test files locally after the rusqlite upgrade. The whole suite, under the coverage gate, and clippy on 1.98 are left to CI.

Shortcomings

The advisories are read as they stand at each run, so check can go red on main the day a new advisory is published, with no commit to blame. That's on purpose: the fix is an upgrade. CI stays on Rust 1.98; moving to 1.100 is a pull of its own.

Approved

This adds cargo deny check to the check workflow and to just lint, backed by a strict deny.toml. It forbids unsafe code through workspace lints, and it upgrades atproto, rusqlite and url to clear the three advisories.

  • Check run: the check workflow passed at this head, including the deny step. web, lexicons and docs pass or skip. test and e2e were still running when I looked, so the rusqlite 0.43 upgrade is not yet confirmed against the full suite.
  • Cargo.toml: the removed workspace dependencies are not used by any crate. Every crate manifest takes workspace = true for its dependencies, and none of them names a removed one. All three crates now carry publish.workspace and [lints] workspace = true.
  • Docs: AGENTS.md and docs/development.md are updated to match.
  • Cargo.lock: it is consistent with the stated upgrades.

I found nothing that needs changing. Before merging, wait for test to pass under the coverage gate.

Merged as 89118ef