fix: remove unused tar-slip-vulnerable extract_archive dead code - #6671
Merged
Conversation
bug-ops
force-pushed
the
fix/6467-remove-dead-extract-archive
branch
from
July 28, 2026 00:40
e34b56f to
f753073
Compare
bug-ops
enabled auto-merge (squash)
July 28, 2026 00:40
extract_archive was #[cfg(test)]-gated with zero production call sites; all real extraction paths already use the hardened extract_archive_safe. Migrate the 4 tests that exercised extract_archive onto extract_archive_safe and drop the dead pub(crate) re-export. Closes #6467
bug-ops
force-pushed
the
fix/6467-remove-dead-extract-archive
branch
from
July 28, 2026 00:50
f753073 to
0f348dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extract_archivefromcrates/zeph-plugins/src/manager/security.rs— a#[cfg(test)]-gated tar.gz extraction helper with no tar-slip protection (CWE-22) and zero production call sites. All real extraction paths already use the hardenedextract_archive_safe, which rejects absolute paths,..traversal components, and symlink entries.extract_archiveontoextract_archive_safe(verified to be a strict superset for all current test fixtures) and drops the now-deadpub(crate)re-export inmanager/mod.rs.extract_archive_safe's doc comment to remove its now-broken intra-doc link to the deleted function.Closes #6467
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins(15111 passed, 0 failed)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"gitleaks protect --stagedextract_archive(non-_safe) references outside the CHANGELOG