Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai Clean FP Sweep

From Leeroopedia
Knowledge Sources
Domains Benchmark, False_Positives, Precision
Last Updated 2026-10-23 00:00 GMT

Overview

Concrete tool for measuring false-positive rate against a known-clean fixture app with zero planted vulnerabilities, provided by the pentest-ai benchmark suite.

Description

The clean_fp_sweep script runs ptai's full deterministic web sweep (--no-llm) against the hardened fixture in tests/cleanapp — an app with ZERO planted vulnerabilities whose routes are deliberately attackable-looking but correctly implemented. Because nothing there is vulnerable, every finding the sweep emits is a pure false positive. This is the precision counterpart to the honeypot catch-rate benchmark: that one measures recall on real bugs, this one measures precision on a safe surface.

Usage

Run this script to measure the false-positive count. A green run (0 false positives) is the launch-credibility gate; a non-zero run names exactly which probe to fix.

Code Reference

Source Location

Signature

def main() -> int:
    """Run clean app FP sweep. Returns exit code 0 if 0 FPs, 1 otherwise."""

Import

# Run as a script:
# python benchmarks/clean_fp_sweep.py

I/O Contract

Inputs

Name Type Required Description
CLEANAPP_PORT int (env) No Port for clean fixture app (default: 4111)

Outputs

Name Type Description
false_positive_count int Number of false positives found
exit code int 0 if 0 FPs, 1 otherwise

Usage Examples

Run the FP Sweep

# Run from the repo root:
# python benchmarks/clean_fp_sweep.py

# Output:
#   Starting cleanapp on port 4111...
#   Running --no-llm sweep...
#   False positives: 0
#   PASS: no false positives on clean fixture

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment