Skip to main content

prism_guardrails 0.1.0 copy "prism_guardrails: ^0.1.0" to clipboard
prism_guardrails: ^0.1.0 copied to clipboard

The AI safety layer for the Prism ecosystem. Detect prompt injection, redact PII, catch leaked API keys, validate structured output and enforce token budgets — provider-agnostic, pure Dart, zero dependencies.

Changelog #

0.1.0 #

Initial release.

  • GuardPipeline with inspectInput / inspectOutput and a capped AuditLog
  • PromptInjectionRule: instruction overrides, role hijacking, fake chat control tokens, system-prompt exfiltration phrasing
  • PiiRedactionRule: emails, phones, Luhn-validated credit cards, public IPv4 with private-range awareness, SSN-shaped IDs, IBANs, custom patterns
  • SecretDetectorRule: OpenAI/GitHub/AWS/Slack/Google/Stripe credential shapes, bearer tokens, JWTs, PEM private keys, credential assignments
  • UnicodeSafetyRule: zero-width/bidi/tag-character stripping, homoglyph detection
  • ProfanityRule: whole-word blocklist with masking
  • UrlFilterRule: allow/deny host lists and scheme enforcement
  • SchemaRule: JSON schema-lite validation tolerant of fenced and prose-wrapped model output
  • TokenBudgetRule: per-request and rolling-window token budgets
0
likes
140
points
207
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

The AI safety layer for the Prism ecosystem. Detect prompt injection, redact PII, catch leaked API keys, validate structured output and enforce token budgets — provider-agnostic, pure Dart, zero dependencies.

Repository (GitHub)
View/report issues

Topics

#ai #safety #llm #security #validation

License

MIT (license)

More

Packages that depend on prism_guardrails