Skip to content

ci: replace cargo-audit with cargo-deny - #1469

Merged
duncanista merged 1 commit into
mainfrom
jordan.gonzalez/cargo-deny/feature
Oct 29, 2026
Merged

duncanista merged 1 commit into
mainfrom
jordan.gonzalez/cargo-deny/feature

Conversation

@duncanista

@duncanista duncanista commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Jira: SVLS-9974

The Audit job fails on the next PR. RustSec published advisories for zstd, zstd-safe and
zstd-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 seekable feature is off, and 0410 is wasm32 only. The real fix is zstd 0.14 in
serverless-components and libdatadog.

This PR replaces rustsec/audit-check with cargo deny --locked check:

  • bottlecap/deny.toml holds one ignore list, with a reason per entry. It also checks
    duplicate 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.
  • The job keeps the check name Audit, which branch protection on main requires.
  • bottlecap/.cargo/audit.toml goes away. The old action read it from the repo root, so CI
    never loaded it.
  • Comments in Cargo.toml and .trivyignore.yaml now point at deny.toml. The Trivy
    lockfile scan stays as the second advisory source.
  • The taiki-e/install-action pin moves from v2.69.9 to v2.87.28 (2026-10-12) for the
    cargo-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

  • applies on the previous PR of the stack: pass
  • cargo metadata --locked: pass
  • cargo deny --locked check: pass
  • dd-rust-license-tool check: pass
  • actionlint 1.7.12 with shellcheck 0.10.0 on the changed workflows: pass

Copilot AI balanced review requested due to automatic review settings October 28, 2026 18:57
@duncanista
duncanista requested a review from a team as a code owner October 28, 2026 18:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T19:03:06.029097Z — PR opened
🔒 Security Review ✅ Completed 2026-10-28T19:03:21.715098Z 26f7ded PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 check and 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

@duncanista duncanista changed the title [SVLS-9974] ci: replace cargo-audit with cargo-deny ci: replace cargo-audit with cargo-deny Oct 28, 2026
@duncanista
duncanista merged commit 13ad25e into main Oct 29, 2026
62 of 63 checks passed
@duncanista
duncanista deleted the jordan.gonzalez/cargo-deny/feature branch October 29, 2026 18:49
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
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.

3 participants