laminae-shadow
Adversarial red-teaming engine that automatically audits AI output for security vulnerabilities. Runs as an async post-processing pipeline - never blocks the conversation.
Part of the Laminae SDK.
Pipeline Stages
- Static analysis - Pattern scanning for 25+ vulnerability categories across multiple analyzers
- LLM adversarial review - Local Ollama model with an attacker-mindset prompt
- Sandbox execution - Ephemeral container testing (optional)
Built-in Analyzers
| Analyzer | What It Catches |
|---|---|
StaticAnalyzer |
SQL injection, XSS, eval/exec, path traversal, weak crypto, infinite loops, insecure deserialization |
SecretsAnalyzer |
GitHub tokens, Stripe keys, AWS keys, Slack tokens, JWTs, DB connection strings, API keys (10 patterns) |
DependencyAnalyzer |
Pipe-to-shell installs, insecure package indices, compromised NPM packages, git over HTTP |
LlmReviewer |
Free-form adversarial analysis via local LLM |
Quick Start
use ;
async
Custom Analyzers
Implement the Analyzer trait to add your own analysis stages:
use ;
use ExtractedBlock;
use VulnFinding;
;
Configuration
// ~/.config/laminae/shadow.json
Aggressiveness levels:
- 1 - Static analysis only (no Ollama required)
- 2 - Static + LLM adversarial review
- 3 - Static + LLM + sandbox execution
License
Apache-2.0 - see LICENSE.