Rules / TAU-T003
Declared dependency lists are closed
decided by Tauten kernel deny core deny edge deny
Applies to tests: yes
Exceptions: never
Why
Each third-party dependency widens what must be trusted; a crate that may not depend on a package cannot call it. The kernel may also be blocked from proof extraction.
Fix
Remove the dependency, move the code to a crate that may use it, or add it to [package.metadata.tauten] allowed-deps = ["name"] in a reviewed change.
Seen in fixtures
//! TAU-T003 (#115): a build-dependency is counted. /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: core crate `rej-dep-build` depends on `dep-alpha` ([build-dependencies]), which is not in its `allowed-deps` --> rej-dep-build/Cargo.toml (core crate `rej-dep-build`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-build (core) expects TAU-T003. Output captured at 0200db3.rej-dep-list-unparsed/src/lib.rs core
//! TAU-T003 (#115): a list that is not a list of names is a finding, even with no dependency. /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: core crate `rej-dep-list-unparsed`: tauten could not read its dependency list: `allowed-deps` is not a list of package names --> rej-dep-list-unparsed/Cargo.toml (core crate `rej-dep-list-unparsed`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-list-unparsed (core) expects TAU-T003. Output captured at 0200db3.rej-dep-renamed/src/lib.rs core
//! TAU-T003 (#115): a renamed dependency is matched by its real package name, not its alias. /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: core crate `rej-dep-renamed` depends on `dep-alpha` ([dependencies]), which is not in its `allowed-deps` --> rej-dep-renamed/Cargo.toml (core crate `rej-dep-renamed`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-renamed (core) expects TAU-T003. Output captured at 0200db3.rej-dep-target/src/lib.rs core
//! TAU-T003 (#115): a target-specific dependency is counted. /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: core crate `rej-dep-target` depends on `dep-alpha` ([target.'cfg(all())'.dependencies]), which is not in its `allowed-deps` --> rej-dep-target/Cargo.toml (core crate `rej-dep-target`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-target (core) expects TAU-T003. Output captured at 0200db3.rej-dep-two-keys/src/lib.rs kernel
//! TAU-T003 (#115): a kernel crate that declares both keys has no readable list.#![no_std] /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: kernel crate `rej-dep-two-keys`: tauten could not read its dependency list: it declares both `allowed-deps` and `kernel-deps` --> rej-dep-two-keys/Cargo.toml (kernel crate `rej-dep-two-keys`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-two-keys (kernel) expects TAU-T003. Output captured at 0200db3.rej-dep-unlisted/src/lib.rs core
//! TAU-T003 (#115): a core crate depends on a package its allowed-deps does not list. /// Identity.#[must_use]pub const fn id(x: u8) -> u8 { x}$ cargo tauten check
error[TAU-T003]: core crate `rej-dep-unlisted` depends on `dep-beta` ([dependencies]), which is not in its `allowed-deps` --> rej-dep-unlisted/Cargo.toml (core crate `rej-dep-unlisted`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-dep-unlisted (core) expects TAU-T003. Output captured at 0200db3.rej-kernel-dep/src/lib.rs kernel
//! A kernel crate with a dependency it did not allowlist.#![no_std] /// Whether a level blocks.#[must_use]pub const fn blocks(deny: bool) -> bool { deny}$ cargo tauten check
error[TAU-T003]: kernel crate `rej-kernel-dep` depends on `tauten-check-kernel` ([dependencies]), and declares no `allowed-deps`, so it may depend on nothing outside the workspace --> rej-kernel-dep/Cargo.toml (kernel crate `rej-kernel-dep`) = rule: Declared dependency lists are closed (decided by Tauten) = fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change.rej-kernel-dep (kernel) expects TAU-T003. Output captured at 0200db3.In the terminal
cargo tauten explain TAU-T003$ cargo tauten explain TAU-T003
TAU-T003: Declared dependency lists are closed Why: Each third-party dependency widens what must be trusted; a crate that may not depend on a package cannot call it. The kernel may also be blocked from proof extraction. Fix: Remove the dependency, move the code to a crate that may use it, or add it to `[package.metadata.tauten] allowed-deps = ["name"]` in a reviewed change. Decided by: TautenDecides: A crate that declares `allowed-deps` (or `kernel-deps` in the kernel) depends only on the listed packages outside the workspace; a kernel crate with no list depends on none; a list tauten could not read is a finding.Sees: manifest; complete: yesDoes not see: Dev-dependencies; transitive dependencies; the version, source and features of a listed name (`cargo deny` decides sources); crates outside the kernel that declare no list.Applies to tests: yesExceptions allowed: with #[expect(.., reason)] kernel deny core deny edge deny