cargo vet#6974
Conversation
WalkthroughThis PR adds cargo-vet supply-chain audit verification to the Trezor firmware Rust build pipeline. It introduces the cargo-vet tool to the development environment via shell.nix, creates a new make target ( Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| model | device_test | click_test | persistence_test |
|---|---|---|---|
| T2T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3B1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3W1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
Latest CI run: 26687998413
f32921f to
f8a97bf
Compare
|
👍 to me personally this seems like a good direction to go. I think the main consideration is how we set up the criteria. The default policy is to require Then if we feel like it we can extend this with additional criteria like
|
- tool and CI setup - no review imports yet - vendored crates (pareen, qrcodegen, tjpdec) are treated as imported crates - `cargo-vet` command should pass in this commit because all dependencies are exempted [no changelog]
- picking Google, Mozilla and ZCash, we went down from 95 exempted crates to 77 exempted crates Commands to achieve the results: - cargo vet import google https://raw.githubusercontent.com/google/supply-chain/main/audits.toml - cargo vet import mozilla https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml - cargo vet import zcash https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/audits.toml - cargo vet - cargo vet prune [no changelog]
- adding also Bytecode Alliance and ISRG - dropping exempted crates count to 66 [no changelog]
- cargo vet trust regex [no changelog]
- ported the "Reviewed: Yes" rows from Notion [no changelog]
f8a97bf to
2bbee66
Compare
There was a problem hiding this comment.
Pull request overview
Adds cargo vet support for the Core Rust workspace so Rust dependency supply-chain checks can run in local Nix shells and CI.
Changes:
- Adds
cargo-vetto the Nix development environment. - Adds a
make vet_rusttarget and wires it into the Core Rust CI job. - Introduces cargo-vet supply-chain configuration, local audits, imported audits lockfile, and exemptions.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
shell.nix |
Adds the cargo-vet tool to the development shell. |
core/Makefile |
Adds a vet_rust target that runs cargo-vet for Core Rust dependencies. |
core/embed/supply-chain/imports.lock |
Adds generated locked imported audit data for cargo-vet. |
core/embed/supply-chain/config.toml |
Adds cargo-vet configuration, imported audit sources, policies, and exemptions. |
core/embed/supply-chain/audits.toml |
Adds local audits and a trusted publisher entry. |
.github/workflows/core.yml |
Runs the new cargo-vet target in the Core Rust CI job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mmilata I reworked the PR to be more comprehensive. Go by commits to see the clear progress. I ported only the reviewed crates from our Notion table and I don't introduce any new criteria. I think it's a good enough starting point. Currently, |




































This PR adds
cargo-vetintegration to track internal audits of 3rd party crates and to offshore some reviews to trusted parties.See https://mozilla.github.io/cargo-vet/index.html