Skip to content

fix: security hardening — credential masking, file permissions, config wiring#2

Merged
lazy-dinosaur merged 1 commit intolazy-dinosaur:masterfrom
livingproofdev25:master
Mar 19, 2026
Merged

fix: security hardening — credential masking, file permissions, config wiring#2
lazy-dinosaur merged 1 commit intolazy-dinosaur:masterfrom
livingproofdev25:master

Conversation

@livingproofdev25
Copy link
Copy Markdown

@livingproofdev25 livingproofdev25 commented Feb 22, 2026

Summary

  • Mask credentials in all log outputJSON.stringify(account) was leaking apiKey, secret, password, and privateKey to stderr. Added maskCredentials() helper that redacts sensitive fields before logging.
  • Validate config file permissions — Warns at startup if the config file containing API keys is world-readable (recommends chmod 600).
  • Wire through all account config optionspassword, uid, privateKey, walletAddress, enableRateLimit, timeout, proxy, and account.options are now passed to the CCXT constructor. Previously only apiKey, secret, and defaultType were used.
  • Restore error logging for exchange creation failures — Uncommented the catch block but sanitized output to log only error.message, not the raw error object.

Test plan

  • Verify npx tsc --noEmit passes
  • Verify config with missing fields logs redacted output (no real keys visible)
  • Verify file permission warning appears for world-readable config
  • Verify exchanges with password/uid fields now connect correctly

[XaX] https://XautomateX.com

…ons, config wiring

- Add maskCredentials() utility to redact API keys/secrets from log output
- Replace JSON.stringify(account) with maskCredentials(account) in validation warnings
- Restore error logging on CCXT init failure with safe error.message extraction
- Add config file permission check — warns if world-readable (recommends chmod 600)
- Wire through all AccountConfig options (password, uid, privateKey, walletAddress,
  enableRateLimit, timeout, proxy, exchange-specific options) to CCXT instances

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@lazy-dinosaur lazy-dinosaur merged commit d3395d3 into lazy-dinosaur:master Mar 19, 2026
2 checks passed
@lazy-dinosaur
Copy link
Copy Markdown
Owner

Thank you for PR!!

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