1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# cargo-deny configuration (Phase 1.4).
#
# Runs in CI on every PR via `cargo deny check` in `mnemo/`. Three
# checks matter here:
# 1. `advisories` — cross-references the RustSec advisory DB and
# fails on any unpatched vulnerability affecting a dep in the
# lockfile.
# 2. `licenses` — allowlist of OSI-approved licenses compatible
# with the Apache-2.0 the mnemo crate itself is published under.
# Anything unlisted requires an explicit `exceptions` entry.
# 3. `bans` — currently informational (`multiple-versions = "warn"`)
# to catch transitive duplication without blocking merges while
# we enumerate the necessary skip set. Follow-up PR will
# tighten to `deny` once CI has surfaced the real exception
# list.
#
# Run locally with:
# cd mnemo && cargo deny check
#
# For just one check:
# cargo deny check advisories
# cargo deny check licenses
# cargo deny check bans
# ---------------------------------------------------------------------
# Graph configuration — what crates the checks apply to.
# ---------------------------------------------------------------------
[]
# Empty `targets` means "check all crates for all target triples the
# lockfile references." Since mnemo compiles on Linux/macOS/Windows
# x86_64+aarch64, restricting to a single target would hide license /
# advisory hits on platform-specific transitives (e.g. `windows-sys`
# on Windows only).
= []
= false
= false
[]
# Group violations by feature depth; keeps the diagnostic readable
# on the multi-page transitive graph typical of a Rust crate.
= 1
# ---------------------------------------------------------------------
# Advisory DB — RustSec vulnerability + yanked-crate check.
# ---------------------------------------------------------------------
[]
= 2
= "~/.cargo/advisory-db"
= ["https://github.com/rustsec/advisory-db"]
# `yanked` fires when Cargo.lock pins a version the author later
# yanked from crates.io. `warn` first so we notice; upgrade to
# `deny` once we've picked up a clean baseline.
= "warn"
# Time-boxed / justified exceptions to the advisory check. Every
# entry must carry a `reason` — a future worker reading this file
# should be able to tell why the ignore was granted without leaving
# the config.
= [
# `paste 1.0.15` — dtolnay archived the repo (RUSTSEC-2024-0436,
# "unmaintained"). NOT a vulnerability. It is pulled transitively
# by `rmp` / `rmp-serde` (our MessagePack layer) which have no
# migration path today. The advisory itself suggests `pastey` as
# a drop-in fork; that migration lives in `rmp`, not here. Revisit
# when `rmp-serde` ships a release that swaps to `pastey`.
{ = "RUSTSEC-2024-0436", = "paste (unmaintained) is a transitive dep of rmp-serde; no upstream migration path yet — track via rmp-serde issue tracker" },
]
# ---------------------------------------------------------------------
# Licenses — SPDX allowlist. Anything not listed → build fails.
# ---------------------------------------------------------------------
[]
= 2
# Kept minimal — the mnemo dep graph in practice only ships crates
# under Apache-2.0, MIT, BSD-3-Clause, and Unicode-3.0 (the newer
# SPDX variant `unicode-ident` uses). Apache-2.0 WITH LLVM-exception
# covers the `rustix` family. Adding an unused allow is not a security
# hole but it's noise — cargo-deny prints an "unmatched license
# allowance" warning for each, and drift in the allowlist becomes
# hard to notice. Extend this list only when a new dep actually
# ships under something not already here.
= [
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"MIT",
"BSD-2-Clause",
"BSD-3-Clause",
"Unicode-3.0",
]
# Threshold for guessing a license from a LICENSE file's text when
# the crate omits SPDX metadata. Default 0.8 is conservative — lower
# it only if a specific crate needs a `[[licenses.clarify]]` entry.
= 0.8
# Per-crate license overrides go here if a crate ships an unusual
# LICENSE mix cargo-deny can't parse. Empty at PR 9 landing;
# expand as CI surfaces cases.
= []
# ---------------------------------------------------------------------
# Bans — duplicate versions, wildcard deps, per-crate allow/deny.
# ---------------------------------------------------------------------
[]
# `warn` for now: transitive graphs commonly duplicate `syn 1/2`,
# `regex-syntax 0.6/0.8`, `bitflags 1/2`, `windows-sys 0.4x/0.5x`
# during migrations. First green CI run will list the actual
# duplicates; follow-up PR flips to `deny` with the enumerated
# `skip` entries.
= "warn"
= "allow"
= "all"
= "allow"
= "allow"
= []
= []
= []
= []
# ---------------------------------------------------------------------
# Sources — where crates may come from.
# ---------------------------------------------------------------------
[]
= "warn"
= "warn"
# Only crates.io. No git deps in mnemo (all pinned to `=x.y.z` per
# AGENTS.md), so this stays tight.
= ["https://github.com/rust-lang/crates.io-index"]
= []