Skip to content

chore: fix CI on main for Rust 1.100 and current RustSec advisories - #359

Open
eike-hass wants to merge 4 commits into
mainfrom
chore/clippy-rust-1.100
Open

eike-hass wants to merge 4 commits into
mainfrom
chore/clippy-rust-1.100

Conversation

@eike-hass

@eike-hass eike-hass commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description of change

CI on main fails for four reasons outside this repository, all from Rust 1.100 or new advisories. This PR restores the clippy, audit, format and Windows build-and-test jobs without changing behaviour.

Clippy, Rust 1.100.0 (2026-11-09). New lints fail the Wasm bindings with -D warnings: 2 in notarization_wasm, 41 in audit_trail_wasm, 2 in poi_wasm. Only the poi_wasm step runs in CI today (the other two steps have if: ${{ false }}), but all three are fixed:

  • notarization_wasm: drop a redundant to_string() inside anyhow! (to_string_in_format_args).
  • notarization_wasm, audit_trail_wasm: rename the Rust method behind Data.toString from to_string to to_text (inherent_to_string). js_name = toString keeps the JS/TS API and the Wasm export unchanged.
  • audit_trail_wasm types, poi_wasm proof: allow clippy::clone_on_copy at module level. #[wasm_bindgen(getter_with_clone)] generates the Copy-field getters as sibling items, so an allow on the struct does not reach them.

