Skip to content

Commit 0e7d050

Browse files
authored
Add cargo-deny (#303)
## Summary of changes Adds cargo-deny, a dependency auditing tool. ## Instruction for review/testing - Code review
1 parent 3336927 commit 0e7d050

File tree

5 files changed

+51
-1
lines changed

5 files changed

+51
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
- name: Format
4141
run: nix develop --command treefmt --fail-on-change
4242

43+
- name: cargo-deny
44+
run: nix develop --command cargo deny check
45+
4346
- name: Clippy
4447
if: steps.filter.outputs.flake == 'true' || steps.filter.outputs.rust == 'true'
4548
run: nix develop --command cargo clippy --all-targets -- -D warnings

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rand = "0.8.5"
4242
rand_distr = "0.4.3"
4343
ratatui = "0.22.0"
4444
rayon = "1.10.0"
45-
rdkafka = { version = "0.31.0", features = [ "cmake-build", "ssl", "gssapi", "sasl", ] }
45+
rdkafka = { version = "0.31.0", features = ["cmake-build", "ssl", "gssapi", "sasl"] }
4646
serde = { version = "1", features = ["derive"] }
4747
serde_json = { version = "1.0.134" }
4848
supermusr-common = { path = "./common" }

deny.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[advisories]
2+
version = 2
3+
db-path = "~/.cargo/advisory-db"
4+
db-urls = [ "https://github.com/rustsec/advisory-db" ]
5+
ignore = [
6+
"RUSTSEC-2024-0421",
7+
"RUSTSEC-2021-0041",
8+
"RUSTSEC-2024-0402",
9+
]
10+
11+
[licenses]
12+
version = 2
13+
allow = [
14+
"MIT",
15+
"GPL-3.0",
16+
"Apache-2.0",
17+
"BSD-3-Clause",
18+
"BSD-2-Clause",
19+
"OpenSSL",
20+
"Unicode-DFS-2016",
21+
"ISC",
22+
"LicenseRef-hdf5",
23+
]
24+
25+
[[licenses.clarify]]
26+
name = "ring"
27+
expression = "MIT AND ISC AND OpenSSL"
28+
license-files = [
29+
{ path = "LICENSE", hash = 0xbd0eed23 },
30+
]
31+
32+
[[licenses.clarify]]
33+
name = "hdf5-metno-src"
34+
expression = "LicenseRef-hdf5"
35+
license-files = [
36+
{ path = "ext/hdf5/COPYING", hash = 0xf13e3591 },
37+
]
38+
39+
[bans]
40+
multiple-versions = "allow"

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
treefmt
6363
mdl
6464

65+
# Dependency auditing
66+
cargo-deny
67+
6568
# Container image management
6669
skopeo
6770

treefmt.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[formatter.markdown]
22
command = "mdl"
33
includes = [ "*.md" ]
4+
excludes = [
5+
".github/pull_request_template.md",
6+
".github/ISSUE_TEMPLATE/*.md",
7+
]
48

59
[formatter.nix]
610
command = "alejandra"

0 commit comments

Comments
 (0)