Patinas by RustySockets Documentation Product Search public

Policy checks (2026-01-18)

Patinas uses small, fork-safe policy checks to prevent “silent drift” in critical dependency and security posture.

These checks are intentionally lightweight and designed to fail fast in CI.

Run locally

From patinas/ (the workspace root containing deny.toml, Cargo.toml, and tools/):

cd patinas
python3 tools/policy_check.py

Run a subset:

cd patinas
python3 tools/policy_check.py --deny
python3 tools/policy_check.py --features
python3 tools/policy_check.py --future-incompat

Output shape (what you’ll see)

The wrapper prints a consistent header per check and a short summary:

==> <check name>
OK|FAIL (<duration>): <check name>

==> Summary
OK: all selected policy checks passed

What is enforced

deny.toml ignore review policy (--deny)

Any RUSTSEC-....-.... ignore entry in deny.toml must have:

This prevents “forever ignores” from silently accumulating.

Feature policy / deps + critical crate features (--features)

For core deployable roles, we enforce that forbidden “ambient TLS stacks” do not appear in the resolved dependency graph:

This is enforced via a single cargo metadata graph walk, and failures print an explicit dependency path.

We also enforce feature-level guardrails on critical crates (because feature drift is where many long-term bugs come from):

Future incompatibility report (--future-incompat)

Runs:

cargo check --workspace --future-incompat-report

This prevents “Rust 2024 / future edition” compatibility issues from accumulating unnoticed.

CI wiring

How to add a new policy check