Skip to content

chore(deps): replace serde_yml with serde_norway#357

Merged
branchseer merged 2 commits intomainfrom
claude/fix-ci-pipeline-9HgWS
Apr 24, 2026
Merged

chore(deps): replace serde_yml with serde_norway#357
branchseer merged 2 commits intomainfrom
claude/fix-ci-pipeline-9HgWS

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Apr 24, 2026

Motivation

The Security Analysis job (which runs cargo deny check whenever Cargo.lock changes) fails on every PR that touches Cargo.lock because serde_yml v0.0.12 trips RUSTSEC-2025-0068: the crate is unsound (Serializer.emitter can segfault), the upstream project has been archived, and the advisory explicitly states "No safe upgrade is available". The only fix is to move off serde_yml. Example failure: run 24874266956 on #352.

Summary

  • Replace serde_yml = "0.0.12" with serde_norway = "0.9.42" in the workspace Cargo.toml and in crates/vite_workspace/Cargo.toml.
  • Update vite_workspace::load_package_graph to call serde_norway::from_slice for pnpm-workspace.yaml.
  • Rename the error variant Error::SerdeYml { serde_yml_error: serde_yml::Error }Error::SerdeYaml { serde_yaml_error: serde_norway::Error } so the type stays generic over the backing crate.
  • Regenerate Cargo.lock (adds serde_norway, unsafe-libyaml-norway; drops serde_yml, libyaml-safer, and their exclusive transitive deps).

Why serde_norway over the other forks

serde_yml's RUSTSEC advisory lists four alternatives; both maintained serde_yaml forks (serde_norway and serde_yaml_ng) are drop-in compatible. serde_norway is more actively maintained (last release Dec 2024 vs May 2024), dual-licensed MIT/Apache-2.0, and ships its own unsafe-libyaml-norway fork of the C bindings so future advisories against libyaml can be patched without waiting on upstream.

Test plan

  • cargo deny check --config <oxc security-action deny.toml>advisories ok, bans ok, licenses ok, sources ok (was unsound: RUSTSEC-2025-0068 before)
  • cargo test -p vite_workspace → 79 passed
  • cargo clippy -p vite_workspace --all-targets -- -D warnings → clean

claude added 2 commits April 24, 2026 05:57
serde_yml v0.0.12 triggers RUSTSEC-2025-0068 (unsound,
unmaintained; project archived), which fails the Security
Analysis cargo-deny advisories check. No safe upgrade of
serde_yml is available, so switch to serde_yaml_ng — a
drop-in maintained fork — per the advisory's recommended
alternatives.
serde_norway is more actively maintained (Dec 2024 vs May 2024
last release), dual-licensed MIT/Apache-2.0, and ships its own
unsafe-libyaml-norway fork so advisories against the C bindings
can be patched without waiting on upstream.
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​serde_norway@​0.9.4210010093100100

View full report

@branchseer branchseer changed the title Replace serde_yml with serde_norway for YAML parsing chore(deps): replace serde_yml with serde_norway Apr 24, 2026
@branchseer branchseer merged commit 6daa700 into main Apr 24, 2026
12 checks passed
@branchseer branchseer deleted the claude/fix-ci-pipeline-9HgWS branch April 24, 2026 06:32
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.

2 participants