While predefined data masking entities (e.g., credit card numbers, SSNs) cover many standard use cases, you may need to define custom rules for domain-specific data or unique patterns. Custom rules give you fine-grained control over exactly which information is masked and how it is replaced.
Custom rules specify either a keyword or regex pattern to match sensitive data. When the plugin encounters a match, it replaces the sensitive text with a placeholder (e.g., [MASKED_SECRET]). This mechanism ensures your logs, debugging outputs, or API responses never contain the actual sensitive values.