Skip to content

DatabaseConfig __repr__ leaks partial password material #4019

@Mo33n

Description

@Mo33n

Confirmation

  • I’ve re-read the relevant sections of the documentation.
  • I’ve searched existing issues and discussions to avoid duplicates.
  • I’ve reviewed or skimmed the source code (or examples) to confirm the behavior is not by design.
  • I’ve tested this issue using a recent development wheel and can still reproduce it.

Expected Behavior

Secret fields in repr output should be fully redacted.

Actual Behavior

DatabaseConfig repr exposes first/last characters of password and full short passwords.

Steps to Reproduce the Problem

  1. Create DatabaseConfig(password="SuperSecret123") and print/repr it.
  2. Observe partial leak (e.g., Su...23).
  3. Repeat with short password and observe full leak.

Code Snippets or Logs

File: nautilus_trader/common/config.py
Method: DatabaseConfig.repr

Specifications

  • OS platform: macOS (darwin 24.6.0)
  • Python version: 3.12
  • nautilus_trader version: source checkout (develop)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions