leakkill 0.6.0__tar.gz → 0.6.1__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.
Files changed (33) hide show
  1. {leakkill-0.6.0/src/leakkill.egg-info → leakkill-0.6.1}/PKG-INFO +12 -5
  2. {leakkill-0.6.0 → leakkill-0.6.1}/README.md +11 -4
  3. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/__init__.py +1 -1
  4. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/scanner.py +9 -1
  5. {leakkill-0.6.0 → leakkill-0.6.1/src/leakkill.egg-info}/PKG-INFO +12 -5
  6. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_scanner.py +7 -0
  7. {leakkill-0.6.0 → leakkill-0.6.1}/LICENSE +0 -0
  8. {leakkill-0.6.0 → leakkill-0.6.1}/THIRD_PARTY_NOTICES.md +0 -0
  9. {leakkill-0.6.0 → leakkill-0.6.1}/pyproject.toml +0 -0
  10. {leakkill-0.6.0 → leakkill-0.6.1}/setup.cfg +0 -0
  11. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/__main__.py +0 -0
  12. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/agents.py +0 -0
  13. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/aws.py +0 -0
  14. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/baseline.py +0 -0
  15. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/cli.py +0 -0
  16. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/gitleaks_rules.py +0 -0
  17. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/guard.py +0 -0
  18. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/providers.py +0 -0
  19. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/report.py +0 -0
  20. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill/sarif.py +0 -0
  21. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill.egg-info/SOURCES.txt +0 -0
  22. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill.egg-info/dependency_links.txt +0 -0
  23. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill.egg-info/entry_points.txt +0 -0
  24. {leakkill-0.6.0 → leakkill-0.6.1}/src/leakkill.egg-info/top_level.txt +0 -0
  25. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_agents.py +0 -0
  26. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_cli.py +0 -0
  27. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_coverage_gaps.py +0 -0
  28. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_fuzz.py +0 -0
  29. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_guard.py +0 -0
  30. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_guard_agents.py +0 -0
  31. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_import_gitleaks.py +0 -0
  32. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_providers.py +0 -0
  33. {leakkill-0.6.0 → leakkill-0.6.1}/tests/test_redos.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leakkill
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Find leaked secrets, check if they're live, revoke them in one command, and keep them out of AI coding agents
5
5
  Author-email: Ayush <andymylove24@gmail.com>
6
6
  License-Expression: MIT
@@ -52,6 +52,13 @@ pip install leakkill
52
52
  Python 3.9+, no dependencies. Latest development version:
53
53
  `pip install git+https://github.com/ayushanand27/leakkill`
54
54
 
55
+ Or with Docker, no Python needed:
56
+
57
+ ```sh
58
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill # scan this folder
59
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill --history # every commit
60
+ ```
61
+
55
62
  ## Commands
56
63
 
57
64
  | Command | What it does | Network? |
@@ -86,7 +93,7 @@ below), `--exclude-tests` and `--json`.
86
93
  |---|---|---|---|---|---|---|
87
94
  | License / price | MIT, free | Apache 2.0, free | MIT, free | MIT, free | AGPL, free | free for individuals, paid for teams |
88
95
  | Runs fully local | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ SaaS |
89
- | Install | `pip`, zero dependencies | Rust binary | Go binary | Go binary | Go binary | CLI + account |
96
+ | Install | `pip` (zero dependencies) or Docker | Rust binary | Go binary | Go binary | Go binary | CLI + account |
90
97
  | Detection rules | 246 | ~485 | 463 | 150+ | 800+ | 550+ |
91
98
  | Checks if a key is live | ✅ 17 providers | ✅ hundreds | ✅ | ❌ | ✅ 700+ | ✅ |
92
99
  | Revokes from the CLI | ✅ 6 providers | ✅ some providers | ❌ | ❌ | ❌ (Enterprise) | partial |
@@ -148,7 +155,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
148
155
 
149
156
  | | precision | recall | F1 | without OpenSSL test vectors (P / R / F1) | passwords in URLs | HTTP Basic auth |
150
157
  |---|---|---|---|---|---|---|
151
- | **leakkill 0.6** | 0.824 | 0.510 | **0.630** | 0.921 / 0.300 / 0.453 | **182/209** | **601/601** |
158
+ | **leakkill 0.6** | 0.825 | 0.510 | **0.630** | 0.922 / 0.300 / 0.453 | **182/209** | **601/601** |
152
159
  | Betterleaks 1.9 | 0.712 | **0.562** | 0.628 | 0.585 / **0.379** / **0.460** | 96/209 | 10/601 |
153
160
  | Gitleaks 8.28 | 0.860 | 0.453 | 0.594 | 0.910 / 0.218 / 0.351 | 0/209 | 0/601 |
154
161
  | Kingfisher 2.9 (no validation) | **0.961** | 0.104 | 0.187 | **0.925** / 0.079 / 0.145 | 20/209 | 5/601 |
@@ -156,7 +163,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
156
163
 
157
164
  Compare on the "without OpenSSL test vectors" column: those are public crypto test data, not leaks. There,
158
165
  leakkill and Betterleaks are level on F1. Betterleaks finds more credentials (recall 0.379 vs 0.300); leakkill
