logguard-cli 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {logguard_cli-0.2.0/logguard_cli.egg-info → logguard_cli-0.3.0}/PKG-INFO +7 -8
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/README.md +5 -5
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/log_guard.py +774 -741
- {logguard_cli-0.2.0 → logguard_cli-0.3.0/logguard_cli.egg-info}/PKG-INFO +7 -8
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/pyproject.toml +58 -59
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/LICENSE +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/logguard_cli.egg-info/SOURCES.txt +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/logguard_cli.egg-info/dependency_links.txt +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/logguard_cli.egg-info/entry_points.txt +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/logguard_cli.egg-info/requires.txt +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/logguard_cli.egg-info/top_level.txt +0 -0
- {logguard_cli-0.2.0 → logguard_cli-0.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: logguard-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A 100% local, offline CLI tool that scans log files and Excel (.xlsx) spreadsheets and masks sensitive data (emails, phone numbers, API keys, IPs, credit cards) before you share them.
|
|
5
5
|
Author: Apurva Raj
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,14 +15,13 @@ Classifier: Intended Audience :: System Administrators
|
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
21
|
Classifier: Topic :: Security
|
|
23
22
|
Classifier: Topic :: System :: Logging
|
|
24
23
|
Classifier: Topic :: Utilities
|
|
25
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.10
|
|
26
25
|
Description-Content-Type: text/markdown
|
|
27
26
|
License-File: LICENSE
|
|
28
27
|
Requires-Dist: openpyxl>=3.1
|
|
@@ -50,7 +49,7 @@ When you're debugging with a teammate, posting to a forum, or filing a support t
|
|
|
50
49
|
|
|
51
50
|
## Features
|
|
52
51
|
|
|
53
|
-
- 🔍 **Detects and masks:** emails, phone numbers, API keys (Stripe/AWS/GitHub formats + a generic long-token fallback), IP addresses, and credit card numbers (Visa/Mastercard/Amex/Discover)
|
|
52
|
+
- 🔍 **Detects and masks:** emails, phone numbers (US-style and Indian mobile numbers), API keys (Stripe/AWS/GitHub formats + a generic long-token fallback), IP addresses, and credit card numbers (Visa/Mastercard/Amex/Discover)
|
|
54
53
|
- 📗 **Excel spreadsheet support** — scans every cell of every sheet in `.xlsx` files (hidden sheets included) and writes a masked copy you can open in Excel
|
|
55
54
|
- 📁 **Scans whole directories**, recursively by default — point it at a `logs/` folder and it finds everything inside, spreadsheets included
|
|
56
55
|
- 🧩 **Custom patterns** via a simple JSON file — add your own detection rules with no code changes (they apply to spreadsheets too)
|
|
@@ -58,7 +57,7 @@ When you're debugging with a teammate, posting to a forum, or filing a support t
|
|
|
58
57
|
- 🚦 **CI / pre-commit mode** (`--check`) — scans without writing files and exits with status code `1` if secrets are found, so it can block a commit or fail a build. Ships with a ready-to-use `.pre-commit-hooks.yaml`
|
|
59
58
|
- 📄 **Non-destructive** — writes a new `*.masked.log` / `*.masked.xlsx` file (or a path you choose with `-o`); your original is never touched, and a clean file with nothing to mask doesn't get a redundant copy
|
|
60
59
|
- 📊 **Summary report** — see exactly how many of each type were found
|
|
61
|
-
- 🧪 **Fully tested** —
|
|
60
|
+
- 🧪 **Fully tested** — 80+ automated tests covering detection, masking, spreadsheets, directory scanning, config parsing, and a wide range of edge cases, run automatically on every push via GitHub Actions across Python 3.10–3.12
|
|
62
61
|
- 💻 **Handles edge cases** — empty files, huge log files (streamed line-by-line), unusual encodings, mixed line endings, corrupt or password-protected spreadsheets, and directories with zero matching files
|
|
63
62
|
- 🚫 **Smart defaults for directories** — automatically skips `.git`, `node_modules`, `venv`, `.venv`, and `__pycache__` while recursing (use `--ext all` to scan every file if you really want to)
|
|
64
63
|
- ⚡ **Zero network calls, ever**
|
|
@@ -73,7 +72,7 @@ That's it — this installs the `log-guard` command. (The package is named `logg
|
|
|
73
72
|
|
|
74
73
|
It also automatically installs two small libraries used for `.xlsx` support: `openpyxl` (reads and writes spreadsheets) and `defusedxml` (protects against maliciously crafted files). Both work fully offline.
|
|
75
74
|
|
|
76
|
-
Requires Python 3.
|
|
75
|
+
Requires Python 3.10 or newer. (If you are still on Python 3.9, pip will install version 0.2.0, which still supports it.)
|
|
77
76
|
|
|
78
77
|
> **Note:** if `log-guard` isn't recognized as a command right after installing, your Python Scripts folder probably isn't on your system PATH. Either add it to PATH, or run the tool with `python -m log_guard` instead — both work identically.
|
|
79
78
|
|
|
@@ -144,7 +143,7 @@ Add `--quiet` for a condensed summary suited to CI logs. To use Log Guard as an
|
|
|
144
143
|
```yaml
|
|
145
144
|
repos:
|
|
146
145
|
- repo: https://github.com/apurvaraj9/log-guard
|
|
147
|
-
rev: v0.
|
|
146
|
+
rev: v0.3.0
|
|
148
147
|
hooks:
|
|
149
148
|
- id: log-guard
|
|
150
149
|
```
|
|
@@ -219,7 +218,7 @@ log-guard/
|
|
|
219
218
|
## Limitations
|
|
220
219
|
|
|
221
220
|
- Detection is regex-based, so like any pattern-matching approach it can occasionally miss unusual formats (false negatives) or flag something that isn't actually sensitive (false positives) — especially the generic long-token API key fallback, which can flag any long run of random-looking characters.
|
|
222
|
-
-
|
|
221
|
+
- Phone detection covers US-style numbers and Indian mobile numbers (with or without `+91`, `91` or `0`, e.g. `+91 98765 43210`). Landline numbers and other countries' formats aren't detected yet.
|
|
223
222
|
- **Supported file types:** plain-text files and `.xlsx` spreadsheets. Old `.xls` files are not supported (re-save them as `.xlsx`), and other binary formats such as PDF or Word documents are not read.
|
|
224
223
|
- **Spreadsheet scanning covers cell values only.** Formulas are deliberately left untouched (masking text inside a formula could break it), and cell comments, headers/footers, sheet names, and text inside charts or images are not scanned.
|
|
225
224
|
- **Masked spreadsheets may lose some extras.** The masked copy keeps every sheet, all cell values, and basic formatting, but charts, images, and some advanced Excel features may not survive — a limitation of the `openpyxl` library used to read and write them. Your original file is never changed.
|
|
@@ -19,7 +19,7 @@ When you're debugging with a teammate, posting to a forum, or filing a support t
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
- 🔍 **Detects and masks:** emails, phone numbers, API keys (Stripe/AWS/GitHub formats + a generic long-token fallback), IP addresses, and credit card numbers (Visa/Mastercard/Amex/Discover)
|
|
22
|
+
- 🔍 **Detects and masks:** emails, phone numbers (US-style and Indian mobile numbers), API keys (Stripe/AWS/GitHub formats + a generic long-token fallback), IP addresses, and credit card numbers (Visa/Mastercard/Amex/Discover)
|
|
23
23
|
- 📗 **Excel spreadsheet support** — scans every cell of every sheet in `.xlsx` files (hidden sheets included) and writes a masked copy you can open in Excel
|
|
24
24
|
- 📁 **Scans whole directories**, recursively by default — point it at a `logs/` folder and it finds everything inside, spreadsheets included
|
|
25
25
|
- 🧩 **Custom patterns** via a simple JSON file — add your own detection rules with no code changes (they apply to spreadsheets too)
|
|
@@ -27,7 +27,7 @@ When you're debugging with a teammate, posting to a forum, or filing a support t
|
|
|
27
27
|
- 🚦 **CI / pre-commit mode** (`--check`) — scans without writing files and exits with status code `1` if secrets are found, so it can block a commit or fail a build. Ships with a ready-to-use `.pre-commit-hooks.yaml`
|
|
28
28
|
- 📄 **Non-destructive** — writes a new `*.masked.log` / `*.masked.xlsx` file (or a path you choose with `-o`); your original is never touched, and a clean file with nothing to mask doesn't get a redundant copy
|
|
29
29
|
- 📊 **Summary report** — see exactly how many of each type were found
|
|
30
|
-
- 🧪 **Fully tested** —
|
|
30
|
+
- 🧪 **Fully tested** — 80+ automated tests covering detection, masking, spreadsheets, directory scanning, config parsing, and a wide range of edge cases, run automatically on every push via GitHub Actions across Python 3.10–3.12
|
|
31
31
|
- 💻 **Handles edge cases** — empty files, huge log files (streamed line-by-line), unusual encodings, mixed line endings, corrupt or password-protected spreadsheets, and directories with zero matching files
|
|
32
32
|
- 🚫 **Smart defaults for directories** — automatically skips `.git`, `node_modules`, `venv`, `.venv`, and `__pycache__` while recursing (use `--ext all` to scan every file if you really want to)
|
|
33
33
|
- ⚡ **Zero network calls, ever**
|
|
@@ -42,7 +42,7 @@ That's it — this installs the `log-guard` command. (The package is named `logg
|
|
|
42
42
|
|
|
43
43
|
It also automatically installs two small libraries used for `.xlsx` support: `openpyxl` (reads and writes spreadsheets) and `defusedxml` (protects against maliciously crafted files). Both work fully offline.
|
|
44
44
|
|
|
45
|
-
Requires Python 3.
|
|
45
|
+
Requires Python 3.10 or newer. (If you are still on Python 3.9, pip will install version 0.2.0, which still supports it.)
|
|
46
46
|
|
|
47
47
|
> **Note:** if `log-guard` isn't recognized as a command right after installing, your Python Scripts folder probably isn't on your system PATH. Either add it to PATH, or run the tool with `python -m log_guard` instead — both work identically.
|
|
48
48
|
|
|
@@ -113,7 +113,7 @@ Add `--quiet` for a condensed summary suited to CI logs. To use Log Guard as an
|
|
|
113
113
|
```yaml
|
|
114
114
|
repos:
|
|
115
115
|
- repo: https://github.com/apurvaraj9/log-guard
|
|
116
|
-
rev: v0.
|
|
116
|
+
rev: v0.3.0
|
|
117
117
|
hooks:
|
|
118
118
|
- id: log-guard
|
|
119
119
|
```
|
|
@@ -188,7 +188,7 @@ log-guard/
|
|
|
188
188
|
## Limitations
|
|
189
189
|
|
|
190
190
|
- Detection is regex-based, so like any pattern-matching approach it can occasionally miss unusual formats (false negatives) or flag something that isn't actually sensitive (false positives) — especially the generic long-token API key fallback, which can flag any long run of random-looking characters.
|
|
191
|
-
-
|
|
191
|
+
- Phone detection covers US-style numbers and Indian mobile numbers (with or without `+91`, `91` or `0`, e.g. `+91 98765 43210`). Landline numbers and other countries' formats aren't detected yet.
|
|
192
192
|
- **Supported file types:** plain-text files and `.xlsx` spreadsheets. Old `.xls` files are not supported (re-save them as `.xlsx`), and other binary formats such as PDF or Word documents are not read.
|
|
193
193
|
- **Spreadsheet scanning covers cell values only.** Formulas are deliberately left untouched (masking text inside a formula could break it), and cell comments, headers/footers, sheet names, and text inside charts or images are not scanned.
|
|
194
194
|
- **Masked spreadsheets may lose some extras.** The masked copy keeps every sheet, all cell values, and basic formatting, but charts, images, and some advanced Excel features may not survive — a limitation of the `openpyxl` library used to read and write them. Your original file is never changed.
|