Update docs including guardrails

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
This commit is contained in:
Víctor Mayoral Vilches 2025-08-29 14:01:42 +00:00
parent 89aa15999d
commit 16c7367de2
3 changed files with 28 additions and 5 deletions

View File

@ -1,4 +1,4 @@
CAI focuses on making cybersecurity agent **coordination** and **execution** lightweight, highly controllable, and useful for humans. To do so it builds upon 7 pillars: `Agent`s, `Tools`, `Handoffs`, `Patterns`, `Turns`, `Tracing` and `HITL`.
CAI focuses on making cybersecurity agent **coordination** and **execution** lightweight, highly controllable, and useful for humans. To do so it builds upon 8 pillars: `Agent`s, `Tools`, `Handoffs`, `Patterns`, `Turns`, `Tracing`, `Guardrails` and `HITL`.
```
@ -9,12 +9,12 @@ CAI focuses on making cybersecurity agent **coordination** and **execution** lig
┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐
│ Patterns │◀─────▶│ Handoffs │◀────▶ │ Agents │◀────▶│ LLMs │
└───────────┘ └─────┬─────┘ └──────────┘ └───────────┘
└───────────┘ └─────┬─────┘ └──────────┘ └───────────┘
│ │
│ ▼
┌────────────┐ ┌────┴──────┐ ┌───────────┐
│ Extensions │◀─────▶│ Tracing │ │ Tools │
└────────────┘ └───────────┘ └───────────┘
┌────────────┐ ┌────┴──────┐ ┌───────────┐ ┌────────────┐
│ Extensions │◀─────▶│ Tracing │ │ Tools │◀───▶│ Guardrails │
└────────────┘ └───────────┘ └───────────┘ └────────────┘
┌─────────────┬─────┴────┬─────────────┐
▼ ▼ ▼ ▼
@ -124,6 +124,19 @@ During the agentic flow (conversation), we distinguish between **interactions**
> ⚠️ TRACING IS STILL IN PROGRESS
### 🔹 Guardrails
`Guardrails` provide a critical security layer for CAI agents, protecting against prompt injection attacks and preventing execution of dangerous commands. These guardrails run in parallel to agents, validating both input and output to ensure safe operation. The framework includes:
- **Input Guardrails**: Detect and block prompt injection attempts before they reach agents, using pattern matching, Unicode homograph detection, and AI-powered analysis
- **Output Guardrails**: Validate agent outputs before execution, preventing dangerous commands like reverse shells, fork bombs, or data exfiltration
- **Multi-layered Defense**: Protection at input, processing, and execution stages with tool-level validation
- **Base64/Base32 Aware**: Automatically decodes and analyzes encoded payloads to detect hidden malicious commands
- **Configurable**: Can be enabled/disabled via `CAI_GUARDRAILS` environment variable
For detailed implementation and examples, see [Guardrails documentation](guardrails.md) and [Prompt Injection Mitigation](cai_prompt_injection.md).
### 🔹 Human-In-The-Loop (HITL)
```

View File

@ -51,6 +51,7 @@ From here on, type on `CAI` and start your security exercise. Best way to learn
| CAI_AGENT_TYPE | Specify the agents to use (e.g. "boot2root") |
| CAI_PRICE_LIMIT | Price limit for the conversation in dollars |
| CAI_WORKSPACE | Defines the name of the workspace |
| CAI_GUARDRAILS | Enable/disable guardrails for prompt injection protection (default: true) |
## Setting Environment Variables

View File

@ -13,6 +13,15 @@ A lightweight, ergonomic framework for building bug bounty-ready Cybersecurity A
</p>
</div>
## Key Features
- 🤖 **300+ AI Models**: Support for OpenAI, Anthropic, DeepSeek, Ollama, and more
- 🔧 **Built-in Security Tools**: Ready-to-use tools for reconnaissance, exploitation, and privilege escalation
- 🏆 **Battle-tested**: Proven in HackTheBox CTFs, bug bounties, and real-world security case studies
- 🎯 **Agent-based Architecture**: Modular framework design to build specialized agents for different security tasks
- 🛡️ **Guardrails Protection**: Built-in defenses against prompt injection and dangerous command execution
- 📚 **Research-oriented**: Research foundation to democratize cybersecurity AI for the community
| CAI with `alias0` on ROS message injection attacks in MiR-100 robot | CAI with `alias0` on API vulnerability discovery at Mercado Libre |
|-----------------------------------------------|---------------------------------|
| [![asciicast](https://asciinema.org/a/dNv705hZel2Rzrw0cju9HBGPh.svg)](https://asciinema.org/a/dNv705hZel2Rzrw0cju9HBGPh) | [![asciicast](https://asciinema.org/a/9Hc9z1uFcdNjqP3bY5y7wO1Ww.svg)](https://asciinema.org/a/9Hc9z1uFcdNjqP3bY5y7wO1Ww) |