Skip to content

LightGuard-Agent v0.4.0: Enterprise RAG Shield, DLP PII Redaction & Prometheus Telemetry

Choose a tag to compare

@seotarek seotarek released this 20 Oct 23:34
· 22 commits to main since this release

What's New in v0.4.0 馃殌

1. 馃摎 RAG Context Poisoning Shield (lightguard.rag)

  • Chunk Sanitization: Inspects retrieved text chunks for indirect prompt injection directives.
  • XML Context Fencing: Encapsulates retrieved knowledge in tamper-evident boundaries.
  • Poisoned Chunk Dropping: Automatically drops poisoned documents before LLM context construction.
  • Retriever Proxy: Drop-in wrapping for LangChain and LlamaIndex retrievers (shield.protect_retriever(retriever)).

2. 馃敀 Zero-Dependency DLP & PII Redaction (lightguard.privacy)

  • Financial Validation: Luhn checksum validation for Visa, MasterCard, Amex, Discover.
  • Secrets Scanning: Auto-redacts OpenAI keys (sk-...), Anthropic keys, AWS Access Keys, GitHub tokens.
  • Contact & PII: Redacts emails, phone numbers, SSNs, and IPv4 addresses.
  • Reversible Anonymization: Restore original sensitive entities before executing secure local database operations.

3. 鈿欙笍 Enterprise Security Policy Profiles (lightguard.policy)

  • Out-of-the-box security postures: STRICT, BALANCED, and PERMISSIVE.
  • Granular per-tool permissions and custom high-stakes registries.

4. 馃搱 Prometheus Telemetry & Observability (lightguard.telemetry)

  • Real-time thread-safe telemetry collector.
  • Exposes standard Prometheus text metrics (export_prometheus()) with rolling latency percentiles (P95, mean).

5. 馃捇 CLI Subcommand Expansion

  • lightguard redact <text>
  • lightguard rag-scan <chunk>
  • lightguard metrics

馃搳 Verification & Tests

  • 60/60 unit tests passing (0.50s)
  • 100% defense rate against 26 red-team attack vectors
  • Zero external runtime dependencies
  • Published to PyPI: pip install lightguard-agent==0.4.0