Medium severityC#Insecure ConfigurationHIGH confidence
Ef Sensitive Data Logging
Entity Framework Core sensitive-data logging is enabled (EnableSensitiveDataLogging), which writes parameter values - including PII and secrets - into application logs (CWE-532).
Standards mapping
- OWASP ASVS
- V7.1.1 (L2)
Vulnerable vs. safe
Flagged by this check
options.EnableSensitiveDataLogging();Passes - the safe pattern
options.UseSqlServer("Server=db;Integrated Security=true;");Why it matters & how to fix it
Entity Framework Core sensitive-data logging is enabled (EnableSensitiveDataLogging), which writes parameter values - including PII and secrets - into application logs (CWE-532). Remove this call from non-development configuration so query parameters are not persisted to logs.
References
Rule ID integsec.csharp.insecure-config.ef-sensitive-data-logging - 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 - Insecure ConfigurationCORS Acao Wildcard Header
- JavaScript / TypeScript - Insecure ConfigurationCORS Wildcard Origin
- JavaScript / TypeScript - Insecure ConfigurationCORS Wildcard With Credentials
- JavaScript / TypeScript - Insecure ConfigurationCSRF Protection Disabled
- JavaScript / TypeScript - Insecure ConfigurationExpress Trust Proxy All
- JavaScript / TypeScript - Insecure ConfigurationExpress X Powered By Enabled