PL
Privlog
A Python CLI that detects sensitive data in logs before it reaches production.
Install
pip install privlog
Run
privlog .
What it checks
- Sensitive identifiers passed into logging calls
- Risky
print()statements - Custom logging wrappers configured through
pyproject.toml - Common logging patterns that may expose sensitive data
Example
app.py:12:9 [ERROR] PL2101 Sensitive identifier passed to log. Hash/pseudonymize or omit.
CI/CD Integration
Privlog exits with a non-zero status code when high-confidence
ERROR findings are detected, allowing CI/CD pipelines
to fail fast when sensitive logging patterns appear.
Why it exists
Logs are useful for operators and developers, but sensitive data often gets logged during debugging and accidentally survives into production workflows. Privlog helps catch those patterns early.