Engagement & control
Declare Rules of Engagement, decide in-run approvals, watch window warnings, and stop a pentest with cancel or the kill switch — fail-closed by default.
Why engagement exists
Creating a pentest and attaching assets only records inventory. Agents are not allowed to touch that inventory until you declare an active Rules of Engagement (RoE). Rank is fail-closed: without an active RoE the orchestrator will not start (no_active_roe). Saving a draft version does not authorize a run.
The web app is the same control plane as the Engagement API and the Python SDK. This page describes what you authorize and how control behaves. Exact payloads and method names are in those references and in the Rules of Engagement recipe.
Declare RoE
A RoE is a versioned, machine-readable authorization. At least one of allowed CIDRs or allowed domains must be non-empty, and every pentest asset must fall inside that allow-list. Deny-lists always win. Rank also merges a global deny-list you cannot edit.
Typical fields you set:
- Allow / deny —
allowed_cidrs,allowed_domains,denied_cidrs,denied_domains. - Time windows —
start/endasHH:MM,days, and an IANAtimezone. No windows means 24/7. A window whose end is earlier than start crosses midnight. - Approval classes —
requires_approval_for(shell,script,destructive,exploit,scope_expansion,low_scope_confidence).auto_approvemay skip waiting for listed classes exceptscope_expansion. authorization_ref— required. Ticket, memo or contract id (max 255 characters).escalation_contacts— required, non-empty. Each contact hastype(email,slackorwebhook) andvalue.
Activation fails if any asset sits outside the allow-list, or if a public IPv4 allow CIDR is wider than /16 (IPv6 /32). Private ranges are exempt from that floor.
Kill vs cancel
| Cancel | Kill | |
|---|---|---|
| What it does | Asks the streaming backend to stop the current run | Terminal control flag: the orchestrator must halt |
| Evidence | Stream ends | Preserved |
| Typical use | You started a run and want it to stop | Emergency / out of authorized scope |
| Resume | A new run can be started later if RoE still allows it | The pentest cannot return to an active state |
Cancel and kill are different operations. Do not treat them as the same button.
Pending approvals
Restricted actions pause until someone approves or denies them. Widening the RoE of a running pentest is scope_expansion and is never auto-approved. Tightening (narrower allow-lists, extra denies, extra forbidden techniques) does not need that gate.
List pending items and decide them from the same engagement surface, or from GET /pentests/{id}/approvals and POST …/approvals/{id}/decide.
Window warnings
If the RoE declares time_windows, the live stream emits window warnings as the close time approaches (thresholds at 60 / 30 / 5 minutes). When the window is closed, the orchestrator stops fail-closed — it does not keep working “just a bit longer.”
Where to go next
The model: fail-closed start, CIDR width, approval classes and windows.
Engagement APICreate and activate a RoE, list approvals, decide them, and fire the kill switch.
Rules of Engagement recipeRunnable SDK and REST script: RoE, approvals, kill.
Running pentestsCreate the pentest whose assets the RoE must cover.