What Are Custom Rules?
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.
Example: Custom Regex & Keyword
Below is a minimal configuration snippet showing two custom rules:- A regex rule to mask any standalone 6-digit code with
[MASKED_PIN]
. - A keyword rule to identify the string
internal-secret
and replace it with[MASKED_SECRET]
.