scan: the email detector skips server / config identities (a service account or OIDC email of a Pub/Sub push, SMTP / sender / admin addresses, values from the environment); a game's rtdn: { audience; email; token } in apps/server/src/config.ts was flagged as App Privacy Email Address

This commit is contained in:
CRTkafa 2026-10-15 22:49:35 +08:00
parent ead5da4ab3
commit 9171cb1129
2 changed files with 13 additions and 2 deletions

View file

@ -389,7 +389,10 @@ describe('monorepo: username accounts without email, plugins in apps/native/node
'const RE = /^[^\\s@]+@[^\\s@]+$/', "fetch('/api/auth/forgot-password')", 'auth.createUserWithEmailAndPassword(a, b)', 'Auth.auth().createUser(withEmail: e, password: p)',
'keyboardType="email-address"', 'request.requestedScopes = [.fullName, .email]'];
const no = ["const ROUTES = { register: '/register', usernameCheck: '/username/check' }", "contactEmail: 'support@example.com'", "email: 'privacy@example.com'",
"labels = { email: 'E-mail' }", 'register(username)', "fetch('/api/v1/session')"];
"labels = { email: 'E-mail' }", 'register(username)', "fetch('/api/v1/session')",
// server / config identities, not user data (a game apps/server/src/config.ts)
' rtdn: { audience: string | null; email: string | null; token: string | null };', ' email: process.env.RTDN_EMAIL ?? null,',
' pubsub: { email: cfg.serviceAccount },', ' smtp: { host, email: env.SMTP_USER },'];
for (const s of yes) expect({ s, hit: SIGNALS.email.test(s) }).toEqual({ s, hit: true });
for (const s of no) expect({ s, hit: SIGNALS.email.test(s) }).toEqual({ s, hit: false });
});