Remediate cargo-deny advisories in YAML and TLS root dependencies
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- build-system, security
Hướng nghiên cứu
Start with the serde_yaml dependency in the agentverify-contract crate and the workspace Cargo.toml, then run cargo deny check advisories to reproduce the failing advisories. Bumping webpki-roots and the other TLS and tokio crates should be done by updating the owning dependency chain and regenerating Cargo.lock, not by editing it by hand. Done means the deny check, workspace tests, clippy, and the parser parity tests all pass without new ignores in deny.toml.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Findings
The current cargo-deny advisory job fails on the existing dependency graph:
-
RUSTSEC-2024-0449 —
unsafe-libyamlis unmaintained- Locked version:
unsafe-libyaml 0.2.11 - Dependency path:
agentverify-contract -> serde_yaml 0.9.34+deprecated -> unsafe-libyaml - The advisory identifies the upstream repository as archived and recommends a maintained safe Rust YAML parser (for example Saphyr-based alternatives).
- Locked version:
-
RUSTSEC-2026-0381 —
webpki-rootsbundled roots- Locked version:
webpki-roots 1.0.9 - Dependency path includes
reqwest 0.12.28 -> hyper-rustls 0.27.9 -> webpki-roots. - The advisory states version
1.0.10+removes the affected emSign root.
- Locked version:
These findings are present in the current Cargo.lock and are unrelated to the documentation-only PR that exposed the failing gate.
Required remediation
- Replace deprecated
serde_yamlwith a maintained YAML parser/Serde integration. Prefer a safe implementation; preserve the existing contract parsing API where practical. - Update
webpki-rootsto at least1.0.10through a compatible dependency resolution (do not hand-edit lockfile checksums). - Regenerate and commit Cargo.lock using Cargo.
- Do not silence the advisories with
deny.tomlignores unless a documented, time-bounded exception is explicitly justified and accepted.
Acceptance criteria
- Existing JSON and YAML contract parsing behavior remains compatible.
- Add/retain tests for valid YAML, malformed YAML, unknown fields, and equivalent JSON/YAML contract semantics.
cargo test --workspace --all-featurespasses.cargo clippy --workspace --all-features -- -D warningspasses.cargo deny check advisoriesand the full deny workflow pass without new ignores.- MSRV and supported WASM checks remain green.
- Include the dependency tree and advisory resolution in the PR description.
References
- https://rustsec.org/advisories/RUSTSEC-2024-0449
- https://rustsec.org/advisories/RUSTSEC-2026-0381
- https://github.com/dtolnay/unsafe-libyaml
- https://github.com/rustls/webpki-roots/pull/133
Candidate evaluation update — 2026-11-01
The contract parser only uses the top-level serde_yaml::from_str,
serde_yaml::to_string, and serde_yaml::Error surface; it does not
depend on serde_yaml::Value or lower-level parser internals. A practical
drop-in candidate is noyalib-serde-yaml (currently 0.0.58), declared under
the existing crate name:
serde_yaml = { package = "noyalib-serde-yaml", version = "=0.0.58" }
The published compatibility shim documents a Rust 1.86 MSRV (below this
workspace's Rust 1.88 floor), preserves the public serde_yaml 0.9 surface,
and removes the archived unsafe-libyaml implementation from the runtime
dependency graph. See the crate's https://docs.rs/crate/noyalib-serde-yaml/0.0.56
compatibility documentation and the current https://docs.rs/crate/noyalib-serde-yaml/latest
release page. Confirm the exact selected release and checksum through Cargo
when regenerating Cargo.lock.
This is a better first migration candidate than serde-saphyr for this
codebase because it preserves the current source-level API. The final PR must
still run the existing JSON/YAML parity, malformed-input, contract-example,
MSRV, WASM, and cargo-deny gates.
Advisory inventory from the 2026-11-01 PR #33 CI run
The current cargo deny check advisories failure is broader than the YAML parser:
ctutils 0.4.2— RUSTSEC-2026-0385 (non-constant-time mask generation /u128comparisons), reached through the Postgres protocol dependency chain.rustls 0.23.45— RUSTSEC-2026-0346, 0347, 0348, and 0349 (TLS session Debug exposure, ECH rejection handling, Brotli certificate decompression, and key-exchange downgrade behavior), reached throughhyper-rustls 0.27.9/reqwest 0.12.28.rustls-webpki 0.103.15— RUSTSEC-2026-0382 (distrusted intermediate certificate path validation).tokio 1.53.1— RUSTSEC-2026-0386 (UnixAsyncFdI/O safety).unsafe-libyaml 0.2.11— RUSTSEC-2024-0449 (unmaintained parser implementation), used byagentverify-observeandagentverify-testkit.webpki-roots 1.0.9— RUSTSEC-2026-0381 (distrusted emSign root/intermediate certificates).
Acceptance additions
- Resolve each advisory by updating the owning dependency chain and regenerating
Cargo.lock; do not add blanket ignores or suppress the advisory database. - Re-run
cargo deny check advisories, full workspace tests, Clippy, MSRV, WASM, and dependency-tree review. - For TLS updates, verify the selected reqwest/rustls feature set remains compatible with the supported targets.
- For
unsafe-libyaml, migrate to the compatible maintained YAML implementation tracked above and add parser parity/failure tests.
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Merge trung bình
- 51 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
software-mansion/pathfinder#3620 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority: low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
storytold/wordcraft#6211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
backlog multiple issues priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
storytold/pdfcraft#6911 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
DGNIMPORT: "The DGN model has nothing that can be imported" when the first element streams are emptyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
HakanSeven12/OpenCADStudio#2820 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày