Package com.tnsai.redaction
package com.tnsai.redaction
The one masking place shared by every module that writes paths or file content into logs,
evidence or prompts.
Masker— a text-to-text operator.Masker.noOp()is the default and changes nothing;Masker.hidingOutside(java.nio.file.Path)is the opt-in masker that hides absolute paths outside a root and well-known credential shapes.PathRedactor— aMaskerthat replaces given folders with given names, for example a run folder with<run>.CredentialPatterns— the one definition of the credential shapes, also used by the default catalog oftnsai-quality's redactors.OncePerPathWarner— logs one WARN per path per instance, with the path passed through aMasker.
Masking is off unless a caller opts in. The context-aware redactors of tnsai-quality
(com.tnsai.quality.redaction) stay there, since they report findings per sink and tenant;
their credential patterns come from CredentialPatterns.
- Since:
- 0.18.6
-
ClassDescriptionThe one definition of the well-known credential shapes, shared by
Masker.hidingOutside(java.nio.file.Path)and the default catalog oftnsai-quality'sPatternRedactor.Masks sensitive parts of a text before it is written to a log, to evidence or to a prompt.Logs at most one WARN per path, for problems that would otherwise repeat on every pass, such as a file a retriever cannot read.Hides folders in a text by replacing each with the name the caller gives it, for example a run folder with<run>and the user's home folder with~.