Skip to content

Conversation

@Grinsven
Copy link
Contributor

Integrates cargo-audit into the CI pipeline to scan for dependency vulnerabilities on every pull request. The rustsec/audit-check action runs cargo audit and fails CI if new vulnerabilities are detected.

Known vulnerabilities requiring non-trivial upgrades are excluded in .cargo/audit.toml. This includes 14 advisories tracked in #3338 covering sqlx (breaking changes to 0.8.x), unmaintained crates (atty, derivative, adler, instant, paste, proc-macro-error), and transitive dependencies with no available patches. Only NEW vulnerabilities will cause CI failures.

Changes:

  • Add cargo-audit job to .github/workflows/pull-request.yaml
  • Create .cargo/audit.toml with 14 excluded advisories
  • Each exclusion documented with vulnerability type and remediation plan
  • References issue chore: Fix cargo audit warnings #3338 for tracking dependency upgrades

Fixes #3378

@Grinsven Grinsven requested a review from a team as a code owner October 26, 2025 09:49
Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Nice documentation of the known vulnerabilities. 👍

Copy link
Contributor Author

@Grinsven Grinsven left a comment

Choose a reason for hiding this comment

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

How do we know when it no longer applies? Does cargo-audit also provide tools for that?

cargo-audit doesn't have this. You'd need to manually check audit.toml when upgrading dependencies from #3338 and remove the
matching RUSTSEC entries.

cargo-deny has automatic detection built in. It warns when an ignored advisory no longer applies to your dependency versions.
Can switch the CI job if you want that instead.

@MartinquaXD MartinquaXD enabled auto-merge (squash) October 30, 2025 13:54
@MartinquaXD MartinquaXD disabled auto-merge October 30, 2025 15:50
@MartinquaXD
Copy link
Contributor

@Grinsven could you please rebase this PR onto the latest main? For some reason there is no button for me to automatically rebase it. 🤔

# Only NEW vulnerabilities will cause CI to fail

[advisories]
# Known vulnerabilities that are tracked in issue #3338
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a link to the issue?

Grinsven added a commit to Grinsven/services that referenced this pull request Oct 31, 2025
@jmg-duarte jmg-duarte added this pull request to the merge queue Nov 3, 2025
Merged via the queue into cowprotocol:main with commit f928b7d Nov 3, 2025
18 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Incorporate cargo-audit to CI

4 participants