Skip to main content

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

Pattern Syntax

Patterns use Python regex syntax:

Validation

Validate your rule before using:
Output:

Testing Rules

Test against sample prompts:

Best Practices

Avoid overly broad patterns that cause false positives:
Always include positive and negative examples:
Avoid patterns that can cause exponential backtracking:

Limits

Contributing Rules

Want to share your rules with the community?
  1. Fork raxe-ai/raxe-ce
  2. Add rule to src/raxe/packs/core/v1.0.0/rules/{family}/
  3. Submit a pull request
See CONTRIBUTING.md for guidelines.