159
- raises far fewer false alarms (precision 0.921 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
166
+ raises far fewer false alarms (precision 0.922 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
160
167
  auth headers, because it decodes and checks them. The generic rules were tuned on this dataset, which flatters
161
168
  leakkill somewhat; false alarms on four clean repositories (requests, flask, django, express) stayed at
162
169
  1 / 2 / 3 / 0.
@@ -315,7 +322,7 @@ baseline doesn't make it safe: revoke real keys first.
315
322
  # .pre-commit-config.yaml
316
323
  repos:
317
324
  - repo: https://github.com/ayushanand27/leakkill
318
- rev: v0.6.0
325
+ rev: v0.6.1
319
326
  hooks:
320
327
  - id: leakkill
321
328
  ```
@@ -32,6 +32,13 @@ pip install leakkill
32
32
  Python 3.9+, no dependencies. Latest development version:
33
33
  `pip install git+https://github.com/ayushanand27/leakkill`
34
34
 
35
+ Or with Docker, no Python needed:
36
+
37
+ ```sh
38
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill # scan this folder
39
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill --history # every commit
40
+ ```
41
+
35
42
  ## Commands
36
43
 
37
44
  | Command | What it does | Network? |
@@ -66,7 +73,7 @@ below), `--exclude-tests` and `--json`.
66
73
  |---|---|---|---|---|---|---|
67
74
  | License / price | MIT, free | Apache 2.0, free | MIT, free | MIT, free | AGPL, free | free for individuals, paid for teams |
68
75
  | Runs fully local | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ SaaS |
69
- | Install | `pip`, zero dependencies | Rust binary | Go binary | Go binary | Go binary | CLI + account |
76
+ | Install | `pip` (zero dependencies) or Docker | Rust binary | Go binary | Go binary | Go binary | CLI + account |
70
77
  | Detection rules | 246 | ~485 | 463 | 150+ | 800+ | 550+ |
71
78
  | Checks if a key is live | ✅ 17 providers | ✅ hundreds | ✅ | ❌ | ✅ 700+ | ✅ |
72
79
  | Revokes from the CLI | ✅ 6 providers | ✅ some providers | ❌ | ❌ | ❌ (Enterprise) | partial |
@@ -128,7 +135,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
128
135
 
129
136
  | | precision | recall | F1 | without OpenSSL test vectors (P / R / F1) | passwords in URLs | HTTP Basic auth |
130
137
  |---|---|---|---|---|---|---|
131
- | **leakkill 0.6** | 0.824 | 0.510 | **0.630** | 0.921 / 0.300 / 0.453 | **182/209** | **601/601** |
138
+ | **leakkill 0.6** | 0.825 | 0.510 | **0.630** | 0.922 / 0.300 / 0.453 | **182/209** | **601/601** |
132
139
  | Betterleaks 1.9 | 0.712 | **0.562** | 0.628 | 0.585 / **0.379** / **0.460** | 96/209 | 10/601 |
133
140
  | Gitleaks 8.28 | 0.860 | 0.453 | 0.594 | 0.910 / 0.218 / 0.351 | 0/209 | 0/601 |
134
141
  | Kingfisher 2.9 (no validation) | **0.961** | 0.104 | 0.187 | **0.925** / 0.079 / 0.145 | 20/209 | 5/601 |
@@ -136,7 +143,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
136
143
 
137
144
  Compare on the "without OpenSSL test vectors" column: those are public crypto test data, not leaks. There,
138
145
  leakkill and Betterleaks are level on F1. Betterleaks finds more credentials (recall 0.379 vs 0.300); leakkill
139
- raises far fewer false alarms (precision 0.921 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
146
+ raises far fewer false alarms (precision 0.922 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
140
147
  auth headers, because it decodes and checks them. The generic rules were tuned on this dataset, which flatters
141
148
  leakkill somewhat; false alarms on four clean repositories (requests, flask, django, express) stayed at
142
149
  1 / 2 / 3 / 0.
@@ -295,7 +302,7 @@ baseline doesn't make it safe: revoke real keys first.
295
302
  # .pre-commit-config.yaml
296
303
  repos:
297
304
  - repo: https://github.com/ayushanand27/leakkill
298
- rev: v0.6.0
305
+ rev: v0.6.1
299
306
  hooks:
300
307
  - id: leakkill
301
308
  ```
@@ -1,2 +1,2 @@
1
1
  """leakkill: find leaked secrets, check if they're live, revoke them, and guard AI coding agents."""
2
- __version__ = "0.6.0"
2
+ __version__ = "0.6.1"
@@ -139,8 +139,16 @@ def real_password(pw, context):
139
139
  and not all(w.lower() in FAKE_PASSWORDS for w in words)
140
140
 
141
141
 
142
+ # Template variables written in ALL_CAPS (`MASTER_PASSWORD`, `RDS_ENDPOINT`), as in docs and deploy templates.
143
+ ENV_NAME = re.compile(r"[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+")
144
+
145
+
142
146
  def real_url_password(url):
143
- return real_password(CRED_URL.match(url).group(2), url)
147
+ m = CRED_URL.match(url)
148
+ host = re.split(r"[:/?#]", m.group(3)[1:], maxsplit=1)[0]
149
+ if ENV_NAME.fullmatch(m.group(2)) or ENV_NAME.fullmatch(host):
150
+ return False
151
+ return real_password(m.group(2), url)
144
152
 
145
153
 
146
154
  def real_basic_auth(b64):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leakkill
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Find leaked secrets, check if they're live, revoke them in one command, and keep them out of AI coding agents
5
5
  Author-email: Ayush <andymylove24@gmail.com>
6
6
  License-Expression: MIT
@@ -52,6 +52,13 @@ pip install leakkill
52
52
  Python 3.9+, no dependencies. Latest development version:
53
53
  `pip install git+https://github.com/ayushanand27/leakkill`
54
54
 
55
+ Or with Docker, no Python needed:
56
+
57
+ ```sh
58
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill # scan this folder
59
+ docker run --rm -v "$PWD:/scan" ghcr.io/ayushanand27/leakkill --history # every commit
60
+ ```
61
+
55
62
  ## Commands
56
63
 
57
64
  | Command | What it does | Network? |
@@ -86,7 +93,7 @@ below), `--exclude-tests` and `--json`.
86
93
  |---|---|---|---|---|---|---|
87
94
  | License / price | MIT, free | Apache 2.0, free | MIT, free | MIT, free | AGPL, free | free for individuals, paid for teams |
88
95
  | Runs fully local | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ SaaS |
89
- | Install | `pip`, zero dependencies | Rust binary | Go binary | Go binary | Go binary | CLI + account |
96
+ | Install | `pip` (zero dependencies) or Docker | Rust binary | Go binary | Go binary | Go binary | CLI + account |
90
97
  | Detection rules | 246 | ~485 | 463 | 150+ | 800+ | 550+ |
91
98
  | Checks if a key is live | ✅ 17 providers | ✅ hundreds | ✅ | ❌ | ✅ 700+ | ✅ |
92
99
  | Revokes from the CLI | ✅ 6 providers | ✅ some providers | ❌ | ❌ | ❌ (Enterprise) | partial |
@@ -148,7 +155,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
148
155
 
149
156
  | | precision | recall | F1 | without OpenSSL test vectors (P / R / F1) | passwords in URLs | HTTP Basic auth |
150
157
  |---|---|---|---|---|---|---|
151
- | **leakkill 0.6** | 0.824 | 0.510 | **0.630** | 0.921 / 0.300 / 0.453 | **182/209** | **601/601** |
158
+ | **leakkill 0.6** | 0.825 | 0.510 | **0.630** | 0.922 / 0.300 / 0.453 | **182/209** | **601/601** |
152
159
  | Betterleaks 1.9 | 0.712 | **0.562** | 0.628 | 0.585 / **0.379** / **0.460** | 96/209 | 10/601 |
153
160
  | Gitleaks 8.28 | 0.860 | 0.453 | 0.594 | 0.910 / 0.218 / 0.351 | 0/209 | 0/601 |
154
161
  | Kingfisher 2.9 (no validation) | **0.961** | 0.104 | 0.187 | **0.925** / 0.079 / 0.145 | 20/209 | 5/601 |
@@ -156,7 +163,7 @@ by the same script ([details and how to reproduce](benchmarks/README.md)):
156
163
 
157
164
  Compare on the "without OpenSSL test vectors" column: those are public crypto test data, not leaks. There,
158
165
  leakkill and Betterleaks are level on F1. Betterleaks finds more credentials (recall 0.379 vs 0.300); leakkill
159
- raises far fewer false alarms (precision 0.921 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
166
+ raises far fewer false alarms (precision 0.922 vs 0.585). leakkill is far ahead on passwords in URLs and Basic
160
167
  auth headers, because it decodes and checks them. The generic rules were tuned on this dataset, which flatters
161
168
  leakkill somewhat; false alarms on four clean repositories (requests, flask, django, express) stayed at
162
169
  1 / 2 / 3 / 0.
@@ -315,7 +322,7 @@ baseline doesn't make it safe: revoke real keys first.
315
322
  # .pre-commit-config.yaml
316
323
  repos:
317
324
  - repo: https://github.com/ayushanand27/leakkill
318
- rev: v0.6.0
325
+ rev: v0.6.1
319
326
  hooks:
320
327
  - id: leakkill
321
328
  ```
@@ -184,3 +184,10 @@ def test_basic_auth_password_with_url_characters():
184
184
  import base64
185
185
  b64 = base64.b64encode(b"svc:p@ss/w0rd Zq81").decode()
186
186
  assert kinds(f"Authorization: Basic {b64}") == ["Basic auth credentials"]
187
+
188
+
189
+ def test_url_with_all_caps_template_parts_ignored():
190
+ for line in ["postgresql+asyncpg://MASTER_USER:MASTER_PASSWORD@RDS_ENDPOINT:5432/db",
191
+ "postgres://app:Sup3rS3cret9@DB_HOST:5432/app", "mysql://root:DB_PASSWORD@db.internal/app"]:
192
+ assert not kinds(line), line
193
+ assert kinds("postgres://app:SUP3RSECRET9@db.prod.internal/app") == ["Credentials in URL"] # caps, but no _
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes