INNER CODE UNIT · Python

_confirm_engagement

0xSteph/pentest-ai · cli/main.py:395

def _confirm_engagement(
    target: str,
    scope_enforcer,
    intensity: str,
    *,
    auto_auth: bool = False,
    strict_scope: bool = False,
    no_oast: bool = False,
    interactive: bool = True,
) -> bool:
    """Render a scope/safety preflight and, in interactive runs, ask the human
    to confirm before any traffic is sent. Returns True to proceed. In
    non-interactive runs (CI / --yes / no TTY) it prints the summary and
    proceeds — automation cannot answer a prompt."""
    summ = scope_enforcer.summary()
    allowed = summ.get("allowed") or ["(none — fail-closed: nothing is in scope)"]
    excluded = summ.get("excluded") or ["(none)"]
    flags: list[str] = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…