Skip to content

Commit 1b08c0d

Browse files
authored
Resolve security advisories (#3746)
* disable unused sqlx drivers `sqlx-mysql` pulls in the vulnerable `rsa` crate. Janus only works with PostgreSQL, so we don't need that driver at all. `janus_aggregator_core` already enables the slim feature set we need, so we add `default-features = false` to the workspace level dependency to turn off the rest (`cargo` is unhappy if we put `default-features = false` in `aggregator_core/Cargo.toml`). Note that due to an outstanding `cargo` issue ([1], [2]), `sqlx-mysql` and `sqlx-sqlite` still appear in `Cargo.lock`, but are never used or even compiled. [1]: launchbadge/sqlx#2579 [2]: rust-lang/cargo#10801 * add `cargo deny advisories` exemption for protobuf We can't update the dependency until `opentelemetry-prometheus` either moves to a fixed `protobuf` or adds a feature letting us opt out of protobuf support. Either way, this advisory doesn't apply to Janus per the reasoning in deny.toml.
1 parent 3831af3 commit 1b08c0d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ serde_urlencoded = "0.7.1"
9999
serde_yaml = "0.9.34"
100100
signal-hook = "0.3.17"
101101
signal-hook-tokio = "0.3.1"
102-
sqlx = "0.8.3"
102+
# Disable default features to avoid pulling in drivers for databases we don't use, such as
103+
# sqlx-mysql which pulls in the vulnerable rsa crate
104+
# https://github.com/divviup/janus/security/dependabot/29
105+
sqlx = { version = "0.8.3", default-features = false }
103106
stopper = "0.2.8"
104107
tempfile = "3.19.0"
105108
testcontainers = "0.22.0"

deny.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ ignore = [
1111
# `instant` is unmaintained, but it is feature-complete and small, so it is unlikely to have
1212
# bugs or security vulnerabilities.
1313
"RUSTSEC-2024-0384",
14+
15+
# Janus never uses the protobuf format for exposing metrics, and in any case we would not be
16+
# handling untrusted input.
17+
"RUSTSEC-2024-0437",
1418
]
1519

1620
[bans]

0 commit comments

Comments
 (0)