Package com.tnsai.quality.redaction
Class RedactionPatterns
java.lang.Object
com.tnsai.quality.redaction.RedactionPatterns
Default catalog of
RedactionPatterns shipped with the
framework (issue #80). Loaded by PatternRedactor.withDefaults().
Patterns aim for high precision over recall — a missed match is an audit finding, but a false positive that scrubs legitimate content (an order ID that looks like a phone number) breaks the agent's behavior. Numeric patterns (credit card, TC Kimlik) therefore include checksum validators to filter out non-genuine matches.
Catalog as constants (not YAML) for the foundation slice; a YAML-loaded pattern catalog is a focused follow-up that doesn't change the SPI shape.
- Since:
- 0.5.0 (issue #80)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternCredit-card pattern with a Luhn-checksum validator to suppress false positives.static final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternstatic final RedactionPatternTurkish national ID number — 11 digits, with the documented checksum.static final RedactionPattern -
Method Summary
Modifier and TypeMethodDescriptionstatic List<RedactionPattern> defaults()The default pattern set.
-
Field Details
-
EMAIL
-
PHONE_E164
-
CREDIT_CARD
Credit-card pattern with a Luhn-checksum validator to suppress false positives. -
US_SSN
-
TC_KIMLIK
Turkish national ID number — 11 digits, with the documented checksum. -
OPENAI_API_KEY
-
ANTHROPIC_API_KEY
-
GITHUB_PAT
-
AWS_ACCESS_KEY
-
JWT
-
IBAN
-
IPV4
-
BEARER_TOKEN
-
SSH_PRIVATE_KEY_BLOCK
-
-
Method Details
-
defaults
The default pattern set. Returns a fresh list each call; consumers may filter / append before constructing theirPatternRedactor.
-