Skip to content

ci: install a prebuilt cargo-audit before the security audit - #3

Merged
maltesander merged 1 commit into
mainfrom
fix/security-audit-cargo-audit-install
Aug 5, 2026
Merged

ci: install a prebuilt cargo-audit before the security audit#3
maltesander merged 1 commit into
mainfrom
fix/security-audit-cargo-audit-install

Conversation

@maltesander

Copy link
Copy Markdown
Member

Description

The daily security audit has been failing before it reads a single advisory.

rustsec/audit-check does not ship cargo-audit. It looks the binary up on
PATH and, on a miss, falls back to a bare cargo install cargo-audit with no
--locked, so the install resolves cargo-audit's dependency graph fresh rather
than from its published lockfile. That now pulls in kstring 2.0.4, whose MSRV
is 1.96.0, while rust-toolchain.toml pins this repository to 1.95.0:

error: failed to compile `cargo-audit v0.22.2`
Caused by:
  rustc 1.95.0 is not supported by the following package:
    kstring@2.0.4 requires rustc 1.96.0

The action exposes no input for --locked, but its findOrInstall helper skips
the install entirely when the binary is already present. So this installs a
prebuilt cargo-audit first, using the same taiki-e/install-action pin
build.yaml already uses for cargo-deny, cargo-sort and cargo-fuzz. Nothing is
compiled, the toolchain pin no longer constrains a tool that only reads
Cargo.lock, and the aws-lc-sys build drops out of the job.

rustsec/audit-check does not ship cargo-audit. It looks the binary up on
PATH and, on a miss, falls back to a bare `cargo install cargo-audit`
with no `--locked`, so the install resolves cargo-audit's dependency
graph fresh. That now pulls in kstring 2.0.4, whose MSRV is 1.96.0,
while rust-toolchain.toml pins this repository to 1.95.0, and the daily
job fails before it ever reads an advisory.

The action exposes no way to pass `--locked`, but it does skip the
install when the binary is already present, so install a prebuilt
cargo-audit first. This uses the same taiki-e/install-action pin that
build.yaml already uses for cargo-deny, cargo-sort and cargo-fuzz, and
it also drops the aws-lc-sys build from the job.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@maltesander
maltesander requested a review from adwk67 August 5, 2026 06:35
@maltesander maltesander self-assigned this Aug 5, 2026
@maltesander
maltesander merged commit dddfeb0 into main Aug 5, 2026
9 checks passed
@maltesander
maltesander deleted the fix/security-audit-cargo-audit-install branch August 5, 2026 08:40
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.

2 participants