Precision tuning

Rank of noise sources, from cheapest to fix.

1. Pick the right gate

Flag Effect
--min-confidence medium Drops findings whose validator failed (for example a ghp_ token with a bad checksum, a JWT that does not decode, a PEM that is not a key)
--min-confidence high Keeps only prefix-specific, validated or paired findings. Good for blocking pre-commit hooks
--fail-on high Still reports everything but only exits 1 for high/critical
--no-entropy Removes the generic high-entropy-string rule

A typical split: pre-commit uses --min-confidence high, CI uses the default and a baseline.

2. Suppress known-safe values

3. Tune a rule

Copy the built-in rule into .secretsweep.toml with the same id and adjust it: raise entropy, add allowlist regexes, narrow path_regex.

How false positives are already avoided

Reading confidence

Level Meaning
high Validator passed, paired with its partner, or an unambiguous prefix format
medium Contextual or generic match (password assignment, entropy, bare 32-hex Twilio-style keys)
low Matched the shape but validation failed (bad checksum, undecodable JWT/PEM)