Skip to content

Commit d8d57d8

Browse files
authored
ci: Add cargo deny checks for bans and sources (#2935)
1 parent b5d31f1 commit d8d57d8

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,21 @@ jobs:
137137
egress-policy: audit
138138

139139
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
140-
- uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
140+
141+
- name: Check advisories
142+
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
141143
with:
142144
command: check advisories
145+
146+
- name: Check bans
147+
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
148+
with:
149+
command: check bans
150+
151+
- name: Check sources
152+
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
153+
with:
154+
command: check sources
143155
docs:
144156
continue-on-error: true
145157
runs-on: ubuntu-latest

deny.toml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,30 @@ license-files = [
2121
{ path = "LICENSE", hash = 0xbd0eed23 }
2222
]
2323

24+
# This section is considered when running `cargo deny check advisories`
25+
# More documentation for the advisories section can be found here:
26+
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
2427
[advisories]
25-
unmaintained = "none"
26-
yanked = "allow"
28+
yanked = "deny"
29+
30+
# This section is considered when running `cargo deny check bans`.
31+
# More documentation about the 'bans' section can be found here:
32+
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
33+
[bans]
34+
# Lint level for when multiple versions of the same crate are detected
35+
multiple-versions = "warn"
36+
# Lint level for when a crate version requirement is `*`
37+
wildcards = "warn"
38+
# The graph highlighting used when creating dotgraphs for crates
39+
# with multiple versions
40+
# * lowest-version - The path to the lowest versioned duplicate is highlighted
41+
# * simplest-path - The path to the version with the fewest edges is highlighted
42+
# * all - Both lowest-version and simplest-path are used
43+
highlight = "all"
44+
45+
# This section is considered when running `cargo deny check sources`.
46+
# More documentation about the 'sources' section can be found here:
47+
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
48+
[sources]
49+
unknown-registry = "deny"
50+
unknown-git = "deny"

0 commit comments

Comments
 (0)