Expand description
cargo frisk — see what you are actually shipping to crates.io.
Secret scanners check what git tracks. cargo frisk checks what cargo ships,
and those are not the same set of files. The product is the diff between the
packaged .crate tarball and git ls-files; content inspection is an
annotation on that diff, not the headline.
use cargo_frisk::{run, Options};
let outcome = run(&Options::default())?;
println!("{} findings", outcome.findings().count());Modules§
- archive
- Stream the gzipped tar in memory.
- cli
- Command-line surface, including the cargo subcommand shim.
- config
[package.metadata.frisk]— configuration lives inCargo.toml.- diff
- The three buckets. This is the whole product.
- gitset
- The git-tracked file set, via
git ls-files. - package
- Invoke
cargo packageand locate the.crateit produced. - report
- Human, JSON and SARIF output.
- rules
- Rule loading and compilation.
- scan
- Content and path inspection — an annotation on the diff, not the headline.
Structs§
- Finding
- One reportable thing about one packaged file.
- Options
- What to frisk and how.
- Outcome
- Everything a single
cargo friskinvocation produced. - Package
Report - The result of frisking one package.
- Unscanned
- A packaged file we deliberately did not scan, and why.
Enums§
- Finding
Kind - Which half of the tool produced a finding.
- GitState
- Whether we had a git file set to diff against.
- Severity
- How bad a finding is.
- Threshold
- The severity at or above which the run fails with exit code 1.
- Unscanned
Reason
Constants§
- DEFAULT_
MAX_ FILE_ SIZE - Default per-file scan cap: 5 MB.
Functions§
- run
- Frisk everything
optionsselects.