Skip to content

Commit 57217f7

Browse files
committed
chore(deps): Add deny.yaml and a cargo deny CI job to check dependencies for vulnerabilities
Signed-off-by: Joshua Potts <[email protected]>
1 parent 16e3f10 commit 57217f7

File tree

4 files changed

+76
-2
lines changed

4 files changed

+76
-2
lines changed

.github/workflows/sqlx.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
- '*-dev'
99

1010
jobs:
11+
deny:
12+
name: Cargo Deny
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: EmbarkStudios/cargo-deny-action@v1
17+
1118
format:
1219
name: Format
1320
runs-on: ubuntu-22.04

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ async-std = { version = "1.12.0", features = ["attributes"] }
168168
tokio = { version = "1.15.0", features = ["full"] }
169169
dotenvy = "0.15.0"
170170
trybuild = "1.0.53"
171-
sqlx-test = { path = "./sqlx-test" }
171+
sqlx-test = { version = "0.1.0", path = "./sqlx-test" }
172172
paste = "1.0.6"
173173
serde = { version = "1.0.132", features = ["derive"] }
174174
serde_json = "1.0.73"

deny.toml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[advisories]
2+
ignore = [
3+
# No upgrade available for rsa 0.9.4, a direct dependency of sqlx-mysql
4+
"RUSTSEC-2023-0071",
5+
]
6+
version = 2
7+
8+
[licenses]
9+
allow = [
10+
"Apache-2.0",
11+
"BSD-2-Clause",
12+
"BSD-3-Clause",
13+
"ISC",
14+
"MIT",
15+
"MPL-2.0",
16+
"OpenSSL",
17+
"Unicode-DFS-2016",
18+
"Zlib",
19+
]
20+
confidence-threshold = 0.9
21+
version = 2
22+
23+
[[licenses.clarify]]
24+
name = "ring"
25+
expression = "MIT AND ISC AND OpenSSL"
26+
license-files = [
27+
{ path = "LICENSE", hash = 0xbd0eed23 }
28+
]
29+
30+
[bans]
31+
allow = []
32+
deny = []
33+
multiple-versions = "deny"
34+
skip = [
35+
# async-std 1.12 uses two versions - this older version directly, and a newer verison transitively.
36+
{ name = "async-channel", version = "=1.9.0" },
37+
# sqlx-core uses an older version of rustls-pemfile, which uses this older version
38+
{ name = "base64", version = "=0.21.7" },
39+
# async-global-executor transitively depends on two different versions of this crate
40+
{ name = "event-listener", version = "^4.0.0" },
41+
# async-global-executor transitively depends on two different versions of this crate
42+
{ name = "event-listener-strategy", version = "=0.4.0" },
43+
# native-tls 0.2.11 has this older version as a transitive dependency
44+
{ name = "spin", version = "=0.5.2" },
45+
# syn 2.0 has not been adopted by many crates using syn 1.x due to difficult breaking changes
46+
{ name = "syn", version = "<2" },
47+
]
48+
skip-tree = [
49+
# async-std 1.12 uses two versions - this older version directly, and a newer verison transitively.
50+
{ name = "async-io", version = "=1.13.0" },
51+
]
52+
53+
wildcards = "deny"
54+
55+
[sources]
56+
allow-git = []
57+
allow-registry = [
58+
"https://github.com/rust-lang/crates.io-index"
59+
]
60+
unknown-git = "deny"
61+
unknown-registry = "deny"
62+
63+
[sources.allow-org]
64+
bitbucket = []
65+
github = []
66+
gitlab = []

sqlx-test/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
name = "sqlx-test"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "MIT OR Apache-2.0"
56
publish = false
67

78
[dependencies]
8-
sqlx = { default-features = false, path = ".." }
9+
sqlx = { workspace = true, default-features = false }
910
env_logger = "0.11"
1011
dotenvy = "0.15.0"
1112
anyhow = "1.0.26"

0 commit comments

Comments
 (0)