Skip to content

Commit cfa20e1

Browse files
committed
feat: Prepare v0.2.0 for release
This commit consolidates all final features and polishes for the v0.2.0 release. - Bumps version to 0.2.0 in pyproject.toml and README. - Adds a 'Quick Example' and 'Status' section to README.md. - Refines warning messages and documentation for clarity. - Adds a badge block for PyPI, Python versions, and License.
1 parent 6242dff commit cfa20e1

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@ A privacy-aware linter for Python projects, designed to catch accidental leaks o
88

99
`privlog` is built to be a developer's first line of defense, integrating directly into your local workflow and CI/CD pipelines to enforce logging hygiene.
1010

11+
## Why Privlog?
12+
13+
Accidentally logging sensitive data is a common source of security and privacy issues in production systems. Tokens, user identifiers, request bodies, and other sensitive values often end up in logs during development and debugging.
14+
15+
Privlog helps detect these risks early by scanning Python code for logging patterns that may expose sensitive data.
16+
17+
## Quick Example
18+
19+
Given a file `app/auth.py`:
20+
```python
21+
import logging
22+
23+
def reauthenticate_user(user_email):
24+
# ...
25+
logging.info(f"Initiating re-authentication for {user_email}")
26+
# ...
27+
```
28+
29+
Running `privlog .` will produce the following error:
30+
31+
```
32+
app/auth.py:5:5 [ERROR] PL2101 Sensitive identifier passed to log. Hash/pseudonymize or omit.
33+
```
34+
1135
## Features
1236

1337
- **High-Precision AST Analysis**: Goes beyond simple regex to parse Python code, understanding variable names inside f-strings, `.format()` calls, and more.
@@ -92,6 +116,13 @@ log_event = { details = "WARNING" }
92116

93117
---
94118

119+
## Status
120+
121+
Privlog is currently in early development (v0.2.0).
122+
Feedback and contributions are welcome.
123+
124+
---
125+
95126
## For Developers
96127

97128
To set up a development environment to contribute to `privlog`:

privlog/ast_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def visit_Call(self, node: ast.Call) -> None:
188188
if is_log:
189189
for keyword in node.keywords:
190190
if keyword.arg == 'extra':
191-
self._add_finding(node, "PL2201", "Logging with 'extra' can hide sensitive data. Review manually.", "WARNING")
191+
self._add_finding(node, "PL2201", "Logging with 'extra' parameter may leak sensitive data. Please review manually.", "WARNING")
192192
break
193193

194194
# Check 3: Custom wrapper checks

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "privlog"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
description = "Privacy-aware logging hygiene linter for Python"
99
readme = "README.md"
1010
requires-python = ">=3.9"

0 commit comments

Comments
 (0)