Skip to content

Commit 7ecd9c1

Browse files
codexEliahKagan
andcommitted
Check dependency policy and update vulnerable locked crates
Dependabot does not cover every RustSec advisory in the packaged lockfile. Add separate all-feature, locked CI jobs for advisories and for bans, licenses, and sources. Include transitive unsoundness and unmaintained crates without suppressing advisories. Do not require the advisory job to pass for `Tests pass` to succeed, so newly published advisories do not block unrelated PRs. Allow licenses required by the resolved graph, reject unknown registries and Git sources, warn about duplicate versions, and ban the historical precompiled `serde_derive` releases. Add `just deny` and document the dependency checks. Update the transitive locked dependencies `rustls-webpki` to 0.103.16, `webpki-root-certs` to 1.0.10, and `tokio` to 1.53.3 to resolve RUSTSEC-2026-0382, RUSTSEC-2026-0383, and RUSTSEC-2026-0386 respectively. Generate the lockfile from main's lockfile with Cargo 1.99.1: ```sh cargo update -p rustls-webpki --precise 0.103.16 cargo update -p webpki-root-certs --precise 1.0.10 cargo update -p tokio --precise 1.53.3 ``` Cargo also selects the already locked `windows-sys 0.52.0` instead of `0.61.2` for `errno`, `rustix`, `rustls-platform-verifier`, `tempfile`, and `winapi-util`, within each crate's declared dependency range. These commands introduce no other package-version changes. The patched releases resolve the findings without advisory exceptions or claims about whether affected APIs are used. Co-authored-by: Eliah Kagan <degeneracypressure@gmail.com>
1 parent f40475e commit 7ecd9c1

5 files changed

Lines changed: 95 additions & 12 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,38 @@ defaults:
2323
shell: bash
2424

2525
jobs:
26+
# Keep newly announced advisories visible without blocking unrelated PRs.
27+
# This job is deliberately omitted from tests-pass below, as in gitoxide.
28+
cargo-deny-advisories:
29+
name: Dependency advisories
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34+
with:
35+
persist-credentials: false
36+
- name: Check RustSec advisories
37+
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
38+
with:
39+
command: check advisories
40+
arguments: --workspace --all-features --locked
41+
rust-version: stable
42+
43+
cargo-deny:
44+
name: Dependency bans, licenses, and sources
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
49+
with:
50+
persist-credentials: false
51+
- name: Check dependency policy
52+
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
53+
with:
54+
command: check bans licenses sources
55+
arguments: --workspace --all-features --locked
56+
rust-version: stable
57+
2658
lint:
2759
name: Rust formatting, clippy, and unit tests
2860
runs-on: ubuntu-latest
@@ -229,7 +261,7 @@ jobs:
229261
tests-pass:
230262
name: Tests pass
231263
if: always()
232-
needs: [lint, test, features, no-c, packaging]
264+
needs: [cargo-deny, lint, test, features, no-c, packaging]
233265
runs-on: ubuntu-latest
234266
permissions: {}
235267
steps:

‎Cargo.lock‎

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

‎DEVELOPMENT.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ loop. Set `PYTHON` to select an installed interpreter.
8181
`just test-free-threaded /path/to/python3.14t` builds and tests the free-threaded ABI with `PYTHON_GIL=0`.
8282
The package test also verifies importing the extension keeps the GIL disabled.
8383

84+
To reproduce CI's dependency checks locally, install `cargo-deny` and run
85+
`just deny`. It checks packaged dependencies, regardless of the local Gitoxide
86+
selection.
87+
8488
## Try a published release
8589

8690
With uv installed, open an IPython prompt with `gix` already imported and Tab

‎deny.toml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Check optional and development dependencies on all platforms.
2+
[graph]
3+
all-features = true
4+
5+
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
6+
[advisories]
7+
unsound = "all"
8+
unmaintained = "all"
9+
ignore = []
10+
11+
# Licenses required by the packaged dependency graph, including PyO3's
12+
# target-lexicon and the HTTPS certificate bundles.
13+
[licenses]
14+
allow = [
15+
"Apache-2.0",
16+
"Apache-2.0 WITH LLVM-exception",
17+
"BSD-3-Clause",
18+
"CDLA-Permissive-2.0",
19+
"ISC",
20+
"MIT",
21+
"MIT-0",
22+
"MPL-2.0",
23+
"Unicode-3.0",
24+
"Zlib",
25+
]
26+
confidence-threshold = 0.8
27+
28+
[bans]
29+
# Upstream dependencies require several versions of some crates. Report
30+
# duplication without rejecting it.
31+
multiple-versions = "warn"
32+
deny = [
33+
# These releases used a precompiled binary instead of building from source.
34+
# https://github.com/serde-rs/serde/issues/2538
35+
# https://github.com/serde-rs/serde/pull/2590
36+
{ name = "serde_derive", version = ">1.0.171, <1.0.185" },
37+
]
38+
39+
[sources]
40+
unknown-registry = "deny"
41+
unknown-git = "deny"
42+
allow-registry = ["https://github.com/rust-lang/crates.io-index"]

‎justfile‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ test-free-threaded interpreter:
4545
unit-tests:
4646
cargo test --locked --lib
4747

48+
# Check packaged dependency advisories, bans, licenses, and sources (requires cargo-deny).
49+
[group('Tests')]
50+
deny:
51+
cargo deny --workspace --all-features --locked check
52+
4853
# Check the build, release, and justfile helpers without building the extension.
4954
[group('Tests')]
5055
helper-tests:

0 commit comments

Comments
 (0)