Skip to content

fix: mask credentials in displayed MongoDB commands - #120

Merged
boly38 merged 1 commit into
boly38:mainfrom
cawIgor:fix/119-mask-sensitive-command-logs
Oct 11, 2026
Merged

boly38 merged 1 commit into
boly38:mainfrom
cawIgor:fix/119-mask-sensitive-command-logs

Conversation

@cawIgor

@cawIgor cawIgor commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • sanitize MongoDB credentials in commands printed by showCommand
  • cover URI credentials, --password, and --sslPEMKeyPassword
  • keep the original command unchanged for spawnSync()

Fixes #119

Validation

  • npm run lint
  • npm test -- --grep "sanitize|commandConnectFromOptions"

@boly38
boly38 self-requested a review October 11, 2026 14:33

@boly38 boly38 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 / I ll double check local test asap

@cawIgor
cawIgor force-pushed the fix/119-mask-sensitive-command-logs branch from 450f7d5 to 4020642 Compare October 11, 2026 15:28
@boly38 boly38 added this to the v2.2.13 milestone Oct 11, 2026
@boly38
boly38 merged commit bbc1ca0 into boly38:main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cybersecurity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid exposing MongoDB credentials when showCommand is enabled

2 participants