Skip to content

Drop zip default features in wslc_common to remove aes/sha1 - #698

Merged
MGudgin merged 1 commit into
mainfrom
user/gudge/wslc-zip-drop-aes-crypto
Jul 28, 2026
Merged

Drop zip default features in wslc_common to remove aes/sha1#698
MGudgin merged 1 commit into
mainfrom
user/gudge/wslc-zip-drop-aes-crypto

Conversation

@MGudgin

@MGudgin MGudgin commented Jul 28, 2026

Copy link
Copy Markdown
Member

Trims wslc_common's zip build-dependency to the deflate feature only,
removing the transitive aes and sha1 crates (and other unused codec
chains) from the dependency graph.

wslc_common uses zip solely in build.rs to extract NuGet .nupkg
archives (standard deflate zips) via ZipArchive + by_index. It never reads
AES-encrypted archives, so zip's default aes-crypto feature is unnecessary.

Details

  • zip = { version = "2", default-features = false, features = ["deflate"] }.
  • Removes aes, sha1, hmac, pbkdf2, cipher, constant_time_eq, plus
    unused bzip2/lzma/zstd/deflate64/crc/time chains from Cargo.lock
    (239 lockfile lines removed).
  • Clears the Dependabot noise around the (build-time-only, non-exploitable)
    aes/sha1 entries. Note aes 0.8.4 has no advisory and sha1 0.10.6's
    only related advisory (RUSTSEC-2025-0021) targets gitoxide, not this crate.

Tests

  • cargo check -p wslc_common: passed (nupkg deflate extraction path unchanged).
  • cargo clippy -p wslc_common --all-targets -- -D warnings: clean.
  • cargo tree -i aes and cargo tree -i sha1 no longer resolve.
Microsoft Reviewers: Open in CodeFlow

This PR trims wslc_common's `zip` build-dependency to the `deflate` feature
only, removing the transitive `aes` and `sha1` crates (and other unused
codecs) from the dependency graph.

Details

* wslc_common uses `zip` only in build.rs to extract NuGet `.nupkg`
  archives (standard deflate zips) via `ZipArchive` + `by_index` — it never
  reads AES-encrypted archives, so the default `aes-crypto` feature is
  unnecessary.
* Set `zip = { version = "2", default-features = false, features = ["deflate"] }`.
  This drops aes, sha1, hmac, pbkdf2, cipher, constant_time_eq, plus the
  unused bzip2/lzma/zstd/deflate64/crc/time codec chains from Cargo.lock.
* Silences the Dependabot noise around the (build-time-only, non-exploitable)
  aes/sha1 entries.

Tests

* cargo check -p wslc_common: passed (build.rs nupkg deflate extraction path
  unchanged).
* cargo clippy -p wslc_common --all-targets -- -D warnings: clean.
* Verified `cargo tree -i aes` and `cargo tree -i sha1` no longer resolve.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4cc05a95-546f-4acb-913a-b946127fa01f
Copilot AI review requested due to automatic review settings July 28, 2026 22:42
@MGudgin
MGudgin requested a review from a team as a code owner July 28, 2026 22:42
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI 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.

Pull request overview

Restricts WSLC’s build-time ZIP support to Deflate, reducing unused transitive dependencies.

Changes:

  • Disables zip default features and enables only deflate.
  • Regenerates the lockfile without unused crypto and codec crates.
Show a summary per file
File Description
src/backends/wslc/common/Cargo.toml Narrows enabled zip features.
src/Cargo.lock Removes unused transitive dependencies.

Review details

  • Files reviewed: 1/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@MGudgin
MGudgin merged commit d14f3ca into main Jul 28, 2026
23 checks passed
@MGudgin
MGudgin deleted the user/gudge/wslc-zip-drop-aes-crypto branch July 28, 2026 22:57
dhoehna added a commit to dhoehna/mxc that referenced this pull request Jul 29, 2026
Reconciles the GA network wire schema (egress/ingress) with two commits
that landed on main after this branch was cut:
  - microsoft#641 "Phase 3d: add actionable configuration parse errors"
  - microsoft#698 "Drop zip default features in wslc_common"

wire.rs and config_parser.rs auto-merged cleanly (my network-schema
edits and microsoft#641's parser changes touched disjoint regions). microsoft#641's new
config_deserialize layer parses via serde generically, so it compiles
and passes against the GA schema unchanged.

The only new breakage is one legacy-schema test microsoft#641 added:
config_parser::tests::out_of_range_value_reports_path builds a config
with `network.proxy.localhost`, which the GA egress/ingress schema
rejects as an unknown field before reaching the out-of-range value it
asserts on. Disable it with #[ignore], consistent with the other
legacy-schema tests deferred to the parser/SDK test migration.

This is why CI (which tests refs/pull/676/merge) failed while the branch
tip looked clean: the failing test lives only in main.

Verified locally (default features):
  - wxc_common: 503 passed, 0 failed, 35 ignored (unit + integration + doctests)
  - wxc:        28 passed, 0 failed
  - mxc_engine: 9 passed,  0 failed, 6 ignored

AB#62830582

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e9fe1242-7778-4399-b9a8-044ba9301215
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.

3 participants