Skip to main content
RAPTOR’s unified launcher architecture makes it easy to add new security scanning engines, create custom agents, and extend functionality without changing the core workflow.

Architecture Overview

RAPTOR uses a modular architecture with a unified entry point:

Benefits

Single Entry Point

Users only need python3 raptor.py <mode>

Consistent Interface

All modes follow the same pattern

Easy Discovery

All modes shown in --help

Simple Extension

Add engines without changing user workflow

Adding a New Scanner

Follow these steps to add a custom security scanner:

Step 1: Create Package Structure

Create a new package in packages/ with your scanner implementation:

Step 2: Implement CLI Interface

Create agent.py with a standard argparse CLI:
Follow existing scanners in packages/ for more examples.

Step 3: Add Mode Handler

Open raptor.py and add a new mode handler function:

Step 4: Register Your Mode

In the main() function of raptor.py, add your mode to mode_handlers:

Step 5: Update Help Text

Update the help epilog in main() to include your new mode:

Step 6: Test Integration

Complete Example: Dependency Scanner

Here’s a full example of adding a dependency vulnerability scanner:

Create packages/dependency-scan/agent.py

Add to raptor.py

Usage

Creating Custom Agents

RAPTOR supports specialized agents for complex workflows:

Agent Structure

Example: API Security Agent

Developing Skills

Skills are reusable expertise modules that can be loaded on-demand.
Skill functionality is currently in alpha. Definition creation works, but auto-loading and execution integration are not yet fully implemented.

Skill Structure

Example: API Authentication Skill

Secure JWT Implementation

Decision Framework

INSECURE if ANY:
  • No authentication required
  • Weak token generation (predictable)
  • No expiration (tokens valid forever)
  • No signature verification
  • Transmitted over HTTP
SECURE if ALL:
  • Strong token generation (crypto random)
  • Short expiration (< 24 hours)
  • Proper signature verification
  • HTTPS only
  • Token validation on every request
User: /create-skill Claude: What successful approach should we save? User: When testing APIs, I always check authentication endpoints first, then rate limiting, then input validation. This finds critical issues faster. Claude: [Extracts patterns] [Validates token budget] Skill: api_security_prioritization Triggers: API, endpoint, REST Size: 380 tokens Create? [Y/n] User: Y Claude: ✓ Saved to: tiers/specialists/custom/api_security_prioritization.md

Using Core Utilities

Output Conventions

1

Save to RAPTOR output directory

2

Use structured formats

JSON, SARIF, or other machine-readable formats
3

Include timestamps

4

Log to audit trail

Testing Your Extension

Unit Tests

Create tests in test/:

Integration Tests

Verify Output Format

Contributing

When contributing new scanners or features:

Pull Request Checklist

  • Scanner implementation in packages/your-scanner/
  • Mode handler in raptor.py
  • Updated help text in raptor.py
  • Documentation in docs/ (if complex)
  • Example usage in README.md
  • Tests in test/ (if applicable)
  • Dependencies listed in requirements.txt
  • Error handling implemented
  • Output follows conventions
  • Logging uses get_logger()

Documentation Requirements

README Section

Add usage example to main README.md

Help Text

Clear description in raptor.py --help

Docstrings

Document all public functions

Examples

Provide real-world usage examples

Code Review Guidelines

  1. Consistent style: Follow existing code patterns
  2. Error handling: Handle edge cases gracefully
  3. Documentation: Clear docstrings and comments
  4. Testing: Include basic tests
  5. Dependencies: Minimize external dependencies

Getting Help

Existing Scanners

Check packages/ for examples

Architecture Docs

Review docs/ARCHITECTURE.md

GitHub Issues

Ask questions on GitHub

raptor.py Source

Study the routing pattern

Summary

Adding new capabilities to RAPTOR:
  1. Create packages/my-scanner/agent.py
  2. Add mode_my_scanner() function to raptor.py
  3. Register in mode_handlers dictionary
  4. Update help text
  5. Test integration
The unified launcher makes it easy to expand RAPTOR’s capabilities while maintaining a consistent user experience.

Next Steps

Python CLI

Learn command-line usage patterns

Creating Personas

Develop custom expert personas

API Reference

Core API documentation

Configuration

Configuration options