personal-data
Personal data or secrets in a message.
Default severity: warning
What it checks
Messages ship to every user, so they must not contain real email addresses, phone numbers, IBANs, card numbers, API keys or IP addresses. Data in the source is a warning; data a translation adds that the source does not have is an error, since it usually comes from a translator's or model's memory. Reserved example domains (example.com, .test) are ignored; use the `allow` option for intended contacts.
Example
An email address that the translation added. Config used for both runs:
{
"sourceLocale": "en",
"files": [
{
"format": "next-intl-json",
"path": "messages/{locale}.json"
}
]
}Fails
messages/en.json
{
"help": "Questions? Write to us any time."
}messages/fr.json
{
"help": "Des questions ? Écrivez à flagged by personal-data: marie.dupont@gmail.com."
}Gate output
helpemail address introduced by translation: marie.dupont@gmail.commessages/fr.json:2
Passes
messages/en.json
{
"help": "Questions? Write to us any time."
}messages/fr.json
{
"help": "Des questions ? Écrivez-nous quand vous voulez."
}Gate output
No personal-data finding.
Change its severity
{
"checks": {
"personal-data": "error"
}
}Use "off" to disable it. To hide one finding, add "suppress": ["personal-data:help"]; a suppress rule that stops matching is reported so it can be removed.