chAng-L19/codex-redteam-mode

针对于红队攻击思维做出的red team模式(破限项目,封号概不负责)##可自行适配其他Agent。项目问题请提issue

What it solves

This project addresses the instability of long-running security workflows in AI assistants. It prevents issues such as session interruptions, tool variance, manual result relaying, and "false completions" where a tool reports success but the actual objective hasn't been met.

How it works

It implements a durable red-team runtime for the Codex App and CLI. The system converts a user's objective into a GoalContract and executes it via WorkflowSpec graphs using Model Context Protocol (MCP) tools. It uses a TerminalJudge to ensure every criterion is proven with verified evidence before marking a task as complete. To maintain stability, it utilizes SQLite WAL for state management, idempotency keys for concurrency control, and a two-layer prompt rewrite system to refine requests before they reach the model.

Who it’s for

Security researchers and red-teamers who use Codex to automate complex, multi-step security testing and vulnerability research that requires strict verification and persistence.

Highlights

  • Durable Execution: Uses SQLite and independent run IDs to support recovery and batch autonomy.
  • Evidence-Driven Completion: Requires semantically verified results and reproduction proof to satisfy the terminal judge.
  • MCP Tool Integration: Discovers and collaborates with tools via stdio or Streamable HTTP MCP.
  • Opt-in Activation: Maintains a default "normal" mode, requiring explicit commands to enter red-team operations.
  • Prompt Rewrite Proxy: Optional loopback proxy for pre-model request rewriting to improve technical fidelity.

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch