Skip to content

Commit 74c9492

Browse files
authored
Run cargo deny check in Analyze job (#2340)
* Run `cargo deny check` in Analyze job * Add BSL-1.0 to approved licenses * Fix lint * Enable running cargo-deny in pipeline * Update dependencies and remove ring dependency The `reqwest_rustls` feature now enables `rustls-tls-native-roots-no-provider` instead of `rustls-tls-native-roots`, which removes the ring dependency. * Document features
1 parent f5858f9 commit 74c9492

File tree

13 files changed

+129
-134
lines changed

13 files changed

+129
-134
lines changed

.vscode/cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
".vscode/settings.json",
1818
".vscode/tasks.json",
1919
"NOTICE.txt",
20+
"deny.toml",
2021
"eng/",
2122
"**/.dict.txt",
2223
"rust-toolchain.toml"

Cargo.lock

Lines changed: 38 additions & 130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deny.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[graph]
2+
all-features = true
3+
exclude-dev = true
4+
5+
[advisories]
6+
git-fetch-with-cli = true
7+
ignore = [
8+
{ id = "RUSTSEC-2024-0384", reason = "We're tracking https://github.com/minghuaw/fe2o3-amqp/issues/306" },
9+
]
10+
11+
[licenses]
12+
allow = [
13+
"Apache-2.0",
14+
"BSD-3-Clause",
15+
"BSL-1.0",
16+
"ISC",
17+
"MIT",
18+
# "OpenSSL",
19+
"Unicode-3.0",
20+
]
21+
22+
[[licenses.clarify]]
23+
name = "ring"
24+
expression = "MIT AND ISC AND OpenSSL"
25+
license-files = [
26+
{ path = "LICENSE", hash = 0xbd0eed23 },
27+
]
28+
29+
[bans]
30+
multiple-versions = "allow"
31+
wildcards = "deny"
32+
allow-wildcard-paths = true
33+
deny = [
34+
"ring",
35+
"smol",
36+
]
37+
38+
[sources]
39+
unknown-registry = "deny"
40+
unknown-git = "deny"

eng/dict/rust-custom.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ repr
99
rustc
1010
rustflags
1111
rustls
12+
rustsec
1213
turbofish

eng/pipelines/templates/jobs/analyze.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
arguments: >
4242
-PackageInfoDirectory '$(Build.ArtifactStagingDirectory)/PackageInfo'
4343
-SkipPackageAnalysis:('$(NoPackagesChanged)' -eq 'true')
44+
-Deny
4445
4546
- template: /eng/common/pipelines/templates/steps/check-spelling.yml
4647
parameters:

0 commit comments

Comments
 (0)