Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: fixed redacted to have bracket notation

=a3be17686ad6
diff --git a/backend/src/lib/logger/logger.ts b/backend/src/lib/logger/logger.ts
index 0675e2769a..bf041cc314 100644
--- a/backend/src/lib/logger/logger.ts
+++ b/backend/src/lib/logger/logger.ts
@@ -181,7 +181,14 @@ export const initLogger = () => {
})
},
// redact until depth of three
- redact: [...redactedKeys, ...redactedKeys.map((key) => `*.${key}`), ...redactedKeys.map((key) => `*.*.${key}`)]
+ // Keys with special characters (hyphens) need bracket notation for fast-redact
+ redact: redactedKeys.flatMap((key) => {
+ if (key.includes("-")) {
+ const k = `["${key}"]`;
+ return [k, `*${k}`, `*.*${k}`];
+ }
+ return [key, `*.${key}`, `*.*.${key}`];
+ })
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
transport