Skip to content

Conversation

@rishikeshdadam136
Copy link

Ticket: WP-7503
Prevent sensitive data exposure in console logs

Implements automatic sanitization of console output to prevent sensitive data from being logged in plain text. Intercepts all console methods (log, error, warn, etc.) and removes fields containing sensitive keywords before logging. Resolves issue where sensitive fields like tokens, passwords, private keys, and client credentials were exposed in plain text.

Changes:

  • Added recursive sanitization with 18 sensitive keywords (token, bearer, privatekey, password, secret, client, oauth, mnemonic, seed, signature, otp, apikey, etc.)
  • Intercepts 9 console methods (log, error, warn, info, debug, dir, table, trace, assert)
  • Initialized console override in both entry points (bin/bitgo-express, src/expressApp.ts)

Ticket:WP-7503
Prevent sensitive data exposure in console logs

Implements automatic sanitization of console output to prevent sensitive
data from being logged in plain text. Intercepts all console methods
(log, error, warn, etc.) and removes fields containing sensitive keywords
before logging. Resolves issue where sensitive fields like tokens, passwords,
private keys, and client credentials were exposed in plain text.

Changes:
- Added recursive sanitization with 18 sensitive keywords (token, bearer, privatekey, password, secret, client, oauth, mnemonic, seed, signature, otp, apikey, etc.)
- Intercepts 9 console methods (log, error, warn, info, debug, dir, table, trace, assert)
- Initialized console override in both entry points (bin/bitgo-express, src/expressApp.ts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants