leakkill 0.8.1__tar.gz → 0.8.2__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 (37) hide show
  1. {leakkill-0.8.1/src/leakkill.egg-info → leakkill-0.8.2}/PKG-INFO +3 -3
  2. {leakkill-0.8.1 → leakkill-0.8.2}/README.md +2 -2
  3. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/__init__.py +1 -1
  4. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/agents.py +23 -5
  5. {leakkill-0.8.1 → leakkill-0.8.2/src/leakkill.egg-info}/PKG-INFO +3 -3
  6. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_agents.py +38 -0
  7. {leakkill-0.8.1 → leakkill-0.8.2}/LICENSE +0 -0
  8. {leakkill-0.8.1 → leakkill-0.8.2}/THIRD_PARTY_NOTICES.md +0 -0
  9. {leakkill-0.8.1 → leakkill-0.8.2}/pyproject.toml +0 -0
  10. {leakkill-0.8.1 → leakkill-0.8.2}/setup.cfg +0 -0
  11. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/__main__.py +0 -0
  12. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/aws.py +0 -0
  13. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/baseline.py +0 -0
  14. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/cli.py +0 -0
  15. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/gitleaks_rules.py +0 -0
  16. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/guard.py +0 -0
  17. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/onboard.py +0 -0
  18. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/providers.py +0 -0
  19. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/remote.py +0 -0
  20. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/report.py +0 -0
  21. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/sarif.py +0 -0
  22. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill/scanner.py +0 -0
  23. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill.egg-info/SOURCES.txt +0 -0
  24. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill.egg-info/dependency_links.txt +0 -0
  25. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill.egg-info/entry_points.txt +0 -0
  26. {leakkill-0.8.1 → leakkill-0.8.2}/src/leakkill.egg-info/top_level.txt +0 -0
  27. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_cli.py +0 -0
  28. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_coverage_gaps.py +0 -0
  29. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_fuzz.py +0 -0
  30. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_guard.py +0 -0
  31. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_guard_agents.py +0 -0
  32. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_import_gitleaks.py +0 -0
  33. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_onboard_remote.py +0 -0
  34. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_providers.py +0 -0
  35. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_real_world.py +0 -0
  36. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_redos.py +0 -0
  37. {leakkill-0.8.1 → leakkill-0.8.2}/tests/test_scanner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leakkill
3
- Version: 0.8.1
3
+ Version: 0.8.2
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: Ayush Anand
6
6
  License-Expression: MIT
@@ -274,7 +274,7 @@ API keys. A key you pasted into a chat, or a `.env` the agent read, stays on dis
274
274
  model provider. `--agents` scans, on your machine only:
275
275
 
276
276
  - Claude Code (`~/.claude.json`, `~/.claude/` including session transcripts), Codex (`~/.codex/`), GitHub
277
- Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor and VS Code (Copilot Chat) chat histories, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
277
+ Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor, Windsurf and VS Code (Copilot Chat) chat histories, Continue (`~/.continue/`), Cline and Roo Code task histories, Zed conversations and settings, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
278
278
  - this project's `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.claude/settings*.json`, `.gemini/settings.json`
279
279
 
280
280
  Transcripts are decoded, so a key behind JSON escapes is still found and reported at its line. The agents' own
@@ -352,7 +352,7 @@ baseline doesn't make it safe: revoke real keys first.
352
352
  # .pre-commit-config.yaml
353
353
  repos:
354
354
  - repo: https://github.com/ayushanand27/leakkill
355
- rev: v0.8.1
355
+ rev: v0.8.2
356
356
  hooks:
357
357
  - id: leakkill
358
358
  ```
@@ -241,7 +241,7 @@ API keys. A key you pasted into a chat, or a `.env` the agent read, stays on dis
241
241
  model provider. `--agents` scans, on your machine only:
242
242
 
243
243
  - Claude Code (`~/.claude.json`, `~/.claude/` including session transcripts), Codex (`~/.codex/`), GitHub
244
- Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor and VS Code (Copilot Chat) chat histories, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
244
+ Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor, Windsurf and VS Code (Copilot Chat) chat histories, Continue (`~/.continue/`), Cline and Roo Code task histories, Zed conversations and settings, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
245
245
  - this project's `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.claude/settings*.json`, `.gemini/settings.json`
246
246
 
247
247
  Transcripts are decoded, so a key behind JSON escapes is still found and reported at its line. The agents' own
@@ -319,7 +319,7 @@ baseline doesn't make it safe: revoke real keys first.
319
319
  # .pre-commit-config.yaml
320
320
  repos:
321
321
  - repo: https://github.com/ayushanand27/leakkill
322
- rev: v0.8.1
322
+ rev: v0.8.2
323
323
  hooks:
324
324
  - id: leakkill
325
325
  ```
@@ -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.8.1"
2
+ __version__ = "0.8.2"
@@ -20,24 +20,40 @@ HOME_PLACES = [
20
20
  ("Claude Desktop", "Library/Application Support/Claude/claude_desktop_config.json", False),
21
21
  ("VS Code", ".config/Code/User/mcp.json", False),
22
22
  ("VS Code", "Library/Application Support/Code/User/mcp.json", False),
23
+ ("Continue", ".continue", True),
24
+ ("Zed", ".config/zed/settings.json", False),
25
+ ("Zed", ".local/share/zed/conversations", True),
26
+ ("Zed", "Library/Application Support/Zed/conversations", True),
23
27
  ]
24
- APPDATA_PLACES = [("Claude Desktop", "Claude/claude_desktop_config.json"), ("VS Code", "Code/User/mcp.json")]
28
+ APPDATA_PLACES = [("Claude Desktop", "Claude/claude_desktop_config.json"), ("VS Code", "Code/User/mcp.json"),
29
+ ("Zed", "Zed/settings.json")]
25
30
  PROJECT_PLACES = [".mcp.json", ".cursor/mcp.json", ".vscode/mcp.json", ".claude/settings.json",
26
31
  ".claude/settings.local.json", ".gemini/settings.json", ".codex/config.toml"]
27
32
  ENV_HOMES = {"CLAUDE_CONFIG_DIR": "Claude Code", "CODEX_HOME": "Codex", "COPILOT_HOME": "GitHub Copilot CLI"}
28
33
  # The agent's own login (expected to hold a token), and bulky caches/third-party code that isn't the user's.
29
34
  SKIP_NAMES = {".credentials.json", "auth.json", "oauth_creds.json", "google_accounts.json", "plugins", "extensions",
30
- "node_modules", "pkg", "statsig", "ide", ".git", "cache", "Cache"}
31
- TEXT_EXT = {".json", ".jsonl", ".toml", ".yaml", ".yml", ".md", ".txt", ".log", ".env", ".sh", ".ini", ".cfg", ""}
35
+ "node_modules", "pkg", "statsig", "ide", ".git", "cache", "Cache", "checkpoints"}
36
+ TEXT_EXT = {".json", ".jsonl", ".toml", ".yaml", ".yml", ".md", ".txt", ".log", ".env", ".sh", ".ini", ".cfg", ".zed", ""}
32
37
  # Cursor and VS Code (Copilot Chat) keep chats in SQLite databases (state.vscdb) under the editor's user folder.
33
38
  EDITOR_DIRS = {"Cursor": ["Library/Application Support/Cursor/User", ".config/Cursor/User"],
34
- "VS Code": ["Library/Application Support/Code/User", ".config/Code/User"]}
35
- EDITOR_APPDATA = {"Cursor": "Cursor/User", "VS Code": "Code/User"}
39
+ "VS Code": ["Library/Application Support/Code/User", ".config/Code/User"],
40
+ "Windsurf": ["Library/Application Support/Windsurf/User", ".config/Windsurf/User"]}
41
+ EDITOR_APPDATA = {"Cursor": "Cursor/User", "VS Code": "Code/User", "Windsurf": "Windsurf/User"}
42
+ # Extensions that keep whole task histories as files in the editor's globalStorage (any editor above can host them).
43
+ EXTENSION_DIRS = {"Cline": "saoudrizwan.claude-dev", "Roo Code": "rooveterinaryinc.roo-cline"}
36
44
  DB_TABLES = ("ItemTable", "cursorDiskKV") # key/value tables; chats are JSON values
37
45
  MAX_FILE = 500_000_000
38
46
  CHUNK = 1_000_000
39
47
 
40
48
 
49
+ def _editor_roots(home, env):
50
+ """User folders of the editors that keep chat state: [path]."""
51
+ roots = [os.path.join(home, d) for ds in EDITOR_DIRS.values() for d in ds]
52
+ if env.get("APPDATA"):
53
+ roots += [os.path.join(env["APPDATA"], d) for d in EDITOR_APPDATA.values()]
54
+ return roots
55
+
56
+
41
57
  def places(home=None, cwd=None, env=None):
42
58
  """[(agent, path)] that exist on this machine."""
43
59
  home = home or os.path.expanduser("~")
@@ -47,6 +63,8 @@ def places(home=None, cwd=None, env=None):
47
63
  if env.get("APPDATA"):
48
64
  out += [(a, os.path.join(env["APPDATA"], p)) for a, p in APPDATA_PLACES]
49
65
  out += [(a, env[k]) for k, a in ENV_HOMES.items() if env.get(k)]
