-
Notifications
You must be signed in to change notification settings - Fork 1
Home
data_redactor is a Ruby gem that redacts secrets and PII from strings, hashes,
and JSON at C speed — 89 built-in patterns across 9 tags, custom patterns, name
patterns, and drop-in integrations for Logger, Rails, Rack, and the major LLM
clients.
This wiki holds the deep material. The README stays the focused entry point (install, quick start, the public API); the wiki is where the full catalogue, engine internals, and cookbooks live. The generated API reference is on GitHub Pages — this wiki does not duplicate it.
⭐ Redact before it reaches the model — RubyLLM Integration
If you use RubyLLM, data_redactor scrubs secrets and PII out of
every prompt, system instruction, and tool result before it leaves your
process — either per-call, or transparently across every request with one line
at boot. This is the integration to reach for first when you're sending free
text to an LLM. → RubyLLM Integration
-
RubyLLM Integration ⭐ — per-call redaction and
install!transparent mode for RubyLLM, with caveats. - Pattern Catalogue — all 89 patterns, grouped by tag and country, with examples and boundary-protection notes.
- C Engine Internals — NFA → bytecode → lazy DFA, the v19 story, and how a scan actually runs. Links the full research log.
- Integration Guides — Logger, Rails, Rack, and the Claude/OpenAI LLM helpers. (RubyLLM has its own page above.)
-
Custom Patterns & Name Patterns — the
cookbook for
add_patternandname_pattern. - Performance & Benchmark Methodology — how the numbers are measured and what they mean.
- FAQ — thread-safety, what's not redacted, the base64/URL limitation, and other common questions.
| Topic | Canonical source |
|---|---|
| Release history, per-version diffs | CHANGELOG.md |
| Why decisions were made (research narrative) | DONE.md · research log |
| Open work | TODO.md |
| Public method signatures, params, return values | YARD docs on GitHub Pages |
| Install the gem | rubygems.org/gems/data_redactor |
This wiki links back to those rather than restating them — if a number or a signature here ever disagrees with the source, the source wins.
Guides
Reference
Elsewhere