Audit, new RustSec advisories. cargo audit reports 29 vulnerabilities in Cargo.lock. All but one are fixed by semver-compatible updates:

  • cargo update -p for the affected versions: libz-sys 1.1.33, pulldown-cmark 0.13.6, quinn-proto 0.11.19, quinn-udp 0.5.16, rustls 0.23.46, rustls-webpki 0.103.17, webpki-root-certs and webpki-roots 1.0.12, zstd 0.13.5, zstd-safe 7.4.1, zstd-sys 2.1.3.
  • libsodium-sys-stable 1.24.0 to 1.24.6, which moves its build-time zip dependency from 8.6 (8 advisories, fixed only in 9.x) to 9.7.
  • Ignore RUSTSEC-2026-0387 (crypto-bigint 0.5 timing side channels) in .cargo/audit.toml. It is fixed only in 0.7.6+ and comes in through elliptic-curve 0.13 (fastcrypto, iota-sdk-crypto), which has no patched release. It affects client-side secp256k1 and secp256r1 signing. iota and iota-rust-sdk ignore it as well (chore: ignore RUSTSEC-2026-0387 (crypto-bigint) in cargo deny iota-rust-sdk#1741).

Windows build, Rust 1.100.0. build-and-test (windows-latest) fails in "Build with default features" with The filename or extension is too long. (os error 206) while compiling iota-network-stack (scheduled runs on main since 2026-11-17, and this PR). Cargo 1.100 passes one -L dependency=<build-dir>\<crate>\<hash>\out path per dependency: 718 for iota-network-stack, about 41,000 characters, above the Windows limit of 32,767. Cargo hands the arguments to the wrapper as an argfile, but sccache starts rustc with the expanded list (mozilla/sccache#3053). The Windows job now builds without sccache. Linux and macOS keep it, and the cargo and target caches stay enabled on all three.

Format, cargo 1.100. The cargo-license-template check step fails with regex parse error: ... unrecognized escape sequence (since the ubuntu image 20261116 ships Rust 1.100). Cargo 1.100 makes cargo install use the packaged Cargo.lock by default (rust-lang/cargo#17388), and --locked is now a no-op. The lockfile in cargo-license-template 0.1.3 (2022) pins regex 1.5.6, which rejects the \/ escape in .license_template, and a cargo_metadata that rejects edition 2024 manifests. The workflow now downloads the crate, drops its Cargo.lock and installs from the path, so the dependencies resolve as before (regex 1.13).

Links to any relevant issues

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How the change has been tested

  • The four clippy commands from clippy.yml on Rust 1.100.0 with -D warnings: main fails (2, 41 and 2 errors in the bindings), this branch passes all four.
  • The generated JS/TS of all three bindings (wasm-bindgen 0.2.108, --typescript --weak-refs --target nodejs) is identical to main, and the data_toString export is still present.
  • cargo audit with the repository's .cargo/audit.toml: 0 vulnerabilities. Informational warnings (unmaintained or yanked crates), which do not fail the job, drop from 33 to 23.
  • cargo test --workspace -- --test-threads=1 against an iota v1.35.2 localnet: 214 tests pass, including the Single Notarization and Audit Trails e2e suites.
  • cargo +nightly fmt --all -- --check for the root and each binding, and dprint check.
  • Windows: the os error 206 diagnosis comes from the job log of the failed run on this PR. The build without sccache is verified by the Windows job of this PR only.
  • Format: with cargo 1.100, cargo install cargo-license-template reproduces the regex error, and the install step of this PR, run as written, installs a binary that passes cargo license-template --template .license_template --ignore .license_template_ignore on this branch.

Change checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked that new and existing unit tests pass locally with my changes

- notarization_wasm: drop a redundant `to_string()` inside `anyhow!`
  (clippy::to_string_in_format_args).
- notarization_wasm, audit_trail_wasm: rename the Rust method behind
  `Data.toString` from `to_string` to `to_text` (clippy::inherent_to_string).
  The `js_name = toString` attribute keeps the JS/TS API and the wasm
  export symbol unchanged.
- audit_trail_wasm `types`, poi_wasm `proof`: allow clippy::clone_on_copy at
  module level. `#[wasm_bindgen(getter_with_clone)]` generates `Clone::clone`
  getters for `Copy` fields as sibling items, so an allow on the struct does
  not reach them.
- Update the affected crates within their semver range: libz-sys 1.1.33,
  pulldown-cmark 0.13.6, quinn-proto 0.11.19, quinn-udp 0.5.16, rustls
  0.23.46, rustls-webpki 0.103.17, webpki-root-certs and webpki-roots
  1.0.12, zstd 0.13.5, zstd-safe 7.4.1, zstd-sys 2.1.3.
- Update libsodium-sys-stable to 1.24.6, which moves its build-time zip
  dependency from 8.6 to 9.7 (zip advisories are fixed only in 9.x).
- Ignore RUSTSEC-2026-0387 (crypto-bigint 0.5 timing side channels): fixed
  only in 0.7.6+, pulled in through elliptic-curve 0.13 by fastcrypto and
  iota-sdk-crypto without a patched release. iota and iota-rust-sdk ignore
  it as well.

Fixes #346, #347, #348, #349, #351, #352, #353, #354
Refs #350
@eike-hass
eike-hass marked this pull request as ready for review November 19, 2026 17:53
Since Rust 1.100 the Windows build-and-test job fails in "Build with
default features" (scheduled runs on main since 2026-11-17, and PR runs):

  sccache: caused by: The filename or extension is too long. (os error 206)
  error: could not compile `iota-network-stack` (lib)

Cargo 1.100 passes one `-L dependency=<build-dir>\<crate>\<hash>\out` path
per dependency. For iota-network-stack that is 718 paths, about 41,000
characters, above the Windows limit of 32,767. Cargo hands the arguments to
the wrapper as an argfile, but sccache spawns rustc with the expanded list
(mozilla/sccache#3053). Without the wrapper, rustc reads the argfile itself.

Set RUSTC_WRAPPER only on Linux and macOS, and skip the sccache install,
cache and stop steps on Windows. Cargo and target caches stay enabled.
Since Rust 1.100 (ubuntu image 20261116) the Format job fails:

  Error: regex parse error: ... error: unrecognized escape sequence

Cargo 1.100 makes `cargo install` use the packaged Cargo.lock by default
(rust-lang/cargo#17388), and `--locked` is now a no-op. The lockfile in
cargo-license-template 0.1.3 (2022) pins regex 1.5.6, which rejects the
`\/` escape in .license_template, and a cargo_metadata that rejects edition
2024 manifests. Before Rust 1.100 the install resolved regex 1.13.

Download the crate, drop its Cargo.lock and install from the path, so the
dependencies resolve as before. Verified with cargo 1.100: the default
install reproduces the failure, this install passes the license check.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment