Repository navigation
chore(deps): bump vulnerable dependencies in hermes, root Cargo, pnpm and hip-3-pusher lockfiles - #4071
Conversation
|
Greenlight — Merged outside Greenlight ( |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| specifier: ^17.13.7 | ||
| version: 17.13.8 |
There was a problem hiding this comment.
There was a problem hiding this comment.
Rectifier review: Accept
Round 1, at 5161097. 3 findings, 0 blocking. 5/5 reviewer agents completed successfully in 377s.
| Priority | Finding | Where |
|---|---|---|
| Medium | Deps PR swaps hermes client schema with a different service's spec | apps/hermes/client/js/schema.json:1 |
| Low | Deps-only PR adds unrelated pro_guardian_sets export |
contract_manager/package.json:248 |
| Low | Cargo lockfiles re-resolve more crates than the PR describes | Cargo.lock:3589 |
Comment @imbik-rectifier review to review again after a push.
CI failures no finding explains: hermes-image, Vercel – proposals.
| @@ -3573,13 +3587,13 @@ dependencies = [ | |||
|
|
|||
| [[package]] | |||
| name = "fastbloom" | |||
There was a problem hiding this comment.
[Low] Cargo lockfiles re-resolve more crates than the PR describes
Both Cargo lockfiles re-resolve far more crates than the description or its "Left out" list cover. Beyond the listed advisory fixes, the root Cargo.lock takes major transitive bumps (fastbloom 0.14.1 to 0.17.0, jni 0.21.1 to 0.22.4 with jni-sys 0.3.0 to 0.4.1, getrandom 0.3.4 to 0.4.2) and downgrades (socket2 0.6.2 to 0.5.10, windows-sys 0.61.2 to 0.60.2/0.59.0/0.48.0, heck 0.5.0 to 0.4.1, bip39's rand_core 0.6.4 to 0.5.1); the hermes lockfile takes cc 1.0.90 to 1.10.0, deranged 0.3.11 to 0.5.9, and a socket2 0.5.6 to 0.4.10 downgrade. None of these are enumerated in the description.
Impact: A reviewer of a security-focused dependency PR cannot confirm the unlisted major bumps and downgrades are intentional.
Likelihood: Edge case (the re-resolved crates pass the author's cargo check and test runs)
Message to fix with an agent
A code reviewer flagged a possible problem in this pull request. Check that it is real before you
change anything. If it is not real, or not worth fixing, say why and change nothing.
Repository: pyth-network/pyth-crosschain, PR #4071, reviewed at commit 51610977c76a5ccc3c49777d0a13d7065b80c153
Issue: Cargo lockfiles re-resolve more crates than the PR describes
Severity: Low
Reviewer: confirmed by reading the code
Where: Cargo.lock (line 3589 at that commit):
name = "fastbloom"
version = "0.17.0"
Problem: the lockfile diffs in this PR (Cargo.lock and apps/hermes/server/Cargo.lock) contain
re-resolution well beyond the crates named in the PR description's Changes and Left-out sections.
Root Cargo.lock: fastbloom 0.14.1 to 0.17.0 (~line 3589), jni 0.21.1 to 0.22.4 with new jni-macros
and jni-sys-macros and jni-sys 0.3.0 to 0.4.1 (cesu8 replaced by simd_cesu8), getrandom 0.3.4 to
0.4.2 (plus new chacha20, rand_pcg, foldhash 0.2.0, cpufeatures 0.3.1 alongside the described rand
0.10.3 bump), and downgrades socket2 0.6.2 to 0.5.10, windows-sys 0.61.2 to 0.60.2 and 0.59.0 and
0.59.0 to 0.48.0, heck 0.5.0 to 0.4.1, and bip39's rand_core 0.6.4 to 0.5.1 (bip39 2.2.2 itself
unchanged). apps/hermes/server/Cargo.lock: cc 1.0.90 to 1.10.0, deranged 0.3.11 to 0.5.9, num-conv
0.1.0 to 0.2.2, matchers 0.1.0 to 0.2.0, nu-ansi-term 0.46.0 to 0.50.3, jobserver 0.1.28 to 0.1.35
(pulling in getrandom 0.4.3), and a socket2 0.5.6 to 0.4.10 downgrade; idna 0.5.0 to 1.1.0 is
mentioned in the description but it drags in a new icu 2.1.x stack.
Expected: a lockfile diff matching the described scoped bumps, or a description that enumerates
these additional major bumps and downgrades.
Suggested fix: either regenerate the lockfiles with targeted `cargo update -p <crate>` invocations
matching the description, or amend the PR description to enumerate the extra major transitive bumps
and downgrades (fastbloom, jni/jni-sys, getrandom, cc, deranged, num-conv, matchers, nu-ansi-term,
jobserver, and the socket2, windows-sys, heck, and rand_core downgrades) so a reviewer can confirm
them intentionally.
The suggested fix is a starting point. If you find a better one, weigh the tradeoffs, make that fix
instead, and say why in your change description.
Keep the change to this issue.
Resolve this thread if it is not an issue, and later reviews of this change will not raise it again while this code is unchanged. Unresolve it to undo that.
Bump critical and high advisory dependencies within the same major version in the root Cargo.lock, apps/hermes/server/Cargo.lock, pnpm-lock.yaml and apps/hip-3-pusher/uv.lock. Build the hermes image on rust:1.89.0-bookworm, because the fixed `time` release needs edition2024. The new pnpm overrides join the security override block from #4070 under one comment. That comment says why they exist: parents such as fuels, express and @ethersproject/signing-key pin exact vulnerable versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7d057ac to
81b5ba4
Compare
The overrides from #4070 for @babel/plugin-transform-modules-systemjs, defu, lodash-es and smol-toml had no lower bound, so an older major would be moved to the fixed major. Add the lower bound so each selector matches only the vulnerable range inside one major, as the comment says. Sort the block by package name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rollup 4.62.4 and later add an optional dependency, @napi-rs/lzma-linux-x64-gnu, whose engines field requires node ^22.20 || ^24.12 || >=25. Cap the override so it resolves 4.62.3, which has no lzma dependency and no OSV advisories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The proposals preview deployment still failed with the cap, so the rollup lzma dependency is not its cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
This PR bumps the critical and high advisory dependencies of the deployed services where a fix exists in the same major version. It changes four lockfiles: the root
Cargo.lock(fortuna, argus, quorum and others),apps/hermes/server/Cargo.lock,pnpm-lock.yamlandapps/hip-3-pusher/uv.lock. It also moves the hermes Docker build to Rust 1.89.0 (see below). The contract and SDK Cargo workspaces will get a separate PR.Changes
Rust (lockfile only)
Cargo.lock: quinn-proto 0.11.13 → 0.11.19 (with rand 0.10.0 → 0.10.3), rustls 0.23.37 → 0.23.46, rustls-webpki 0.103.9 → 0.103.16, h2 0.4.13 → 0.4.20, crossbeam-epoch 0.9.18 → 0.9.21, webpki-roots 1.0.6 → 1.0.11, webpki-root-certs 1.0.6 → 1.0.11.apps/hermes/server/Cargo.lock: bytes 1.10.1 → 1.12.1, crossbeam-channel 0.5.12 → 0.5.17, crossbeam-epoch → 0.9.21, h2 0.3.25 → 0.3.27, ring 0.17.8 → 0.17.14, rustls 0.21.10 → 0.21.12, openssl 0.10.64 → 0.10.81, tracing-subscriber 0.3.18 → 0.3.20, url 2.5.0 → 2.5.4 (idna 0.5 → 1.1), rkyv 0.7.45 → 0.7.46, time 0.3.36 → 0.3.47 (serde 1.0.197 → 1.0.229).Hermes Docker build toolchain: rust 1.82.0 → 1.89.0-bookworm
apps/hermes/server/Dockerfilenow builds onrust:1.89.0-bookworminstead ofrust:1.82.0. This changes the toolchain of the hermes production image.-bookwormtag keeps the build stage on Debian bookworm, the same as thedebian:bookworm-slimruntime stage. The plainrust:1.89.0tag is Debian trixie (glibc 2.41, OpenSSL 3.5), and a binary linked there can fail to start on bookworm (glibc 2.36, OpenSSL 3.0).time0.3.47 fix depends onderanged0.5, which needs theedition2024Cargo feature (Rust 1.85+). No fixedtimerelease builds on 1.82.rust-toolchain.toml. The hermes CI job (ci-hermes-server.yml) already lints and tests hermes on it.npm
pnpm-workspace.yaml: this PR adds its overrides to the security override block that fix(deps): bump next, storybook and vulnerable transitive npm packages #4070 added. One comment covers the whole block. It says that each selector matches only the vulnerable range inside one major version, that the overrides exist because parents pin exact vulnerable versions (fuelspinshandlebars@4.7.8,expresspinsbody-parser@1.20.3,@ethersproject/signing-keypinselliptic@6.5.4), and that an override can go once its parent ships a fixed version.@babel/plugin-transform-modules-systemjs,defu,lodash-esandsmol-toml. Each now has one (for example"lodash-es@>=4 <4.18.0"), so the comment is true for every entry. The block is sorted by package name.turbo^2.7.4 → ^2.9.14,uuid^13.0.0 → ^13.0.1.pnpm-lock.yamlis regenerated withpnpm install --lockfile-only, not merged by hand. No package in it falls inside any overridden vulnerable range.package.jsonchanges. The builds regenerateapps/hermes/client/js/schema.jsonandcontract_manager/package.json, which are stale onmain. This PR leaves both files as they are onmain.Python (
apps/hip-3-pusher)cryptography~=46.0.1 → ~=50.0.2 (critical). The pusher only usesserialization.load_der_public_key,EllipticCurvePublicKeyanddecode_dss_signature, and these APIs are the same in 50.Advisory counts
osv-scanner scan source -L <lockfile>, critical and high advisory entries, compared withmain:Cargo.lockapps/hermes/server/Cargo.lockapps/hip-3-pusher/uv.lockpnpm-lock.yaml(includes web apps)cargo auditvulnerabilities: root 39 → 20, hermes 37 → 24.Left out, with the reason
These need a major version, a chain SDK change, or a newer toolchain:
ed25519-dalek1 → 2,curve25519-dalek3 → 4,quinn-proto0.9 → 0.11 (hermes),rustls0.20/0.21 → 0.23,rustls-webpki0.101 → 0.103,webpki-roots0.22/0.24/0.25 → 1.x,tungstenite0.17 → 0.20,h20.3 → 0.4,ring0.16 → 0.17.rkyv0.7 → 0.8,crypto-bigint0.5 → 0.7,protobuf2 → 3,zip0.6 → 9: major versions of transitive crates.ruint1.17.2 → 1.20: every fixed release needs rustc 1.90, and the repo pins 1.89.0.protobufjs6 → 7,tar4/6 → 7,axios0.x,uuid< 11,ws3.x,zod3 → 4,undici5,tmp0.0.x,tinypool1 → 2,@fastify/busboy2 → 3,adm-zip,base-x2,image-size1,ip-address9,js-cookie2,serialize-javascript< 7,toml3.vitest3.0.9:fuelspins it as a peer dependency, and pnpm overrides do not change peer resolution.@openzeppelin/contracts{,-upgradeable}4.8.1:target_chains/ethereum/contractspins=4.8.1for the deployed upgradeable contracts. This goes with the contract workspace PR.users0.10.0,brotli-sys0.3.2,bigint-buffer1.1.5,http-cache-semantics4.x,rsa0.9 (RUSTSEC-2023-0071),node-forge1.4.0 (newest advisory).Checks run
On the rebased branch:
pnpm install --frozen-lockfilepassed.pnpm turbo buildpassed (87/87 tasks).pnpm turbo testpassed (86/86 tasks).pnpm-lock.yamlagainst every override selector. No version falls inside a vulnerable range.cargo check --workspace --all-targetspassed.cargo +1.88.0 check --locked -p fortuna -p arguspassed (1.88.0 is theRUST_VERSIONin their Dockerfiles).cargo test -p fortuna -p argus -p quorumpassed.cargo +1.89.0 build --locked --releasepassed on a Debian bookworm host with the same packages as the build stage (glibc 2.36, libssl-dev 3.0, clang 14, protobuf-compiler 3.21).objdump -T target/release/hermesshows the highest symbol versions areGLIBC_2.34andOPENSSL_3.0.0, both available indebian:bookworm-slim.cargo fmt --check,cargo check --all-targets,cargo test(43 tests) andcargo clippy --all-targets -- --deny warningspassed.uv sync --lockedpassed,pytestpassed (17 tests), andmypy srcandruff checkpassed. A smoke test of the KMS signer's cryptography calls (secp256k1 DER load, sign,decode_dss_signature) passed on cryptography 50.0.2.cargo auditandosv-scanner2.7.0: see the counts above."Vercel – proposals" preview deployment
The proposals preview deployment fails on every head of this PR. The cause is not known, and it needs someone with Vercel access to read the logs:
npx vercel inspect dpl_a7BWcKUJdvSYsBZCDqmmreEMW4az --logs.What I checked:
pnpm turbo build --filter @pythnetwork/xc-admin-frontendpasses on this branch.vercel build(Vercel CLI 50.x latest, Next.js builder,nodejs24.xruntime) passes on this branch forgovernance/xc_admin/packages/xc_admin_frontend.@napi-rs/lzma-linux-x64-gnu(engines: node ^22.20 || ^24.12 || >=25). I tested a cap that resolved rollup 4.62.3, which has no lzma dependency (commit ed0f8be). The proposals deployment still failed (dpl_a7BWcKUJdvSYsBZCDqmmreEMW4az), so I reverted the cap.🤖 Generated with Claude Code