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
# cargo-deny 配置:许可证 + 依赖安全审计。
# 运行:`cargo deny check`(需先 `cargo install cargo-deny`)
[]
# 忽略的漏洞(按 id 或 crate 名)
# ignore = [
# { id = "RUSTSEC-2024-xxxx" },
# ]
[]
# 允许的许可证(SPDX 标识符;不在列表中的将被拒绝)
= [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Zlib",
"Unicode-3.0",
"CC0-1.0",
"OpenSSL",
]
# 允许的版权声明
# copyleft = "deny"
[]
# 禁止重复依赖(同一 crate 多个版本)
= "deny"
# 跳过特定 crate 的重复检测
= [
# tokio-util 1.x 被多个 crate 依赖不同版本
{ = "tokio-util", = "0.6" },
{ = "tokio-util", = "0.7" },
]
# 允许的 git 依赖
# git = []
[]
# 允许的源
= []
# 未知源拒绝
= "deny"
= "deny"