From 7050a2e0014db3fc4076901ea43a902ab0e2db31 Mon Sep 17 00:00:00 2001 From: SK Akram Date: Sat, 14 Feb 2026 10:13:43 +0000 Subject: [PATCH] fix: make sensitive field whitelist case-insensitive --- src/config/schema.hints.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/schema.hints.ts b/src/config/schema.hints.ts index a39500ae582..10db8a1da3d 100644 --- a/src/config/schema.hints.ts +++ b/src/config/schema.hints.ts @@ -107,8 +107,9 @@ const SENSITIVE_KEY_WHITELIST = new Set([ const SENSITIVE_PATTERNS = [/token$/i, /password/i, /secret/i, /api.?key/i]; export function isSensitiveConfigPath(path: string): boolean { + const lowerPath = path.toLowerCase(); return ( - !Array.from(SENSITIVE_KEY_WHITELIST).some((suffix) => path.endsWith(suffix)) && + !Array.from(SENSITIVE_KEY_WHITELIST).some((suffix) => lowerPath.endsWith(suffix)) && SENSITIVE_PATTERNS.some((pattern) => pattern.test(path)) ); }