Rules of Engagement (RoE)

RedAmon supports Rules of Engagement — the formal constraints that govern every penetration testing engagement. Upload a RoE document (PDF, TXT, MD, or DOCX) when creating a project, and an LLM automatically parses it into structured settings that are enforced across the entire platform: the recon pipeline, the AI agent, and all tool executions.

RoE Settings Tab

One-way at creation only. RoE settings are configured when the project is created and become read-only afterward. This prevents accidental modification of engagement constraints mid-assessment.


Table of Contents


How It Works

  1. Upload a RoE document in the project creation form (RoE tab)
  2. The document is sent to the AI agent, which parses it into structured fields covering scope, exclusions, time windows, permissions, rate limits, data handling, and more
  3. All parsed fields auto-populate the project settings across multiple tabs (Target, Rates, Modules, RoE)
  4. The original document binary is stored in PostgreSQL and can be downloaded later
  5. At runtime, RoE constraints are enforced at three layers: agent prompt injection, deterministic tool gates, and recon pipeline filtering

Document Upload & Parsing

In the Rules of Engagement tab of the project creation form:

  1. Click the upload area or drag-and-drop a file (.pdf, .txt, .md, .docx)
  2. Click Parse & Auto-fill Settings — the LLM extracts all relevant information
  3. A success modal shows which tabs were affected
  4. Review and adjust the auto-filled settings across all tabs before saving

The parser extracts:

  • Target domain, IPs, and subdomain scope
  • Excluded hosts with reasons
  • Time windows and timezone
  • Testing permissions (DoS, social engineering, physical access, etc.)
  • Rate limits and severity caps
  • Data handling policies
  • Client contacts and engagement dates
  • Compliance frameworks and third-party providers
  • Tool-specific restrictions

Smart merging. The parser only disables tools that are explicitly banned by name in the RoE document. Phrases like "use with caution" or "discouraged" are noted in the agent prompt but do not disable tools. Phase restrictions (e.g., "reconnaissance only") are handled via roeMaxSeverityPhase, not by stripping phases from individual tools.


RoE Settings Reference

Client & Engagement

ParameterDefaultDescription
Client NameClient organization name
Contact NamePrimary client point of contact
Contact EmailClient POC email address
Contact PhoneClient POC phone number
Emergency ContactWho to contact if testing causes an incident
Engagement Start DateStart date (YYYY-MM-DD)
Engagement End DateEnd date (YYYY-MM-DD)
Engagement TypeexternalType: external, internal, web_app, api, mobile, physical, social_engineering, red_team

Scope & Exclusions

ParameterDefaultDescription
Excluded Hosts[]IPs or domains that must NEVER be touched during testing
Excluded Host Reasons[]Reason for each exclusion (parallel array)

Excluded hosts are filtered out at every level — the recon pipeline skips them during target expansion, and the agent prompt explicitly lists them as off-limits.

Time Windows

ParameterDefaultDescription
Time Window EnabledfalseRestrict testing to specific days/hours
TimezoneUTCTimezone for the time window
DaysMon-FriAllowed days of the week
Start Time09:00Window start (HH:MM)
End Time18:00Window end (HH:MM)

When enabled, the recon orchestrator blocks scan starts outside the allowed window, and the RoE viewer shows a live ACTIVE/OUTSIDE WINDOW status indicator.

Testing Permissions

Six boolean toggles control what categories of testing are permitted:

PermissionDefaultDescription
Allow DoSfalseDenial of service testing
Allow Social EngineeringfalseSocial engineering / phishing
Allow Physical AccessfalsePhysical security testing
Allow Data ExfiltrationfalseExfiltrate data as proof of access
Allow Account LockoutfalseTrigger account lockouts (e.g., brute force)
Allow Production TestingtrueTest in production environments

When a permission is set to false, the corresponding tool category is automatically blocked by the hard gate in the agent's tool execution layer.

Constraints & Rate Limits

ParameterDefaultDescription
Max Severity Phasepost_exploitationHighest phase allowed: informational, exploitation, or post_exploitation
Global Max RPS0Global rate limit across all tools (0 = no cap). Applied as min(tool_rate, global_max)
Forbidden Categories[]Blocked technique categories: brute_force, dos, social_engineering, physical

Data Handling

ParameterDefaultDescription
Sensitive Data Handlingno_accessPolicy: no_access, prove_access_only, limited_collection, full_access
Data Retention Days90How long to retain test data
Require Data EncryptiontrueEncrypt all test artifacts at rest and in transit

Communication & Incident Response

