RedactionResult#
- class scikitplot.cleanprompt.RedactionResult(text, entries, vault, stats, policy_fingerprint, truncated=False, reported=())[source]#
Output of a redaction pass.
- Parameters:
- textstr
The redacted text. Safe to transmit.
- entriestuple of Entry
Ordered record of every value replaced, sorted by first occurrence.
- vaultVault
The label-to-secret mapping needed to restore. Not safe to transmit.
- statsStats
Counters for this pass.
- policy_fingerprintstr
Stable digest of the policy that produced this result. Restoration checks it, so a vault cannot be applied under a different placeholder grammar than the one that created it.
- truncatedbool, default=False
Always
False. Present so that callers can assert the pipeline never truncates; a bound is exceeded by raising, not by dropping content.- reportedtuple of Span, default=()
Values left in
textbecause their kind’s action isreport(Action), in text order. Empty unless a policy asks for it; they are not hidden, and the text is not safe to transmit while this is non-empty.
- Parameters:
See also
scikitplot.cleanprompt._engine.restoreThe inverse operation.
- summary()[source]#
Return a one-line, secret-free description of this pass.
- Returns:
- str
A summary naming counts and categories but never the secrets.
- Return type:
Notes
Developer notes. Upstream printed
"Removed sensitive information: " + ", ".join(mapping.keys()), which echoes every secret to the terminal and therefore into shell history and any captured log. This deliberately names categories and counts only.