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
# cargo-deny configuration for par-term
# https://embarkstudios.github.io/cargo-deny/
#
# Run locally: cargo deny check
# Install: cargo install cargo-deny
#
# This file audits:
# - advisories: known security vulnerabilities (RustSec)
# - licenses: OSI-approved / permissive only
# - bans: duplicate crate versions and explicit denylists
# - sources: only crates.io and known git sources
[]
# Treat these targets when checking. Omitting the field checks all targets.
= [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
]
# ---------------------------------------------------------------------------
# Advisories (RustSec vulnerability database)
# ---------------------------------------------------------------------------
[]
# Path to a local advisory database clone. Leave unset to use the default
# fetched copy (~/.cargo/advisory-db).
# db-path = "~/.cargo/advisory-db"
# The URL(s) of the advisory databases to use.
= ["https://github.com/rustsec/advisory-db"]
# The lint level for security vulnerabilities.
= "deny"
# The lint level for unmaintained crates.
= "warn"
# The lint level for crates that have been yanked from their source registry.
= "warn"
# The lint level for crates with security notices (non-critical).
= "warn"
# A list of advisory IDs to ignore. Add entries here only with a comment
# explaining why the advisory does not apply to this project.
= [
# Example (do not uncomment without justification):
# "RUSTSEC-2020-0001", # Reason: only affects the X feature which we don't use
]
# ---------------------------------------------------------------------------
# Licenses
# ---------------------------------------------------------------------------
[]
# Confidence threshold for license text detection (0.0–1.0).
= 0.8
# Allowed licenses (SPDX identifiers).
= [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Unicode-3.0",
"Unicode-DFS-2016",
"Zlib",
"CC0-1.0",
"MPL-2.0",
"OpenSSL",
]
# Crates whose license cannot be detected automatically but are known-good.
# Provide the SPDX expression alongside the crate name.
= [
# Example: { allow = ["LicenseRef-ring"], name = "ring", version = "*" }
]
# ---------------------------------------------------------------------------
# Bans
# ---------------------------------------------------------------------------
[]
# Lint level for when multiple versions of the same crate are detected.
= "warn"
# Lint level for wildcard dependencies (e.g. dep = "*").
= "deny"
# The graph highlights used when outputting the bans section.
= "deepest"
# Crates that are allowed to have multiple versions (commonly unavoidable
# due to transitive dependencies from separate ecosystems).
= [
# Example: { name = "bitflags", version = "1" }
]
# Crates that are completely banned from the dependency tree.
= [
# Avoid the unmaintained `term` crate.
{ = "term" },
]
# ---------------------------------------------------------------------------
# Sources
# ---------------------------------------------------------------------------
[]
# Lint level for crates from unknown registries.
= "deny"
# Lint level for crates from unknown git sources.
= "deny"
# List of allowed registries (in addition to crates.io).
= ["https://github.com/rust-lang/crates.io-index"]
# List of git hosts/URLs allowed as dependency sources.
= [
# Add known git dependencies here if any are used.
# Example: "https://github.com/paulrobello/some-dep"
]