Changelog - 2026-11-06
Redaction covers more credential names and the credentials inside string values
Security EnhancementIn one line. The logger and the error handler mask more secret-looking keys, and they now look inside string values: the password of a connection url, a bearer token and credential query parameters no longer reach a log line under a harmless key.
What changed
- More names.
secretAccessKey,signingKey,encryptionKey,masterKey,hmacKey,accountKey,storageKey,licenseKey,jwt,sessionId,sid,signature,sig,otp,totp,cvv,cvc,cardNumber,ssn,nationalId,passwd,pwd,passcode,redisUrl,mongoUri,authorization_code, thex-amz-*signature and token headers, and the kebab spellingsid-token,refresh-token,client-secret,private-keyare masked. An explicit list:primaryKey,cacheKey,codeandpinstay visible. - Inside strings.
scheme://user:password@host,Bearer .../Basic ...and?access_token=...style parameters are scrubbed wherever they sit in a string, a thrownErrormessage and stack included. Text without them is unchanged. WithAPP_ENV_LOGGER_DO_REDACT=falseand noforce, nothing is scrubbed, as before. - String log arguments. A string passed to the logger (
logger.info('connecting to %s', url)) is scrubbed the same way. The scrub is linear in the length of the string. A url whose userinfo has no password (https://<token>@host), a#fragmentor, password=...list entry, andkey=/auth=parameters are covered. Free text is best effort: a credential inside a JSON document held in a string, or in aCookie:value, is not recognised. - The request log. The OAuth callback parameters
codeandstateare masked in the logged query string.
Who is affected
- Anyone reading logs for those values while debugging. They read
[REDACTED]now; setAPP_ENV_LOGGER_DO_REDACT=falselocally to see them. - Everyone else. No action needed.
Details
| File | Package |
|---|---|
src/common/redact.ts | helpers |
src/base/middlewares/request-spy/request-spy.middleware.ts | core-server |