Canari Forensics detects breaches in LLM logs through prompt injection and credential leakage. This tool runs locally, ensuring data privacy, and completes scans in under a minute without false positives. The precise pattern matching capabilities make it an essential addition for teams managing sensitive conversations.
Canari Forensics provides a robust solution for auditing LLM (Large Language Model) application logs, effectively identifying breaches stemming from prompt injection attacks. Such vulnerabilities can allow sensitive internal data to leak unnoticed, often mimicking legitimate API responses, leaving organizations unaware of these incidents until weeks later, if at all.
With Canari Forensics, teams can efficiently scan existing conversation logs to determine if any successful prompt injections or credential leaks have occurred prior to implementing monitoring solutions. The tool utilizes precise pattern matching to ensure accurate results without relying on classifiers, thereby eliminating false positives. Moreover, it operates locally, running in under a minute, ensuring complete data privacy as no information is transmitted outside the user's environment.
Key Features
- Local Demo: Execute the local demo to observe Canari Forensics uncover incidents in sample logs.
./scripts/demo_local_audit.sh

- MLflow / OTEL Integration: For those using MLflow to trace LLM applications, the tool seamlessly integrates with export functionality:
# Export traces from MLflow
mlflow traces export \
--experiment-id YOUR_EXPERIMENT_ID \
--output-dir ./traces/
# Scan with Canari Forensics
canari forensics scan \
--source otel \
--provider generic \
--logs ./traces/ \
--out ./forensics-scan.json
- Comprehensive Reporting: Generate detailed audit reports for enterprise review:
canari forensics report \
--scan-report ./forensics-scan.json \
--client "Acme Corp" \
--application "AI Gateway" \
--out-pdf ./audit-report.pdf \
--out-evidence ./canari-evidence.json \
--bp-dir ./tests/attacks
- Staged Audit Workflow: Simplifies auditing processes by initializing a workspace and storing metadata.
canari forensics audit init \
--name "Q1 2026 AI Gateway Audit" \
--source otel \
--provider generic \
--logs ./otel-traces \
--client "Acme Corp" \
--application "AI Gateway"
# Run scan and generate reports using stored metadata
canari forensics audit scan --audit-id q1-2026-ai-gateway-audit
canari forensics audit report --audit-id q1-2026-ai-gateway-audit
- Custom Pattern Packs: Tailor auditing capabilities by specifying custom patterns:
canari forensics report \
--scan-report ./forensics-scan.json \
--client "Acme Corp" \
--application "AI Gateway" \
--out-pdf ./audit-report.pdf \
--out-evidence ./canari-evidence.json \
--bp-dir ./tests/attacks \
--patterns-file ./custom_patterns.json
-
The JSON structure should be either
{"patterns": [...]}or a top-level array where each pattern is defined with attributes such aspattern_id,name,severity,confidence,kind, andregex. -
Real-Time OTLP Receiver: Set up a real-time receiver for continuous monitoring:
canari forensics receive \
--host 0.0.0.0 \
--port 4318 \
--db ./canari-forensics.db
Output Results:
- Scan JSON with normalized conversation turns
- Evidence JSON detailing findings and metadata
- PDF audit reports for executive overviews
- Snapshots for BreakPoint CI workflows (.bp.json)
Related Tools
- BreakPoint: A tool to catch regressions before deployment.
- Canari: For real-time attack detection.
- Canari Forensics: This repository for auditing past log breaches.
For those prioritizing security in LLM applications, Canari Forensics is an essential tool for proactive risk management, ensuring that past vulnerabilities are identified and addressed effectively.
No comments yet.
Sign in to be the first to comment.