3329lens

A cryptographic inventory for your codebase

3329lens walks a codebase, finds the cryptography it depends on, resolves real versions from lockfiles, correlates them against an offline advisory database, and exports the result as a CycloneDX CBOM or a SARIF log.

cargo install --locked lens3329      # installs the `3329lens` binary
3329lens scan --path ./my-project

Open source under the Apache License 2.0. Everything runs offline: the scanner makes no network requests.

Two questions it answers

What it does

Gate your CI on it

git clone --depth 1 https://github.com/rustsec/advisory-db
3329lens scan --path . --advisory-db ./advisory-db --fail-on high
Exit codeMeaning
0Success: no finding met the --fail-on threshold
1Operational error (bad path, unreadable database, write failure)
2A vulnerability at or above the threshold was found

An advisory database that yields no usable advisories is a hard error, not an empty result. "Nothing matched" because nothing loaded would look exactly like a clean bill of health, and would let the CI gate pass for the wrong reason.

For GitHub code scanning, write --format sarif and upload the result with github/codeql-action/upload-sarif. Severity is mapped so GitHub buckets findings correctly.

Scope and limitations

Why 3329?

3329 is the modulus q of ML-KEM (Kyber), the post-quantum key encapsulation mechanism standardised by NIST in FIPS 203.

3329lens or lens3329?

The product, the command, the domain and the GitHub organisation are all 3329lens. The Rust crate is published as lens3329 because Cargo rejects package names that start with a digit. Install lens3329 to get the 3329lens command, or depend on it with default-features = false to embed the scanning core in your own program.

Documentation

The README is the reference: per-platform install steps, every output format, the dashboard's keys and the library API. API documentation is on docs.rs, and release history is in the changelog.