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.
./scripts/demo_local_audit.sh

# 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
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
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
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 as pattern_id, name, severity, confidence, kind, and regex.
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:
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.