Skip to content

Adversarial Testing

Alessio Rocchi edited this page Jan 27, 2026 · 1 revision

Adversarial Testing

Step-by-step guide for security-focused code testing.


When to Use

  • Security-critical code
  • Authentication/authorization
  • Payment processing
  • API endpoints
  • Data validation

Workflow

1. Start Review Loop

{
  "tool": "review_loop_start",
  "arguments": {
    "code": "function authenticateUser(...) { ... }",
    "maxIterations": 3
  }
}

2. Monitor Progress

{
  "tool": "review_loop_status",
  "arguments": {
    "loopId": "loop-id"
  }
}

3. Get Issues

{
  "tool": "review_loop_issues",
  "arguments": {
    "loopId": "loop-id"
  }
}

4. Get Final Code

{
  "tool": "review_loop_get_code",
  "arguments": {
    "loopId": "loop-id"
  }
}

Example

Input: Basic authentication function
Iteration 1: Adversarial finds SQL injection
Iteration 2: Coder fixes, Adversarial finds timing attack
Iteration 3: Coder fixes, Adversarial approves
Result: Hardened authentication function

Related:

Clone this wiki locally