Issue #2807: CI does not check the lockfiles for known vulnerable or unsound crates

Open and answer this issue on GitHub.

ready · opened 2026-11-23 · updated 2026-11-23 · 0 comments

Found while auditing the Dependabot warnings (owner’s request, 2026-11-23). The Dependabot alerts API answers 403 to our integration, so the warnings were checked by running cargo audit locally over each lockfile.

That run found:

CI checks none of the 21 tracked Cargo.lock files today:

The owner decided on 2026-11-23 that CI gets this check.

Goal

A run fails when a tracked Cargo.lock holds a crate with a RustSec advisory of kind vulnerability or unsound. This applies to every push to develop and ci/**, and to the weekly scheduled run.

Advisories of kind unmaintained or yanked are printed, but they do not fail the run.

Decision

To build

  1. A helper scripts/audit.nika.
    • It finds every tracked Cargo.lock with git ls-files.
    • It runs cargo audit -q -n --json -f <lock> on each.
    • It prints one line per finding: lockfile, crate, version, advisory id and kind.
    • It exits 1 when any finding is a vulnerability or unsound, else 0.
    • It is written in Nikaia, not shell or Python, because CLAUDE.md requires that of helper tools.
    • Test: tests/compiler/tests/audit_classify.nika with its .stdout. It runs on a canned JSON sample with one finding of each kind; the rows it shows are each finding’s classification and the exit decision.
  2. A step in the checks job of .github/workflows/nikaia.yml, after the build.
    • It installs cargo-audit, either with cargo install cargo-audit --locked cached with the cargo registry, or as a prebuilt binary; the builder chooses.
    • It then runs ./target/release/nikaia run scripts/audit.nika.
    • It lands only after #2806 is on develop; otherwise develop turns red.
    • This step’s commit carries Fixes #N.

Done when

Both of the following hold:

The CI step runs the script. The report gives one Found: line per finding.

Needs #2806 (the benches/game dependency raise).

Files and limits

Facts: CI and caches

Ruled out


Generated by Claude Code

Back to Open Issues