ParameterDefaultDescription
Status Update FrequencydailyHow often to report: daily, weekly, on_finding, none
Critical Finding NotifytrueImmediately notify client on critical findings
Incident ProcedureFree-text procedure if testing causes an incident

Compliance & Authorization

ParameterDefaultDescription
Compliance Frameworks[]Applicable frameworks: PCI-DSS, HIPAA, SOC2, GDPR, ISO27001
Third-Party Providers[]Cloud/hosting providers requiring separate authorization

Notes

ParameterDefaultDescription
NotesFree-text field for any rules not captured by structured fields

Enforcement Layers

RoE constraints are enforced at three independent layers, providing defense-in-depth:

Agent Prompt Injection

When RoE is enabled, a structured ## RULES OF ENGAGEMENT (MANDATORY) section is injected into the agent's system prompt at the think node — the reasoning step before every action. This section includes:

  • Client name, contacts, and emergency procedures
  • Excluded hosts listed explicitly with "NEVER TOUCH" language
  • Time window status
  • All testing permissions and restrictions
  • Forbidden tools and categories
  • Data handling policy
  • Compliance frameworks
  • Truncated original RoE document text (up to 3,000 chars) for context

The agent sees this on every reasoning step, so it plans around restrictions proactively rather than hitting the hard gate.

Hard Gate (Tool Execution)

A deterministic code gate in execute_tool_node blocks tool calls regardless of what the LLM decides:

  • Forbidden tools: Any tool in roeForbiddenTools is blocked immediately
  • Forbidden categories: Categories like brute_force auto-block associated tools (e.g., execute_hydra)
  • Permission flags: roeAllowDos=false blocks DoS-related tools, roeAllowAccountLockout=false blocks Hydra, etc.
  • Phase cap: If roeMaxSeverityPhase=exploitation, any tool call during post_exploitation phase is blocked

When a tool is blocked, the agent receives a clear message explaining which RoE rule was violated.

Recon Pipeline

The recon orchestrator enforces RoE at the infrastructure level:

  • Excluded hosts are filtered from all scan target lists during IP expansion
  • Rate limit cap applies min(configured_rate, roeGlobalMaxRps) to every tool's rate setting
  • Time window blocks scan starts outside the allowed window (returns 403)
  • Scope check on named targets applies to the Secret Multiscanner: every source's target (a repository, a Docker image reference, a GitHub org, a Hugging Face model, a Jenkins URL) is checked against the project's declared scope before the container is spawned, and a target outside it is refused. For a name-only target this is the only applicable check, so it composes with, rather than replaces, the internal-address egress guard

RoE Viewer (Graph Page)

The graph dashboard includes a dedicated RoE tab (alongside Graph, Table, and Sessions) that displays all parsed rules in a formatted, read-only view.

RoE Viewer

The viewer is organized into cards:

CardContents
EngagementClient name, engagement type, date range, contact details
ScopeTarget domain, IP ranges, exclusion count
Excluded HostsEach excluded host with reason, highlighted in red (full-width card)
Time WindowAllowed days/hours, timezone, live ACTIVE/OUTSIDE WINDOW status
Testing Permissions6 permission badges in a grid (green = allowed, red = denied)
ConstraintsMax phase indicator, rate limit, forbidden categories as tags
Data HandlingSensitive data policy, retention period, encryption requirement
CommunicationStatus update frequency, critical finding notification, incident procedure
Compliance & AuthorizationCompliance framework tags, third-party provider tags
Additional NotesFree-text notes (full-width card)

A Download button in the header lets you retrieve the original uploaded RoE document (PDF, TXT, etc.).

If no RoE has been configured, the tab shows an empty state with instructions.


RoE Toolbar Badge

When RoE is enabled for a project, a blue RoE badge appears in the graph toolbar (between the domain name and the PAUSE ALL button). This provides at-a-glance confirmation that engagement guardrails are active.


Field Source Standards

The RoE fields are based on industry-standard penetration testing frameworks:

CategorySource Standards
Scope exclusionsPTES, SANS, all major templates
Time windowsPTES ("Time of Day to Test"), SANS worksheet
Forbidden tools/techniquesPTES, Microsoft RoE, HackerOne
Severity/phase capNIST SP 800-115, PTES phases
Rate limitsCommon in all web/API pentests
Client & contactsSANS worksheet, PTES, Red Team Guide
Engagement datesPTES ("Timeline"), all templates
DoS/Social Eng permissionsMicrosoft RoE, PTES, HackerOne
Data handlingPTES ("Disclosure of Sensitive Information"), HackerOne
Incident procedurePTES, SANS, NIST SP 800-115
Compliance frameworksPCI-DSS, HIPAA, SOC2, GDPR scope