Repository navigation
ci: replace cargo-audit with cargo-deny - #1469
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The migration from cargo-audit to cargo-deny has no active review issues requiring further changes.
No open issues 🎉
What changed in this PR
Replaces cargo-audit with cargo-deny for the Lambda extension’s Rust dependency checks, while preserving the required Audit check name and the separate Trivy scan.
Changes:
- Adds a centralized policy for advisories, duplicate dependencies, sources, and licenses across all features and four shipping Linux targets.
- Updates CI to run
cargo deny --locked checkand bumps the install-action pin used for cargo-deny and nextest. - Removes the old audit configuration and updates comments to reference cargo-deny.
| File | Description |
|---|---|
bottlecap/deny.toml |
Defines dependency policies and documented advisory exceptions. |
bottlecap/Cargo.toml |
Updates comments to reference cargo-deny and its configuration. |
bottlecap/.cargo/audit.toml |
Removes the superseded cargo-audit configuration. |
.trivyignore.yaml |
Updates explanatory text to point to the new ignore configuration. |
.github/workflows/rs_ci.yml |
Replaces the audit action with cargo-deny and updates install-action pins. |
Review effort: Balanced
litianningdatadog
approved these changes
Oct 29, 2026
duncanista
added a commit
that referenced
this pull request
Oct 29, 2026
…can (#1481) ## Overview Jira: [SVLS-9989](https://datadoghq.atlassian.net/browse/SVLS-9989) The Trivy `Lockfile Scan` fails on `main` and on every PR. It flags 3 rustls 0.23.43 advisories: | GHSA | RustSec | Severity | Title | |---|---|---|---| | GHSA-c8m5-c952-6cm4 | RUSTSEC-2026-0346 | medium | `Debug` impls for client session values expose TLS secrets | | GHSA-h2v8-394m-p7vv | RUSTSEC-2026-0348 | low | Brotli certificate decompression can allocate up to 1 GiB before authentication | | GHSA-w44r-93j7-qv28 | RUSTSEC-2026-0349 | low | Unauthenticated ServerHello can downgrade later connections | The Rust advisory check (`Audit`) already ignores these 3, for the same reason as GHSA-2mjx-qc3c-rqvc (RUSTSEC-2026-0285), which is already in `.trivyignore.yaml`. The fix is rustls >= 0.23.46. That version needs aws-lc-rs >= 1.18, which moves the `fips` build to the AWS-LC-FIPS 4.0 module. NIST has not certified AWS-LC-FIPS 4.0 yet; it is still in review. The certified modules are 3.x and older. This PR adds the 3 GHSA ids to `.trivyignore.yaml` with that reason, so the two ignore lists match again. Remove all 4 rustls entries, and the matching Rust advisory ignores, when AWS-LC-FIPS 4.0 is certified and rustls is bumped. It does not depend on any other PR. It touches the same file as #1469, so the second one to merge needs a small rebase. ## Testing Ran the same scan as the `Lockfile Scan` job (trivy 0.69.3, `fs bottlecap`, `--ignore-unfixed`, `--exit-code 1`, this ignore file): - `main`: exit 1, `Total: 3 (LOW: 2, MEDIUM: 1)`, the 3 GHSA ids above. - this branch: exit 0, no findings. - `.trivyignore.yaml` parses as YAML with 5 entries. [SVLS-9989]: https://datadoghq.atlassian.net/browse/SVLS-9989?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Jira: SVLS-9974
The
Auditjob fails on the next PR. RustSec published advisories for zstd, zstd-safe andzstd-sys (RUSTSEC-2026-0391, 0398, 0403, 0410) and for tokio (RUSTSEC-2026-0386). None of them
applies to bottlecap: the zstd crates only compress, the one decoder reads the embedded AppSec
ruleset, the
seekablefeature is off, and 0410 is wasm32 only. The real fix is zstd 0.14 inserverless-components and libdatadog.
This PR replaces
rustsec/audit-checkwithcargo deny --locked check:bottlecap/deny.tomlholds one ignore list, with a reason per entry. It also checksduplicate versions (warn, with the holder of each skip named), sources (crates.io and the
DataDog GitHub org) and licenses (the current set plus the OpenSSL exception for
aws-lc-fips-sys). The graph uses all features and the 4 Linux targets that ship.Audit, which branch protection onmainrequires.bottlecap/.cargo/audit.tomlgoes away. The old action read it from the repo root, so CInever loaded it.
Cargo.tomland.trivyignore.yamlnow point atdeny.toml. The Trivylockfile scan stays as the second advisory source.
taiki-e/install-actionpin moves from v2.69.9 to v2.87.28 (2026-10-12) for thecargo-deny install. The same bump changes the nextest install of the required "Test Suite"
job (still
nextest@0.9).Size: 199 core lines, 199 lines in total.
Testing
cargo metadata --locked: passcargo deny --locked check: passdd-rust-license-tool check: pass