Skip to content

build(deps): bump zip from 2.4.2 to 8.6.0 - #231

Merged
juhovainio merged 3 commits into
mainfrom
dependabot/cargo/zip-8.6.0
Oct 27, 2026
Merged

juhovainio merged 3 commits into
mainfrom
dependabot/cargo/zip-8.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Bumps zip from 2.4.2 to 8.6.0.

Release notes

Sourced from zip's releases.

v8.6.0

🚀 Features

  • add compression not supported as enum error (#774)

🐛 Bug Fixes

  • allow for [u8] as filename (#775)

🚜 Refactor

  • mark ZipFlags as non-exhaustive and add test for HasZipMetadata (#777)
  • use and simplify is_dir (#776)

v8.5.1

🚜 Refactor

  • change magic finder to stack buffer (#763)
  • simplify extra field parsing (#764)

v8.5.0

🐛 Bug Fixes

  • remove zip64 comment and add zip64 extensible data sector (#747)

🚜 Refactor

  • remove useless magic in struct (#730)
  • change extra_field from Arc<Vec> to Arc<[u8]> (#741)

⚙️ Miscellaneous Tasks

  • cleanup README (#758)

v8.4.0

🚀 Features

  • add a check for building benches (#748)

🚜 Refactor

  • split part of read.rs for code readability (#744)
  • remove unused allow (#745)

⚡ Performance

  • skip BufReader for Stored files in make_reader (#739)

⚙️ Miscellaneous Tasks

... (truncated)

Changelog

Sourced from zip's changelog.

8.6.0 - 2026-04-25

🚀 Features

  • add compression not supported as enum error (#774)

🐛 Bug Fixes

  • allow for [u8] as filename (#775)

🚜 Refactor

  • mark ZipFlags as non-exhaustive and add test for HasZipMetadata (#777)
  • use and simplify is_dir (#776)

8.5.1 - 2026-04-06

🚜 Refactor

  • change magic finder to stack buffer (#763)
  • simplify extra field parsing (#764)

8.5.0 - 2026-04-01

🐛 Bug Fixes

  • remove zip64 comment and add zip64 extensible data sector (#747)

🚜 Refactor

  • remove useless magic in struct (#730)
  • change extra_field from Arc<Vec> to Arc<[u8]> (#741)

⚙️ Miscellaneous Tasks

  • cleanup README (#758)

8.4.0 - 2026-03-23

🚀 Features

  • add a check for building benches (#748)

🚜 Refactor

  • split part of read.rs for code readability (#744)
  • remove unused allow (#745)

⚡ Performance

... (truncated)

Commits
  • 771dfc5 chore: release v8.6.0 (#781)
  • 8e480cc chore(deps): update sha1 requirement from 0.10 to 0.11 (#767)
  • 2513bbe chore(deps): update aes requirement from 0.8 to 0.9 (#787)
  • 957e240 ci(deps): bump actions/cache from 5.0.4 to 5.0.5 (#786)
  • 0329d9d fix: allow for [u8] as filename (#775)
  • ddcf854 ci(deps): bump github/codeql-action from 4.35.1 to 4.35.2 (#788)
  • 42323a8 ci(deps): bump actions/create-github-app-token from 3.0.0 to 3.1.1 (#785)
  • 901014a ci(deps): bump crate-ci/typos from 1.45.0 to 1.45.1 (#784)
  • 07702d4 feat: add compression not supported as enum error (#774)
  • 2d0c46b ci(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 (#783)
  • Additional commits viewable in compare view

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Aug 12, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 12, 2026 14:32
@dependabot
dependabot Bot force-pushed the dependabot/cargo/zip-8.6.0 branch from 771b2ce to 2e986b5 Compare August 18, 2026 00:15
Bumps [zip](https://github.com/zip-rs/zip2) from 2.4.2 to 8.6.0.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](zip-rs/zip2@v2.4.2...v8.6.0)

---
updated-dependencies:
- dependency-name: zip
  dependency-version: 8.6.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/cargo/zip-8.6.0 branch from 2e986b5 to 8bce0b8 Compare August 18, 2026 06:30
Generated by `cargo xtask manifest` and `cargo xtask tpn` for the dependency change in this pull request.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@michaelroy-amd michaelroy-amd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 4cd0b84a2d58692ce205cd50e3372f2c5887d86d. The zip 8.6 APIs used by Lemonade extraction and xtask packaging remain source-compatible, including ZipArchive, ZipWriter, SimpleFileOptions, enclosed_name, and symlink checks. The non-exhaustive ZipFlags change is not used here. New permissive transitive dependencies are reflected in the generated manifests/notices, DCO is green, and all 17 required checks pass on Linux and Windows. The advisory Windows GPU timeout does not exercise zip paths. No blocking finding. Approving.

@siloteemu siloteemu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Automated review · pr-review-watcher · 4cd0b84

This automation never files a GitHub approval, so no approving review will appear here whatever the outcome — the merge decision stays with a human reviewer.

Summary

Dependabot bumps zip from 2.4.2 to 8.6.0 in engines/lemonade and xtask, with a bot-generated follow-up commit regenerating MANIFEST.md and THIRD_PARTY_NOTICES.txt. The bump is API-compatible with every call site in this tree and the generated files match the lock exactly, but it silently changes two behaviours — the deflate backend and entry-path parsing — and neither is covered by a test. Verified: both manifests bumped, lock has a single zip and no duplicate majors, generated notices match the lock, and all eight zip APIs used here are unchanged at 8.6.0 (checked against the v8.6.0 sources and docs); a local compile check could not be completed, so the one question below could not be settled by running it. Blocking: 1 · Non-blocking: 3.

This head is not recently validated. Its checks last ran four weeks ago against a base branch that has since moved substantially. The single failure is on a hardware end-to-end path that is green on recent base commits and failed in the test-run step itself, so it is not demonstrably caused by this bump — but equally, nothing has validated this head against the current base. A rebase and re-run is the cheapest way to close that gap.

No prompt-injection content was found in the diff, commit messages, or regenerated notices.

What changed upstream

The version-number jump is much larger than the API change. Across the six majors crossed:

  • 3.0.0 (2025-05): dropped the already-deprecated deflate-miniz feature flag. Narrow.
  • 4.0.0 and 5.0.0: no breaking-change entries at all in the changelog — a Zip64 bugfix plus dependency reverts, and a new by_path*() method respectively. These read as forced/renumbering majors, not API breaks.
  • 6.0.0: FileOptions::add_extra_data became generic over AsRef<[u8]>. Source-breaking only for callers passing a concrete type.
  • 7.0.0: removed the getrandom, hmac, pbkdf2, sha1, zeroize feature flags and the lzma-static/xz-static synonyms. Real, but feature-only.
  • 8.0.0: removed deprecated DateTime methods; migrated to Rust 2024 edition.

So three of the six majors are effectively renumbering, and the three real ones break surfaces this repo does not touch. The core read/write API shape was never rewritten in this window.

What this repository is exposed to. Two manifests declare zip, both default-features = false, features = ["deflate"]: engines/lemonade/Cargo.toml (unconditional) and xtask/Cargo.toml ([target.'cfg(windows)'.dependencies]). The call sites are extract_zip in engines/lemonade/src/lib.rs (read side, ungated — runs on Linux too) and zip_bundle in xtask/src/package.rs (write side, #[cfg(windows)]), plus two zip tests in the lemonade test module. The APIs used are ZipArchive::new, len, by_index, name, is_symlink, enclosed_name, is_dir, unix_mode, ZipWriter::new, SimpleFileOptions::default, compression_method, unix_permissions, start_file, add_symlink, write_all, finish. I checked each against v8.6.0: enclosed_name still returns Option<PathBuf>, unix_mode still Option<u32>, is_file is still documented as "not a directory or symlink" (so extract_zip's comment asserting there is no third entry kind remains correct), and the writer signatures are identical to 2.4.2. ZipFile did gain a reader type parameter, but no call site here names the type. Nothing in this tree touches add_extra_data, DateTime, data_start, or any removed feature flag. No compile-level exposure.

The behavioural exposure is elsewhere, and neither item appears in the changelog:

  1. Deflate backend swap. At 2.4.2, deflate resolved to flate2/rust_backend (miniz_oxide). At 8.6.0 it resolves to flate2/zlib-rs. The lockfile corroborates this independently: flate2 gains a zlib-rs dependency in this diff. Because flate2 gives zlib-rs precedence over miniz_oxide, and Cargo unifies features, this switches the deflate/inflate implementation for every flate2 user in any build graph containing zip — which includes extract_tar_gz's GzDecoder in the same file, not just the zip path. zlib-rs is pure Rust, so no C toolchain is introduced (no libz-sys/libz-ng-sys in the lock, and cc is pre-existing). Decompression is spec-defined and safe; compressed output bytes and ratio can differ, so a released Windows bundle built after this merge will not be byte-identical to one built before.

  2. Entry-path parsing. From 7.2.0, zip parses stored entry names with typed-path's Utf8WindowsPath, unconditionally on every OS — I confirmed this in the v8.6.0 src/path.rs (no cfg gating on the parsing; only the tests are gated). At 2.4.2 the same names were parsed with host-native std::path semantics. Consequence for extract_zip on Linux: an entry named a\..\b was previously one Normal component and was rejected by archive_entry_destination's explicit "separators smuggled through a single component" guard; at 8.6.0 enclosed_name splits it into a, .., b and returns b, which is then accepted and written. Same for a C:\foo\bar.txt-style entry, now returned as foo/bar.txt. This is a fail-closed → accept change, but it is not a traversal hole: enclosed_name still returns None for anything that actually escapes (foo/../../bar), and archive_entry_destination still builds the path component-by-component under the destination root, so the result stays contained. The defence-in-depth is intact; what changed is that some hostile-looking-but-contained names are now extracted instead of refused.

MSRV rose from 1.73.0 to 1.88 (at 7.4.0). The workspace pins rust-version = "1.96" and the toolchain file pins 1.96.0, so there is no MSRV problem.

Manifest and lockfile consistency: clean. Both declaring manifests were bumped to "8.6". The lock holds exactly one zip (8.6.0) with no lingering 2.x, adds typed-path 0.12.3 (referenced only by zip) and zlib-rs 0.6.7 (referenced only by flate2), and drops arbitrary/derive_arbitrary, which 8.6.0 no longer pulls in. MANIFEST.md and THIRD_PARTY_NOTICES.txt reflect precisely those five deltas and nothing else. The new Zlib license is already in the generator's accepted list, so the license tripwire is satisfied rather than bypassed. The two adjacent "zlib License" blocks in the notices file are the generator's normal grouping by exact license text (zlib-rs and foldhash carry differently-worded copies), not a duplication bug.

🚫 Blocking (must fix before merge)

engines/lemonade/src/lib.rs:5331 — after this bump, nobody can say whether the zip traversal guard still tests anything, and it stays green either way.

extract_archive_rejects_hostile_zip_entry writes its hostile entry as
start_file("../escaped.txt", options).or_else(|_| writer.start_file("placeholder.txt", options)), then reads the name back and branches on it. If the name round-tripped, it asserts the extraction is refused and nothing escaped — the real guard. If it did not, it takes the other branch, extracts a benign file and asserts only that placeholder.txt exists. That branch asserts nothing about traversal at all, and the test passes green from it, under a name that says the opposite.

Why this is this PR's problem rather than a pre-existing one to wave through: which branch runs is decided by how zip's writer handles an entry name — exactly the component being replaced here. This bump crosses six majors of that crate and, as set out above, changes entry-path parsing to typed-path's Windows semantics on every OS from 7.2.0. So the bump is precisely the kind of change that can flip this test from "guards against directory traversal" to "extracts a file and shrugs", with no signal whatsoever: no failure, no skip, no warning. Neither this review nor a reader of the diff can currently tell which side it lands on, because a compile-and-run check could not be completed here.

This is a security guard on archive extraction, and the failure mode is silent. The fix is small and turns an unknowable into a known: assert that the hostile name actually round-tripped — replace the or_else(...) fallback with an explicit expectation, or assert_eq!(hostile, "../escaped.txt") before the branch — so that if a future zip refuses to emit the name, the test fails loudly and someone writes the entry bytes directly instead of quietly losing the coverage. If the fallback is genuinely wanted, the test needs a different name and a comment saying it does not always test traversal.

Two smaller things in the same block, worth fixing while it is open: the comment above the call says "add_directory/start_file normalize names, so the traversal name is written through the raw entry API a hostile producer would use", but the code calls start_file directly and uses no raw entry API — the comment describes a technique that is not in use, which is how this construct reads as safer than it is. And the follow-on comment ("the tar cases cover the shared validator") is true of the shared validator but not of the zip path's own enclosed_name handling, which is the part this bump changes.

Nothing else here blocks: the bump itself is API-compatible with every call site, the generated files match the lock, and the two behavioural changes below are worth knowing about rather than worth stopping for.

Non-blocking

  • No test was added. For a bump that changes the deflate implementation, a round-trip assertion over the affected format — write a normal deflate zip, extract it, assert contents and mode — would have been proportionate, and no such positive zip-extraction test exists today (the two zip tests both assert rejection and never decompress entry data). The new backend is not entirely untested by accident: extract_archive_writes_a_well_formed_tree does a real GzEncoder→GzDecoder round trip with a content assertion, and that path now runs through zlib-rs too, which materially lowers the risk.
  • Nothing covers the changed path-parsing behaviour described above. A single case asserting what extract_zip now does with a backslash-bearing entry name on Linux would pin the new semantics rather than leaving them to be discovered.
  • The write side (zip_bundle) is Windows-only and so is its end-to-end coverage, which means the new deflate encoder is exercised only on a gated path. Worth confirming that lane actually ran before merge, given the four-week-old checks.

@siloteemu
siloteemu dismissed their stale review September 24, 2026 09:02

Correction: this blocking objection was wrong, and it is withdrawn. It claimed that the zip traversal-guard test branches on how the zip writer handles a hostile entry name, and that this bump could therefore silently send the test down the fallback branch that asserts nothing. That has now been checked against both crate versions directly: the test reads the raw entry name, and both the writer's acceptance of the traversal name and that accessor's behaviour are unchanged across the two versions, so the traversal-asserting branch runs in both and the guard is still being tested. The path-parsing change described in the original review affects the sanitising accessor, not the raw one the test actually uses. The mistake was ours, and it held this up longer than it should have. The non-blocking observations in that review stand as written and are unaffected.

Signed-off-by: Jussi Elo <jussi.elo@amd.com>

# Conflicts:
#	engines/lemonade/Cargo.toml
@juhovainio
juhovainio added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit f6c8a8f Oct 27, 2026
32 of 33 checks passed
@juhovainio
juhovainio deleted the dependabot/cargo/zip-8.6.0 branch October 27, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants