| Crates.io | iron_safety |
| lib.rs | iron_safety |
| version | 0.3.0 |
| created_at | 2025-11-29 14:03:59.690025+00 |
| updated_at | 2025-12-16 18:04:28.86279+00 |
| description | Content safety and moderation for AI agents |
| homepage | |
| repository | https://github.com/.../iron_runtime |
| max_upload_size | |
| id | 1956799 |
| size | 22,818 |
PII detection and output validation for multi-agent systems.
[dependencies]
iron_cage_safety = { version = "0.1", features = ["full"] }
enabled (default): Core PII detection without audit logging
full: All functionality including audit trail
audit: SQLite-based audit logging
use iron_cage_safety::PiiDetector;
// Initialize PII detector with default patterns
let detector = PiiDetector::new()?;
// Check for PII in agent output
let text = "Contact me at john@example.com";
if detector.check(text) {
// Redact PII before displaying
let safe = detector.redact(text);
println!("Safe output: {}", safe);
// Output: "Safe output: Contact me at [EMAIL_REDACTED]"
}
Responsibilities:
Detects and redacts PII (emails, phones, SSNs, credit cards) from AI agent outputs with configurable safety policies and optional SQLite-based audit logging. Provides real-time validation preventing data breaches before agent responses reach users. Requires Rust 1.75+, all platforms supported, optional SQLite audit trail with audit feature.
In Scope:
audit feature)Out of Scope:
| File | Responsibility |
|---|---|
| lib.rs | PII detection and output sanitization |
Notes:
MIT