Overview
RAXE allows you to create custom detection rules to catch threats specific to your application.Rule Location
Custom rules go in~/.raxe/rules/:
Rule Format
Required Fields
| Field | Type | Description |
|---|---|---|
rule_id | string | Unique ID (e.g., custom-001) |
version | string | Semantic version |
family | string | PI, JB, PII, CMD, ENC, HC, RAG |
name | string | Human-readable name |
severity | string | CRITICAL, HIGH, MEDIUM, LOW |
confidence | float | 0.0 - 1.0 |
patterns | list | Regex patterns to match |
Pattern Syntax
Patterns use Python regex syntax:Validation
Validate your rule before using:Testing Rules
Test against sample prompts:Best Practices
Use specific patterns
Use specific patterns
Avoid overly broad patterns that cause false positives:
Include examples
Include examples
Always include positive and negative examples:
Avoid backtracking
Avoid backtracking
Avoid patterns that can cause exponential backtracking:
Limits
| Tier | Custom Rules |
|---|---|
| Community | 50 |
| Pro | 500 |
| Enterprise | Unlimited |
Contributing Rules
Want to share your rules with the community?- Fork raxe-ai/raxe-ce
- Add rule to
src/raxe/packs/core/v1.0.0/rules/{family}/ - Submit a pull request
