Skip to content

Clear the cargo audit advisories and audit dependencies in CI - #145

Merged
saworbit merged 1 commit into
mainfrom
deps/audit-fixes
Nov 12, 2026
Merged

saworbit merged 1 commit into
mainfrom
deps/audit-fixes

Conversation

@saworbit

Copy link
Copy Markdown
Owner

Description

Fixes #143

cargo audit reported five vulnerabilities and two warnings on main, and CI ran neither cargo audit nor cargo deny. After this PR, cargo audit --deny warnings and cargo deny check both pass, and CI runs both.

  • reqwest (5 vulnerabilities, test-only): protocol-s3's streaming test used reqwest 0.11 with rustls. That brought in h2 0.3.27, rustls 0.21.12, rustls-webpki 0.101.7 and webpki-roots 0.25.4. None of them shipped in spacectl. The test talks plain HTTP to a local server, so it now uses reqwest 0.13.5 with default features off and only stream: no TLS and no HTTP/2. rustls is gone from Cargo.lock, and h2 is at 0.4.20, through the server stack.
  • serde_yaml (unmaintained, in spacectl): it's deprecated, and its unsafe-libyaml is unmaintained. It was the one flagged crate in the shipped binary, used for --policy-file. serde_norway 0.9.42 is a maintained fork with the same API and YAML syntax, enum tags included, pinned like the other serialization crates.
  • rustix 1.1.5 → 1.1.6 (unsound xattr functions), lockfile only.
  • Ignore lists: .cargo/audit.toml and deny.toml ignored about 30 advisories left from before the reset, including four rustls-webpki ones that would have hidden the next real hit. Without any ignores, cargo audit now reports only three unmaintained crates, so those are the only ignores left, each with a reason: bincode (the space.db encoding), and fxhash and instant via sled.
  • deny.toml bans: 74 skip entries for crates no longer in the tree are removed. There's a skip for syn 2.0.119, which a few proc macros still use next to syn 3. cargo deny check bans passes.
  • CI: a new "Audit dependencies" job installs cargo-audit and cargo-deny with taiki-e/install-action, then runs cargo audit --deny warnings and cargo deny check.
  • Docs: CONTRIBUTING's CI table, docs/dependency-security.md, docs/CI_CD_STRATEGY.md and CHANGELOG.

Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / cleanup
  • Docs / comments only

Checklist

Quality gates

  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • Tests pass (cargo test --workspace --no-fail-fast): 350 passed, 0 failed, including both streaming tests and the YAML policy tests
  • Docs compile (no public API changes)

Documentation

  • I updated relevant docs
  • CHANGELOG.md updated

Security

  • No hardcoded secrets, tokens, or keys introduced
  • External inputs are validated (policy files go through the same YAML parser lineage)
  • No new unsafe blocks

Dependency changes

  • Tier identified: serde_norway is tier 0 (serialization, pinned =0.9.42); reqwest is a dev-dependency (tier 2); rustix is transitive
  • cargo audit --deny warnings clean
  • cargo deny check clean (advisories, bans, licenses, sources)
  • cargo tree diff: reqwest 0.11 → 0.13.5 removes hyper 0.14, h2 0.3, the rustls 0.21 stack, webpki-roots and sync_wrapper 0.1 from the dev graph. serde_yaml/unsafe-libyaml → serde_norway/unsafe-libyaml-norway.

What a reviewer should know

  • MSRV: I couldn't check rust-version 1.89 locally (no 1.89 toolchain installed), so the MSRV job is the check. reqwest 0.13.5 declares 1.85 and serde_norway 1.71.
  • Policy files: with the new binary, spacectl create --policy-file on a YAML policy using an enum tag (compression: !Zstd) and dedupe: false created a capsule, and it read back byte for byte.
  • License warnings: cargo deny check still warns about three unused license allow and exception entries (pre-reset leftovers). They're warnings only.

cargo audit reported five vulnerabilities and two warnings on main, and
nothing in CI ran it.

- protocol-s3's streaming test talked to its local server through
  reqwest 0.11 with rustls, which brought in h2 0.3, rustls 0.21,
  rustls-webpki 0.101 and webpki-roots 0.25 and their five advisories.
  None of them shipped in spacectl. The test now uses reqwest 0.13.5
  with default features off and only stream, so no TLS or HTTP/2 stack.
- serde_yaml is deprecated and its unsafe-libyaml is unmaintained; it
  was the only flagged crate in the spacectl binary (--policy-file).
  serde_norway 0.9.42, a maintained fork, replaces it with the same
  YAML syntax, enum tags included.
- rustix 1.1.5 -> 1.1.6 (unsound xattr functions), lockfile only.
- .cargo/audit.toml and deny.toml ignored about 30 advisories left
  from before the reset, including four rustls-webpki ones. They now
  ignore only the three the tree still triggers, each with a reason:
  bincode (the space.db encoding), and fxhash and instant via sled.
  deny.toml drops 74 skip entries for crates no longer in the tree
  and skips syn 2.0.119, still used by a few proc macros next to syn 3.
- CI gains an "Audit dependencies" job running cargo audit --deny
  warnings and cargo deny check.
- CONTRIBUTING, docs/dependency-security.md, docs/CI_CD_STRATEGY.md
  and CHANGELOG describe the audit.

Fixes #143.
@saworbit
saworbit merged commit 5848233 into main Nov 12, 2026
3 checks passed
@saworbit
saworbit deleted the deps/audit-fixes branch November 12, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Deps] Clear the cargo audit advisories on main

1 participant