-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeny.toml
More file actions
95 lines (84 loc) · 2.24 KB
/
deny.toml
File metadata and controls
95 lines (84 loc) · 2.24 KB
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
# deny.toml - cargo-deny configuration
# https://embarkstudios.github.io/cargo-deny/
#
# Run with: cargo deny check
[graph]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
]
all-features = true
# Advisory database configuration
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = [
# Add ignored advisories with justification
# Example: "RUSTSEC-2020-0071" # unmaintained but no replacement available
]
# License configuration - compatible with MIT/Apache-2.0
[licenses]
unlicensed = "deny"
allow = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Zlib",
"CC0-1.0",
"Unlicense",
"MPL-2.0", # Weak copyleft, file-level only
"Unicode-3.0",
"Unicode-DFS-2016",
]
copyleft = "deny"
confidence-threshold = 0.8
# Private registry handling
[licenses.private]
ignore = false
registries = []
# Crate exceptions (require justification comments)
[[licenses.clarify]]
name = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
# Crate banning and duplicate detection
[bans]
multiple-versions = "warn"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"
# Skip specific versions (with justification)
skip = [
# Example: { name = "syn", version = "1.0" } # Required by proc-macro-crate
]
# Skip tree (allow duplicates in specific dependency chains)
skip-tree = [
# Example: { name = "windows-sys" } # Windows has complex version requirements
]
# Explicitly banned crates
deny = [
# Ban OpenSSL in favor of rustls for security and auditability
# { name = "openssl" },
# { name = "openssl-sys" },
]
# Source repository restrictions
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []
# Organization-specific allowlist (if using private git repos)
[sources.allow-org]
# Example: github = ["my-org"]