Skip to content

chore(deps): bump git2 to 0.21.0 to clear RUSTSEC-2026-0183/0184 (#733) - #734

Merged
dmtrKovalenko merged 1 commit into
mainfrom
triage-bot/issue-733
Jul 31, 2026
Merged

dmtrKovalenko merged 1 commit into
mainfrom
triage-bot/issue-733

Conversation

@gustav-fff

Copy link
Copy Markdown
Collaborator

Closes #733

Root cause

Workspace pin git2 = "0.20.2" in Cargo.toml:29 resolves to 0.20.4, which carries two informational = "unsound" advisories (RUSTSEC-2026-0183, RUSTSEC-2026-0184). fff does not call the affected APIs (Remote::list, Blame::blame_buffer) — usage is limited to Repository, StatusOptions, Status*, Version::get — but every downstream consumer of fff-search/fff-grep/fff-query-parser sees the advisories in cargo audit/cargo deny and must add a suppression.

Fix

Bump workspace git2 to 0.21.0. Feature set unchanged (default-features = false, vendored-libgit2). 0.21 changes StatusEntry::path() from Option<&str> to Result<&str, git2::Error>; adjust the two callers in crates/fff-core/src/git.rs:65 and crates/fff-core/tests/fuzz_git_watcher_stress.rs accordingly (drop non-UTF-8 paths, same behavior as before).

Steps to reproduce

Confirm the advisories surface on pre-fix origin/main:

cargo install cargo-audit --locked
git fetch origin main && git checkout origin/main
cargo audit --file Cargo.lock

Expected: two warnings

Crate:     git2
Version:   0.20.4
Warning:   unsound
Title:     Remote::list() passes null pointer to slice::from_raw_parts()
ID:        RUSTSEC-2026-0183

Crate:     git2
Version:   0.20.4
Warning:   unsound
Title:     BlameHunk from Blame::blame_buffer() can build Signatures from null pointers
ID:        RUSTSEC-2026-0184

How verified

cargo update -p git2
# Updating git2 v0.20.4 -> v0.21.0
# Updating libgit2-sys v0.18.3+1.9.2 -> v0.18.7+1.9.6

cargo check --workspace --tests
# Finished `dev` profile [unoptimized + debuginfo] target(s)

cargo test --workspace
# all suites pass: 124 lib tests + integration suites, 0 failed

Diff size: 4 files, +8/-9.

Automated triage via Gustav. Honk-Honk 🪿

git2 0.20.4 carries two informational=unsound advisories that surface in
downstream cargo-audit/cargo-deny runs. fff does not call the affected
APIs (Remote::list, Blame::blame_buffer), but bumping clears the noise
for consumers.

0.21.0 changes StatusEntry::path() to return Result<&str, git2::Error>
instead of Option<&str>; adjust the two callers in fff-core.

Closes #733
@dmtrKovalenko
dmtrKovalenko merged commit 1eb913e into main Jul 31, 2026
83 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion]: Bump git2 to 0.21.0 to clear RUSTSEC-2026-0183/0184 for downstream consumers

2 participants