How ozayyyy/api-security-testing-framework works
APISTF is a deterministic REST API security assessment framework. An operator configures a target and identities, optionally supplies an OpenAPI specification, and runs selected probes; detectors send requests and produce evidence-backed findings that can be written as JSON, Markdown, or HTML. The safe HTTP client enforces the target allowlist and request budget, records audit entries, and redacts evidence. The README documents detector capabilities not all represented by sampled source; the excessive-data detector has no dedicated file in the supplied tree, so its node uses the existing detector directory.
Main entry points: runner.py Detector runner · client.py Safe HTTP client · findings.py Finding records · cli.py CLI
Components 21
Scan setup
- CLI
apistf/cli.py - Target identities
apistf/config.py - OpenAPI parser
apistf/openapi.py - Detector runner
apistf/runner.py
Security probes
- Detector context
apistf/detectors/base.py - BOLA probe
apistf/detectors/bola.py - BFLA probe
apistf/detectors/bfla.py - Business logic probe
apistf/detectors/business_logic.py - Inconsistent authz probe
apistf/detectors/inconsistent_authz.py - JWT probe
apistf/detectors/jwt.py - Mass assignment probe
apistf/detectors/mass_assignment.py - Rate limit probe
apistf/detectors/rate_limit.py - Session probe
apistf/detectors/session.py - Excessive data probe
apistf/detectors
Safe transport
- Safe HTTP client
apistf/client.py - Audit log
apistf/audit.py - Evidence redaction
apistf/redaction.py
Evidence and reports
- Finding records
apistf/findings.py - Report writer
apistf/reporting.py
Other components
- Operator
- Target API
Connections 37
- Operator → CLI: starts scan
README.md - CLI → Target identities: builds config
apistf/cli.py - CLI → OpenAPI parser: loads spec
apistf/cli.py - CLI → Detector runner: runs detectors
apistf/cli.py - Detector runner → Detector context: creates context
apistf/runner.py - Detector runner → Target identities: passes config
apistf/runner.py - Detector runner → OpenAPI parser: passes spec
apistf/runner.py - Detector runner → Safe HTTP client: creates client
apistf/runner.py - Detector runner → BOLA probe: dispatches
- Detector runner → BFLA probe: dispatches
- Detector runner → Business logic probe: dispatches
- Detector runner → Inconsistent authz probe: dispatches
- Detector runner → JWT probe: dispatches
- Detector runner → Mass assignment probe: dispatches
- Detector runner → Rate limit probe: dispatches
- Detector runner → Session probe: dispatches
- Detector context → Safe HTTP client: provides client
apistf/detectors/base.py - BOLA probe → Safe HTTP client: sends probes
- BFLA probe → Safe HTTP client: sends probes
- Business logic probe → Safe HTTP client: sends probes
apistf/detectors/business_logic.py - Inconsistent authz probe → Safe HTTP client: sends probes
apistf/detectors/inconsistent_authz.py - JWT probe → Safe HTTP client: sends probes
apistf/detectors/jwt.py - Mass assignment probe → Safe HTTP client: sends probes
- Rate limit probe → Safe HTTP client: sends probes
- Session probe → Safe HTTP client: sends probes
apistf/detectors/session.py - Excessive data probe → Safe HTTP client: sends probes
README.md - Safe HTTP client → Target API: sends requests
apistf/client.py - Safe HTTP client → Target identities: checks limits
apistf/client.py - Safe HTTP client → Audit log: appends records
apistf/client.py - Safe HTTP client → Evidence redaction: redacts evidence
apistf/client.py - Business logic probe → Finding records: creates findings
apistf/detectors/business_logic.py - Inconsistent authz probe → Finding records: creates findings
apistf/detectors/inconsistent_authz.py - JWT probe → Finding records: creates findings
apistf/detectors/jwt.py - Session probe → Finding records: creates findings
apistf/detectors/session.py - Detector runner → Finding records: collects findings
apistf/runner.py - CLI → Report writer: writes report
apistf/cli.py - Report writer → Finding records: serializes findings
apistf/reporting.py