Implementation:0xSteph Pentest ai OAST Severity
| Knowledge Sources | |
|---|---|
| Domains | OAST, Severity, Calibration |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tool for impact-honest OAST severity calibration that caps existence-only callbacks at medium and escalates by bug class only when impact is proven, provided by the pentest-ai engine.
Description
The calibrate_oast_severity function implements pure-function OAST severity calibration. A bare OAST callback proves a request left the target (existence), not impact — such a verified callback is capped at medium. Once a re-attack proves impact, the finding may be escalated by bug class (ssrf→high, xxe→critical, sqli→critical, stored_xss→high) but never above the severity the probe originally assigned. Pure functions only: no I/O.
Usage
Import this function when you need to calibrate OAST-based finding severities. Used by the verifier after oracle confirmation.
Code Reference
Source Location
- Repository: 0xSteph_Pentest_ai
- File: engine/oast_severity.py
- Lines: 1-52
Signature
def oast_severity_calibration_enabled() -> bool: ...
def calibrate_oast_severity(
*,
oracle_kind: str,
verdict: str,
severity: str,
impact_proven: bool = False,
bug_class: str = "",
) -> str: ...
Import
from engine.oast_severity import calibrate_oast_severity, oast_severity_calibration_enabled
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| oracle_kind | str | Yes | Must be "oast" for calibration to apply |
| verdict | str | Yes | Must be "verified" for calibration to apply |
| severity | str | Yes | Original probe-assigned severity |
| impact_proven | bool | No | Whether a re-attack proved impact (default: False) |
| bug_class | str | No | Bug class for impact-based escalation |
Outputs
| Name | Type | Description |
|---|---|---|
| calibrated severity | str | Adjusted severity string |
Usage Examples
Calibrate OAST Severity
from engine.oast_severity import calibrate_oast_severity
# Existence-only OAST: capped at medium
sev = calibrate_oast_severity(
oracle_kind="oast", verdict="verified", severity="critical",
impact_proven=False,
)
print(sev) # "medium"
# Impact-proven SSRF: escalated to high
sev = calibrate_oast_severity(
oracle_kind="oast", verdict="verified", severity="critical",
impact_proven=True, bug_class="ssrf",
)
print(sev) # "high"