Skip to content

Switch off cargo audit#6009

Draft
ShadowCurse wants to merge 2 commits into
firecracker-microvm:mainfrom
ShadowCurse:switch_off_cargo_audit
Draft

Switch off cargo audit#6009
ShadowCurse wants to merge 2 commits into
firecracker-microvm:mainfrom
ShadowCurse:switch_off_cargo_audit

Conversation

@ShadowCurse

Copy link
Copy Markdown
Contributor

Changes

Replace crago-audit with crago-deny for the advisory checks. This allows us to skip unnecessary notifications about crates we don't use, but which are pulled as dependencies from optional features of other crates.
Also remove .cargo/audit.toml since both ignores are not applicable anymore.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

`cargo-audit` goes through all crates in the Cargo.lock which includes
crate which are pulled as transitive dependencies of some crates but not
used in any of our binaries. Switching to `crago-deny` fixes this since
it only checks crates which are a part of our dependencies tree for our
binaries.

Similar to `cargo-audit`, we need to install `cargo-deny` each time to
avoid a possibility of it breaking if advisory database suddenly updates
the format it uses. But for the sake of speed, we now install with
`--debug` flag to install debug binary (install in this case means
"compile"). This saves time and does not affect the result.

`cargo-audit` is also used in other places (like license checks), but it
is fine to only "install" it again here. Everywhere else we can use
version installed in the docker image, even if it can be out of date.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Both ignores are not applicable anymore:
- `gdbstub` moved from `paste`
  daniel5151/gdbstub#168
- `uuid` we have is `1.23.2` version

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.08%. Comparing base (7503f25) to head (79b9923).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6009   +/-   ##
=======================================
  Coverage   83.08%   83.08%           
=======================================
  Files         277      277           
  Lines       30201    30201           
=======================================
  Hits        25094    25094           
  Misses       5107     5107           
Flag Coverage Δ
5.10-m5n.metal 83.41% <ø> (-0.01%) ⬇️
5.10-m6a.metal 82.76% <ø> (-0.01%) ⬇️
5.10-m6g.metal 80.06% <ø> (ø)
5.10-m6i.metal 83.41% <ø> (-0.01%) ⬇️
5.10-m7a.metal-48xl 82.75% <ø> (-0.01%) ⬇️
5.10-m7g.metal 80.06% <ø> (ø)
5.10-m7i.metal-24xl 83.39% <ø> (ø)
5.10-m7i.metal-48xl 83.39% <ø> (-0.01%) ⬇️
5.10-m8g.metal-24xl 80.05% <ø> (-0.01%) ⬇️
5.10-m8g.metal-48xl 80.06% <ø> (ø)
5.10-m8i.metal-48xl 83.39% <ø> (-0.01%) ⬇️
5.10-m8i.metal-96xl 83.39% <ø> (ø)
6.1-m5n.metal 83.44% <ø> (ø)
6.1-m6a.metal 82.79% <ø> (-0.01%) ⬇️
6.1-m6g.metal 80.05% <ø> (-0.01%) ⬇️
6.1-m6i.metal 83.44% <ø> (ø)
6.1-m7a.metal-48xl 82.78% <ø> (+<0.01%) ⬆️
6.1-m7g.metal 80.06% <ø> (ø)
6.1-m7i.metal-24xl 83.45% <ø> (ø)
6.1-m7i.metal-48xl 83.45% <ø> (ø)
6.1-m8g.metal-24xl 80.05% <ø> (-0.02%) ⬇️
6.1-m8g.metal-48xl 80.06% <ø> (ø)
6.1-m8i.metal-48xl 83.45% <ø> (ø)
6.1-m8i.metal-96xl 83.45% <ø> (+<0.01%) ⬆️
6.18-m5n.metal 83.43% <ø> (-0.02%) ⬇️
6.18-m6a.metal 82.78% <ø> (-0.01%) ⬇️
6.18-m6g.metal 80.05% <ø> (-0.01%) ⬇️
6.18-m6i.metal 83.43% <ø> (-0.01%) ⬇️
6.18-m7a.metal-48xl 82.78% <ø> (-0.01%) ⬇️
6.18-m7g.metal 80.05% <ø> (-0.01%) ⬇️
6.18-m7i.metal-24xl 83.45% <ø> (+<0.01%) ⬆️
6.18-m7i.metal-48xl 83.45% <ø> (-0.01%) ⬇️
6.18-m8g.metal-24xl 80.05% <ø> (-0.01%) ⬇️
6.18-m8g.metal-48xl 80.05% <ø> (-0.01%) ⬇️
6.18-m8i.metal-48xl 83.45% <ø> (-0.01%) ⬇️
6.18-m8i.metal-96xl 83.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant