Medium severityGoSensitive Data ExposureMEDIUM confidence
Log Sensitive Data
A secret or PII/PHI value appears to be written to logs (CWE-532/CWE-359).
Standards mapping
- CWE
- CWE-532: Insertion of Sensitive Information into Log FileCWE-359: Exposure of Private Personal Information to an Unauthorized Actor
- OWASP ASVS
- V7.1.1 (L2)V8.3.4 (L2)
Vulnerable vs. safe
Flagged by this check
log.Printf("authenticating with password %s", password)Passes - the safe pattern
log.Printf("authenticating user id %d", userID)Why it matters & how to fix it
A secret or PII/PHI value appears to be written to logs (CWE-532/CWE-359). Logs are frequently shipped to third parties, retained long-term, and read by many people, so passwords, tokens, and protected health/personal data (SSN, DOB, card number, MRN, diagnosis, etc.) must never be logged. Remove the value, log a non-sensitive identifier instead, or redact/mask it before logging.
References
Rule ID integsec-go-log-sensitive-data - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Sensitive Data ExposureError Stack In Response
- JavaScript / TypeScript - Sensitive Data ExposurePII PHI In Logs
- JavaScript / TypeScript - Sensitive Data ExposureSecret In Logs
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data Client Storage
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data In URL Query
- Python - Sensitive Data ExposureFlask Traceback In Response