66
+ out += [(a, os.path.join(root, "globalStorage", ext)) for root in _editor_roots(home, env)
67
+ for a, ext in EXTENSION_DIRS.items()]
50
68
  out += [("this project", os.path.join(cwd, p)) for p in PROJECT_PLACES]
51
69
  seen, found = set(), []
52
70
  for agent, p in out:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leakkill
3
- Version: 0.8.1
3
+ Version: 0.8.2
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: Ayush Anand
6
6
  License-Expression: MIT
@@ -274,7 +274,7 @@ API keys. A key you pasted into a chat, or a `.env` the agent read, stays on dis
274
274
  model provider. `--agents` scans, on your machine only:
275
275
 
276
276
  - Claude Code (`~/.claude.json`, `~/.claude/` including session transcripts), Codex (`~/.codex/`), GitHub
277
- Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor and VS Code (Copilot Chat) chat histories, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
277
+ Copilot CLI (`~/.copilot/`), Gemini CLI (`~/.gemini/`), Cursor, Windsurf and VS Code (Copilot Chat) chat histories, Continue (`~/.continue/`), Cline and Roo Code task histories, Zed conversations and settings, Cursor, Windsurf, Claude Desktop and VS Code MCP configs
278
278
  - this project's `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.claude/settings*.json`, `.gemini/settings.json`
279
279
 
280
280
  Transcripts are decoded, so a key behind JSON escapes is still found and reported at its line. The agents' own
@@ -352,7 +352,7 @@ baseline doesn't make it safe: revoke real keys first.
352
352
  # .pre-commit-config.yaml
353
353
  repos:
354
354
  - repo: https://github.com/ayushanand27/leakkill
355
- rev: v0.8.1
355
+ rev: v0.8.2
356
356
  hooks:
357
357
  - id: leakkill
358
358
  ```
@@ -107,3 +107,41 @@ def test_cursor_and_vscode_chat_databases(tmp_path):
107
107
  hits = [(f.kind, f.path) for f in fs]
108
108
  assert ("GitHub token", os.path.join("~", ".config", "Cursor", "User", "workspaceStorage", "abc", "state.vscdb")
109
109
  + "#cursorDiskKV") in hits
110
+
111
+
112
+ def test_more_agents_continue_cline_roo_zed_windsurf(tmp_path):
113
+ import sqlite3
114
+ home = tmp_path / "h"
115
+
116
+ def put(rel, text):
117
+ p = home / rel
118
+ p.parent.mkdir(parents=True, exist_ok=True)
119
+ p.write_text(text)
120
+
121
+ chat = json.dumps({"messages": [{"content": f"my token {GH}"}]})
122
+ put(".continue/sessions/s1.json", chat)
123
+ cline = ".config/Code/User/globalStorage/saoudrizwan.claude-dev"
124
+ put(cline + "/tasks/1/api_conversation_history.json", chat)
125
+ put(cline + "/checkpoints/big/blob.json", chat) # shadow-git copies of the user's files: skipped
126
+ put(".config/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/tasks/2/ui_messages.json", chat)
127
+ put(".local/share/zed/conversations/c1.zed", chat)
128
+ put(".config/zed/settings.json", json.dumps({"context_servers": {"x": {"env": {"TOKEN": GH}}}}))
129
+ ws = home / ".config" / "Windsurf" / "User" / "globalStorage"
130
+ ws.mkdir(parents=True)
131
+ con = sqlite3.connect(ws / "state.vscdb")
132
+ con.execute("CREATE TABLE ItemTable (key TEXT, value BLOB)")
133
+ con.execute("INSERT INTO ItemTable VALUES ('chat', ?)", (chat.encode(),))
134
+ con.commit(); con.close()
135
+
136
+ found = {a for a, _ in agents.places(str(home), str(tmp_path), env={})}
137
+ assert {"Continue", "Cline", "Roo Code", "Zed"} <= found
138
+ assert [a for a, _ in agents.editor_dbs(str(home), env={})] == ["Windsurf"]
139
+ paths = {f.path for f in agents.scan_agents(str(home), str(tmp_path), env={}, quiet=True)
140
+ if f.kind == "GitHub token"}
141
+ sep = os.sep
142
+ for want in (".continue/sessions/s1.json", cline + "/tasks/1/api_conversation_history.json",
143
+ ".config/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/tasks/2/ui_messages.json",
144
+ ".local/share/zed/conversations/c1.zed", ".config/zed/settings.json",
145
+ ".config/Windsurf/User/globalStorage/state.vscdb#ItemTable"):
146
+ assert os.path.join("~", *want.split("/")) in paths, want
147
+ assert not any("checkpoints" in p for p in paths)
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