Skip to content

Commit 28f8f22

Browse files
authored
Update deny action (#3461)
The current `cargo deny` configuration in `deny.toml` uses several keys that have been deprecated. This PR removes the deprecated keys, and updates the deny action to use v2 (as well as renames it from `audit.yml` to `deny.yml`). The only semantic difference is that `cargo deny` will now reject crates that are maintained or have a notice on them, whereas previously, our configuration set both to "warn". As mentioned in the docs though, one can add an "ignore" if needed to bypass those advisories: https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html#the-version-field-optional By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
1 parent ac10164 commit 28f8f22

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

.github/workflows/audit.yml renamed to .github/workflows/deny.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# 1. Checks licenses for allowed license.
55
# 2. Checks Rust-Sec registry for security advisories.
66

7-
name: Cargo Audit
7+
name: Cargo Deny
88
on:
99
pull_request:
1010
merge_group:
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: EmbarkStudios/cargo-deny-action@v1
21+
- uses: EmbarkStudios/cargo-deny-action@v2
2222
with:
2323
arguments: --all-features --workspace
2424
command-arguments: -s

deny.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
[advisories]
88
db-path = "~/.cargo/advisory-db"
99
db-urls = ["https://github.com/rustsec/advisory-db"]
10-
vulnerability = "deny"
11-
unmaintained = "warn"
1210
yanked = "deny"
13-
notice = "warn"
1411
# A list of advisory IDs to ignore. Note that ignored advisories will still
1512
# output a note when they are encountered.
1613
ignore = [
@@ -21,19 +18,14 @@ ignore = [
2118
# More documentation for the licenses section can be found here:
2219
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
2320
[licenses]
24-
default = "deny"
25-
unlicensed = "deny"
26-
copyleft = "deny"
2721
allow = [
2822
"MIT",
2923
"Apache-2.0",
3024
]
31-
allow-osi-fsf-free = "neither"
3225
confidence-threshold = 0.8
3326

3427
# All these exceptions should probably appear in: tools/build-kani/license-notes.txt
3528
exceptions = [
36-
{ name = "Inflector", allow=["BSD-2-Clause"] },
3729
{ name = "unicode-ident", allow=["Unicode-DFS-2016"] },
3830
]
3931

0 commit comments

Comments
 (0)