Skip to content

dependency-licenses.csv is unverified and missing 8 direct dependencies and 13 workspace members #661

Closed

Description

@vyncint

Summary

dependency-licenses.csv is the "tracked license inventory" the README points at, and CONTRIBUTING asks contributors to update it by hand when adding a dependency. Nothing verifies it, and it has fallen behind: 8 of 28 directly declared third-party dependencies and 13 of 23 workspace members have no row.

Missing third-party direct dependencies:

Crate Kind Declared by
clap normal cargo-oxide
futures normal cuda-async
object normal oxide-artifacts
serde normal cuda-intrinsics-gen
serde_json normal cargo-oxide, cuda-intrinsics-gen
sha2 normal cargo-oxide, cuda-artifact-finalizer, cuda-host, cuda-intrinsics-gen
toml normal cargo-oxide, cuda-intrinsics-gen
trybuild dev cuda-core, cuda-device, cuda-macros

Missing workspace members: cargo-oxide, cuda-artifact-finalizer, cuda-async, cuda-intrinsics, cuda-intrinsics-gen, cuda-oxide-codegen, fuzzer, libnvvm-sys, mir-transforms, nvjitlink-sys, nvvm-transforms, oxide-artifacts, reserved-oxide-symbols.

Dev-only dependencies are in scope by the file's own precedent: expect-test is dev-only and is recorded, so trybuild's absence is an omission by the repo's existing standard rather than a scope question. Likewise tempfile was added along with its row in #417, so the convention works when remembered — these 21 are the cases where it wasn't.

Proposed fix

Add scripts/check-dependency-licenses.sh, wire it into cargo-deny.yml as a second job, and add the 21 missing rows.

The two halves then line up: cargo deny check enforces the license policy over the whole resolved graph from deny.toml, and this guard enforces that the human-readable inventory still lists what the workspace declares.

Where I deliberately drew the scope lines

Presence, not versions. 24 of the 81 existing rows already disagree with the resolved graph (anyhow 1.0.100 vs 1.0.103, syn 2.0.114 vs 3.0.3, and so on). That is ordinary Cargo.lock drift. Enforcing versions would fail on every routine bump while saying nothing about licensing, and would need a CSV edit for each one. I did not "fix" those 24 numbers either — they would go stale again immediately.

Direct dependencies, not the full transitive graph. The resolve graph has 160 packages; the CSV records 81, of which 50 are transitive-only. Requiring all 109 transitive crates would be a large mechanical change for no licensing gain, because deny.toml's [licenses] allow-list already covers every transitive crate. The guard therefore requires workspace members plus direct dependencies, and treats existing transitive rows as welcome but optional.

No stale-row check. One row, libmathdx-sys, is not in the root workspace graph at all — it is the first-party sys crate under examples/mathdx_ffi_test/. Since the CSV legitimately covers first-party crates from outside the root workspace, a "no extra rows" rule would flag it wrongly. The guard only requires presence.

Two observations I am not fixing here

  1. Vendored rustlantis has no automated license coverage. crates/fuzzer/rustlantis/ is tracked third-party source, dual MIT/Apache-2.0, carrying its own LICENSE-APACHE and LICENSE-MIT (so CONTRIBUTING's vendored-file rule is satisfied). But crates/fuzzer/Cargo.toml sets exclude = ["rustlantis/"] and it is a separate workspace, so cargo-deny never sees it and the CSV does not record it. It is the one piece of in-tree third-party code with no automated license coverage. Recording it would need a new Dependency Type value such as 3rd Party (vendored), which is a schema decision for you rather than something I should invent. It is also not linked into any artifact, so its license does not propagate into distributed binaries.
  2. The 24 stale versions above, if you would rather they were refreshed as a one-off.

Verification

CPU-only; no GPU, no CUDA toolkit, no LLVM — cargo metadata reads manifests without running build scripts.

# Scenario Expected Result
1 Guard against the CSV as it is on main fail exit 1, lists exactly the 21 crates above
2 Guard after adding the 21 rows pass exit 0, "records all 51 declared crates"
3 Delete one third-party row (sha2) fail exit 1, names sha2
4 Delete one workspace-member row (oxide-artifacts) fail exit 1, names oxide-artifacts
5 python3 absent from PATH fail exit 1, "refusing to report success from a check that cannot run"
6 cargo absent from PATH fail exit 1, same
7 CSV reduced to its header (layout change) fail exit 1 via the parse self-test
8 All tools present, unmodified CSV pass exit 0

The fail-closed behaviour in 5–7 is deliberate, following #643: that guard reported success for three months because rg ... \|\| true turned a missing binary into an empty result set.

The CSV edit is insert-only — git diff --numstat is 21 0, no existing row touched — and CRLF line endings are preserved (103/103 lines still carry \r), which is the trap that produced a whole-file diff in #631. All 102 rows still parse as 9-field CSV, and every new row's license intersects deny.toml's allow-list.

scripts/check-error-example-status.sh and the reserved-prefix guard both still pass. The change touches four files and overlaps none of the seven open PRs.

Activity

  1. added a commit that references this issue on Aug 5, 2026
    ad66ce2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions