Skip to content

Mask captured credentials in standard log outputs (fixes #5) - #14

Open
KingUdo wants to merge 5 commits into
mainfrom
issue-5-mask-sensitive-logs
Open

KingUdo wants to merge 5 commits into
mainfrom
issue-5-mask-sensitive-logs

Conversation

@KingUdo

@KingUdo KingUdo commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Implemented mask_sensitive_value() in src/monitor.py.
  • Applied password masking to the console/container log message in handle_client():
    masked_pwd = mask_sensitive_value(password)
    logging.info(f"[CAPTURE] {username} / {masked_pwd} from {remote_ip}:{remote_port}")
  • Preserved full credentials in the API payload sent to the central NetWatch backend over HTTPS.
  • Added unit tests for mask_sensitive_value() in src/test_additional.py.
  • Fixes Sensitive credential exposure in plain text stdout logs #5.

Test Results

============================== 22 passed in 3.19s ==============================

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.

Sensitive credential exposure in plain text stdout logs

1 participant