Skip to content

Commit 8a6af68

Browse files
authored
chore(deps): drop weak dependencies due to cargo bug (#862)
For now we're going to drop weak deps for russh (`russh?/ring` and `russh?/aws-lc-rs`) as there is a known bug with Cargo which pulls it to the Cargo.lock and may trigger cargo-audit for example (e.g known `rsa` vulnerability). See details in [this comment](#851 (comment)) With this change, we simply require `russh/ring` for `host-port-exposure` feature. As a workaround, users who needs host-exposure feature with aws-lc-rs can add russh to their deps and add it explicitly in their project. However it may require to install the CryptoProvider.
1 parent 1ec42ed commit 8a6af68

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ jobs:
3131
- uses: taiki-e/install-action@v2
3232
with:
3333
tool: cargo-hack
34-
- name: Build (without host-port-exposure)
35-
run: cargo hack build --feature-powerset --depth 2 --keep-going --exclude-features host-port-exposure
36-
- name: Build (host-port-exposure with TLS backend)
37-
run: cargo hack build --feature-powerset --depth 2 --keep-going --include-features host-port-exposure,ring,aws-lc-rs --at-least-one-of ring,aws-lc-rs
34+
- name: Build
35+
run: cargo hack build --feature-powerset --depth 2 --clean-per-run
3836

3937
test:
4038
name: Test
@@ -68,10 +66,8 @@ jobs:
6866
- uses: taiki-e/install-action@v2
6967
with:
7068
tool: cargo-hack
71-
- name: Tests (without host-port-exposure)
72-
run: cargo hack test --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }} --exclude-features host-port-exposure
73-
- name: Tests (host-port-exposure with TLS backend)
74-
run: cargo hack test --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }} --include-features host-port-exposure,ring,aws-lc-rs --at-least-one-of ring,aws-lc-rs
69+
- name: Tests
70+
run: cargo hack test --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }}
7571

7672
fmt:
7773
name: Rustfmt check

testcontainers/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ url = { version = "2", features = ["serde"] }
4949

5050
[features]
5151
default = ["ring"]
52-
ring = ["bollard/ssl", "russh?/ring"]
53-
aws-lc-rs = ["bollard/aws-lc-rs", "russh?/aws-lc-rs"]
52+
ring = ["bollard/ssl"]
53+
aws-lc-rs = ["bollard/aws-lc-rs"]
5454
ssl = ["bollard/ssl_providerless"]
5555
blocking = []
5656
watchdog = ["signal-hook", "conquer-once"]
@@ -59,7 +59,7 @@ http_wait_plain = ["reqwest"]
5959
properties-config = ["serde-java-properties"]
6060
reusable-containers = []
6161
device-requests = []
62-
host-port-exposure = ["dep:russh"]
62+
host-port-exposure = ["dep:russh", "russh/ring"]
6363

6464
[dev-dependencies]
6565
anyhow = "1.0.86"

0 commit comments

Comments
 (0)