Skip to content

Conversation

@rishikeshdadam136
Copy link

Adds automatic console log sanitization in test/staging environments to prevent token exposure for all BitGoJS SDK users. Sanitizes 6 sensitive keys (token, bearer, prv, privatekey, password, otp) and v2x bearer tokens before logging.

Technical changes:

  • Created sanitizeLog.ts with recursive sanitization logic
  • Created consoleOverride.ts to intercept console.log/error/warn/info
  • Imported in sdk-core/src/index.ts for full SDK coverage

Ticket: WP-7503

Adds automatic console log sanitization in test/staging environments to prevent
token exposure for all BitGoJS SDK users. Sanitizes 6 sensitive keys (token,
bearer, prv, privatekey, password, otp) and v2x bearer tokens before logging.

Technical changes:
- Created sanitizeLog.ts with recursive sanitization logic
- Created consoleOverride.ts to intercept console.log/error/warn/info
- Imported in sdk-core/src/index.ts for full SDK coverage

Ticket: WP-7503
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.

3 participants