[REDACTED] before RootSign hashes and stores the call, so the raw value never reaches the session file, the database or an evidence bundle, and it cannot be recovered from the stored hashes. The chain still verifies, because it is built from the redacted values.
Redact a tool’s inputs and outputs
1
Pick a config
StandardPIIConfig covers email, phone, US Social Security, credit card and UK National Insurance numbers. Pre-built configs lists the others.2
Pass it where you instrument
Every instrumentation entry point takes
redaction_config=:support.py
3
Check what was stored
Run it and look at the two action records in the session file:The
lookup_customer
email_customer
email and phone fields were redacted wherever they appeared, including the email passed positionally. The second tool’s result still contains the address. The next section explains why.How matching works
A value is redacted when its field name has a rule and the value matches that rule’s pattern. Field names are matched wherever they are nested:Redaction of positional arguments by parameter name was added after RootSign 0.3.1. In 0.3.1 and earlier,
email_customer("alice@example.com", ...) stored the address unredacted; only the keyword form was redacted.- Numbers are matched by their text form, so an account number stored as a JSON number is redacted like a string.
- Lists are walked item by item, and each item is matched under the list’s field name.
- Past five levels of nesting, the whole value is replaced with
[REDACTED]rather than stored unchecked.
Pre-built configs
The patterns are deliberately broad: they accept some false positives to avoid false negatives. Each field name has one pattern, for example
ssn matches nine digits with optional separators and iban matches the international bank account format. The full patterns are in rootsign/sdk/redaction.py.
Add your own rules
All three pre-built configs takeextra_rules, a dictionary of field name to regular expression, added to the built-in rules:
extra_rules on FinancialPIIConfig and HealthcarePIIConfig was added after RootSign 0.3.1. In 0.3.1 and earlier, only StandardPIIConfig accepts it.RedactionConfig with only your rules:
For a function traced with
@rootsign.trace, a path starts at the top of what RootSign records for the call: kwargs.<parameter> for an argument (a positional argument is matched at the same path) and result for the return value, so result.email matches an email field in a returned dictionary. LangGraph tools, CrewAI tools and the MCP proxy record inputs in other shapes, shown on each integration page, so prefer bare names there.
When a path rule and a name rule both match a field, the path rule wins. Pass match_mode="path" to treat bare names as paths too, so that "email" no longer matches nested fields.
What gets recorded
-
The redacted value is the literal string
[REDACTED]. -
input_hashandoutput_hashare hashes of the redacted payload, so the original value cannot be recovered from them, and the chain verifies asVALID. -
An evidence bundle lists every redacted field in
redaction.json. For the example above:redaction.json
What it does not do
- It does not scan free text, as described above.
- It does not record which config was used. A bundle shows which fields were redacted, not which rule caused it.
- It cannot redact retroactively. Records written before you added a config keep their original values. To withhold stored content from a bundle you are about to share, use
--redact-previewswhen you export. - It applies to tool calls. The session
objectiveyou pass torootsign.session()is stored as written.
Related
How it works
What each hash covers and how redaction fits before hashing.
Export an evidence bundle
Read redaction.json and withhold content when you share a bundle.