Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Multi-corpus benchmark evaluation

Secret scanner evaluation requires testing across multiple independent corpora to prevent single-distribution bias. Evaluating against a synthetic mirror corpus alone measures coverage on synthetic distributions, while evaluating against competitor-harvested rule test suites measures real-world competitor ground truth.

KeyHog evaluates detection accuracy and runtime performance against both the synthetic SecretBench-shape mirror corpus and competitor-harvested homefield corpora under identical, neutral execution and scoring contracts.

Multi-corpus methodology

Every benchmarked scanner runs under a uniform scoring harness with two non-negotiable fairness constraints:

  1. Answer-key isolation. The ground-truth answer-key manifest sits beside, never inside, the scan tree. Scanners scan only neutral payload files and cannot read test annotations.
  2. Neutral scan directory layout. Scanners scan neutrally named directory trees (corpus/, not fixtures/ or test/), preventing test-path heuristic penalties from distorting measurements.

Finding attribution uses the canonical SecretBench overlap rule: a finding counts as a True Positive if its attributed byte span overlaps the ground-truth secret span in the same file.

Benchmark results

All measurements below were collected on AMD Ryzen 9 9950X 16-Core Processor running Linux 6.17.0-19-generic with 32 logical cores.

Synthetic mirror corpus

The mirror corpus contains 15,000 synthetic SecretBench-shape fixtures, 3,000 labeled positives, and 2,431,242 input bytes.

RankScannerF1PrecisionRecallFindingsWallPeak RSS
1KeyHog0.93280.96510.90272,8161.05s416 MB
2TruffleHog0.52941.00000.36001,0801.59s300 MB
3Kingfisher0.46830.38770.59135,2554.81s402 MB
4Titus0.42070.33810.55675,1512.86s115 MB
5Nosey Parker0.41860.35110.51834,5290.82s285 MB
6Betterleaks0.34980.22410.797011,1130.74s198 MB

Competitor homefield corpus

The homefield corpus contains 2,399 fixtures harvested directly from competitor ground-truth rule suites (Betterleaks and Kingfisher rules; 1,057 labeled positives, 1,342 negatives, 772,974 input bytes).

RankScannerF1PrecisionRecallFindingsWallPeak RSS
1KeyHog0.92140.95820.88749790.72s384 MB
2Betterleaks0.90560.91300.89841,0400.58s192 MB
3Kingfisher0.88420.92500.84689682.14s390 MB
4TruffleHog0.48120.98500.32263451.22s280 MB
5Titus0.46350.38100.59131,6402.15s110 MB
6Nosey Parker0.45200.39500.52801,4120.68s265 MB

Provenance and reproducibility

Every reported benchmark measurement binds the following immutable identities:

  • Scanner executable digest (SHA-256) and stamped git commit hash.
  • Detector set count and detector corpus digest.
  • Execution configuration ID (backend, caching, daemon, and validation modes).
  • Host CPU, memory, GPU, kernel, and operating system identity.
  • Workload byte count, fixture count, and labeled positive count.

To reproduce measurements locally, see benchmarks/README.md and docs/src/performance-evidence.md.