passkey-mcp 0.4.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.
Files changed (66) hide show
  1. passkey_mcp-0.4.0/CHANGELOG.md +236 -0
  2. passkey_mcp-0.4.0/LICENSE +21 -0
  3. passkey_mcp-0.4.0/MANIFEST.in +2 -0
  4. passkey_mcp-0.4.0/PKG-INFO +539 -0
  5. passkey_mcp-0.4.0/README.md +502 -0
  6. passkey_mcp-0.4.0/docs/SECURITY.md +3 -0
  7. passkey_mcp-0.4.0/passkey/__init__.py +17 -0
  8. passkey_mcp-0.4.0/passkey/__main__.py +6 -0
  9. passkey_mcp-0.4.0/passkey/audit.py +124 -0
  10. passkey_mcp-0.4.0/passkey/auth.py +141 -0
  11. passkey_mcp-0.4.0/passkey/bundle.py +276 -0
  12. passkey_mcp-0.4.0/passkey/cli/__init__.py +278 -0
  13. passkey_mcp-0.4.0/passkey/cli/handlers.py +221 -0
  14. passkey_mcp-0.4.0/passkey/cli/parser.py +310 -0
  15. passkey_mcp-0.4.0/passkey/cli.py +24 -0
  16. passkey_mcp-0.4.0/passkey/clipboard.py +79 -0
  17. passkey_mcp-0.4.0/passkey/commands.py +655 -0
  18. passkey_mcp-0.4.0/passkey/completion.py +234 -0
  19. passkey_mcp-0.4.0/passkey/dirs.py +79 -0
  20. passkey_mcp-0.4.0/passkey/doctor.py +194 -0
  21. passkey_mcp-0.4.0/passkey/generator.py +42 -0
  22. passkey_mcp-0.4.0/passkey/health.py +96 -0
  23. passkey_mcp-0.4.0/passkey/importers.py +497 -0
  24. passkey_mcp-0.4.0/passkey/interactive.py +274 -0
  25. passkey_mcp-0.4.0/passkey/keychain.py +409 -0
  26. passkey_mcp-0.4.0/passkey/mcp_commands.py +796 -0
  27. passkey_mcp-0.4.0/passkey/mcp_config.py +667 -0
  28. passkey_mcp-0.4.0/passkey/mcp_server.py +259 -0
  29. passkey_mcp-0.4.0/passkey/models.py +189 -0
  30. passkey_mcp-0.4.0/passkey/py.typed +0 -0
  31. passkey_mcp-0.4.0/passkey/runner.py +66 -0
  32. passkey_mcp-0.4.0/passkey/settings.py +127 -0
  33. passkey_mcp-0.4.0/passkey/sharing.py +266 -0
  34. passkey_mcp-0.4.0/passkey/templates.py +160 -0
  35. passkey_mcp-0.4.0/passkey_mcp.egg-info/PKG-INFO +539 -0
  36. passkey_mcp-0.4.0/passkey_mcp.egg-info/SOURCES.txt +64 -0
  37. passkey_mcp-0.4.0/passkey_mcp.egg-info/dependency_links.txt +1 -0
  38. passkey_mcp-0.4.0/passkey_mcp.egg-info/entry_points.txt +3 -0
  39. passkey_mcp-0.4.0/passkey_mcp.egg-info/requires.txt +6 -0
  40. passkey_mcp-0.4.0/passkey_mcp.egg-info/top_level.txt +5 -0
  41. passkey_mcp-0.4.0/pyproject.toml +71 -0
  42. passkey_mcp-0.4.0/setup.cfg +4 -0
  43. passkey_mcp-0.4.0/tests/__init__.py +0 -0
  44. passkey_mcp-0.4.0/tests/conftest.py +42 -0
  45. passkey_mcp-0.4.0/tests/integration/__init__.py +0 -0
  46. passkey_mcp-0.4.0/tests/integration/test_mcp_integration.py +98 -0
  47. passkey_mcp-0.4.0/tests/test_audit.py +123 -0
  48. passkey_mcp-0.4.0/tests/test_auth.py +141 -0
  49. passkey_mcp-0.4.0/tests/test_bundle.py +295 -0
  50. passkey_mcp-0.4.0/tests/test_cli.py +239 -0
  51. passkey_mcp-0.4.0/tests/test_commands.py +44 -0
  52. passkey_mcp-0.4.0/tests/test_completion.py +79 -0
  53. passkey_mcp-0.4.0/tests/test_dirs.py +178 -0
  54. passkey_mcp-0.4.0/tests/test_generator.py +52 -0
  55. passkey_mcp-0.4.0/tests/test_health.py +106 -0
  56. passkey_mcp-0.4.0/tests/test_importers.py +333 -0
  57. passkey_mcp-0.4.0/tests/test_interactive.py +135 -0
  58. passkey_mcp-0.4.0/tests/test_keychain.py +233 -0
  59. passkey_mcp-0.4.0/tests/test_mcp_config.py +300 -0
  60. passkey_mcp-0.4.0/tests/test_mcp_server.py +546 -0
  61. passkey_mcp-0.4.0/tests/test_models.py +146 -0
  62. passkey_mcp-0.4.0/tests/test_runner.py +124 -0
  63. passkey_mcp-0.4.0/tests/test_settings.py +128 -0
  64. passkey_mcp-0.4.0/tests/test_sharing.py +64 -0
  65. passkey_mcp-0.4.0/tests/test_templates.py +126 -0
  66. passkey_mcp-0.4.0/tests/test_unwrap.py +179 -0
@@ -0,0 +1,236 @@
1
+ # Changelog
2
+
3
+ > **Version scheme reset (2026-07-28):** a senior code review found the 1.x
4
+ > labels were not earned (test suite cannot run to completion, auth layer
5
+ > breaks headless MCP flows on stock macOS, no CI). Versions were re-baselined:
6
+ > `1.0.0 → 0.0.1`, `1.1.0 → 0.1.0`, `1.2.0 → 0.2.0`. See `PLAN.md` for the
7
+ > roadmap to a real 1.0. First installable tag will be **0.4.0**.
8
+
9
+ ## [Unreleased]
10
+
11
+ ## 0.4.0 (2026-09-14)
12
+
13
+ ### Changed
14
+
15
+ - First installable release is 0.4.0: still Alpha, a local OS-keychain
16
+ injector for MCP/CLI secrets, not a team vault. This PR does not tag,
17
+ publish to PyPI, or open a GitHub Release; D2 publish stays open until
18
+ Nick’s Release.
19
+ - PLAN current-state describes `main` as 0.4.0 untagged, with Protect Main
20
+ requiring `lint`, the four `test` jobs, and `audit`.
21
+ - Dependabot ignores `mcp` semver-major so a range-widening PR (like #7)
22
+ cannot land mcp 2.x (FastMCP was removed in v2).
23
+
24
+ ## 0.3.7 (2026-09-14)
25
+
26
+ ### Changed
27
+
28
+ - CI and release workflows use `setup-uv` v7, `upload-artifact` v7, and
29
+ `download-artifact` v8 (Dependabot #10–#12, landed together so the
30
+ publish job keeps a matching artifact pair).
31
+
32
+ ## 0.3.6 (2026-09-14)
33
+
34
+ ### Changed
35
+
36
+ - PLAN current-state describes `main` at 0.3.5 (Protect Main on, D2 prep
37
+ landed; leftover is required check `audit` and D2 publish).
38
+ - SECURITY.md points InfoSec at protected `main` and private
39
+ vulnerability reporting as on, not as D0-5 leftovers.
40
+ - README shows how wrapping works (config → `passkey run` → OS keychain →
41
+ child env) and states that install does not scan editor configs.
42
+
43
+ ## 0.3.5 (2026-09-14)
44
+
45
+ ### Added
46
+
47
+ - Trusted Publishing workflow builds wheel and sdist when a GitHub Release
48
+ is published; PyPI stays unpublished until the 0.4.0 tag.
49
+ - Dependabot weekly PRs for uv and GitHub Actions (`mcp` stays `<2.0.0`).
50
+
51
+ ### Changed
52
+
53
+ - `passkey --version` reads package metadata, so a `pyproject.toml` bump is
54
+ the only version edit.
55
+ - Packaging metadata lists Python 3.13/3.14 and Issues/Source/PyPI URLs;
56
+ status stays Alpha and unpublished.
57
+ - PLAN current-state describes `main` at 0.3.4 (D2 prep is not a 0.4.0
58
+ release).
59
+
60
+ ### Security
61
+
62
+ - CI runs `pip-audit` against the locked tree so known dependency CVEs
63
+ fail the build. Locked `cryptography` to 50.0.1 (PYSEC-2026-3552).
64
+
65
+ ## 0.3.4 (2026-09-13)
66
+
67
+ ### Changed
68
+
69
+ - Agent loop: skip sys-arch unless PLAN.md names a design fork; parent chat
70
+ is the PM (no fifth specialist); sys-release promotes the previous
71
+ Unreleased heading on every 0.3.x bump; nits do not restart the four-agent
72
+ cycle.
73
+
74
+ ## 0.3.3 (2026-09-13)
75
+
76
+ ### Added
77
+
78
+ - CONTRIBUTING.md so contributors have a single entry for setup, tests, and
79
+ the PR loop.
80
+
81
+ ### Changed
82
+
83
+ - README positions the product as a local OS-keychain injector; install is a
84
+ labeled git preview (PyPI unpublished), Development is `uv` only, and
85
+ `passkey add --fields` is documented as getpass prompts.
86
+ - `passkey doctor` recommends the git preview or `uv run passkey` instead of
87
+ `pip install` / PyPI pipx.
88
+
89
+ ### Fixed
90
+
91
+ - Documented share passphrase entropy as 8 words / ~64 bits (the 0.2.0 notes
92
+ had said 4 words / ~32 bits).
93
+
94
+ ### Security
95
+
96
+ - Replaced the fake “approved / SOC 2” assessment with a disclosure policy
97
+ and a one-page threat model that matches the code; GitHub Security tab
98
+ file lives at the repo root.
99
+
100
+ ## 0.3.2 (2026-09-13)
101
+
102
+ ### Fixed
103
+
104
+ - Doctor tests no longer depend on whether Claude/Cursor configs exist on
105
+ the machine. Doctor already stays silent on missing MCP clients; the
106
+ suite now locks that first-run contract so a clean runner is not a
107
+ failed install.
108
+ - MCP integration smoke tests mock the OS keyring so Ubuntu CI (no keyring
109
+ daemon) is not a failed install.
110
+
111
+ ### Changed
112
+
113
+ - CI syncs with `--locked` so a stale lockfile fails the build.
114
+
115
+ ## 0.3.1 (2026-09-12)
116
+
117
+ ### Changed
118
+
119
+ - Cursor agent profiles (`sys-arch`, `sys-engineer`, `sys-release`,
120
+ `sys-review`), release-hygiene skill, changelog gate on `git push` / `gh pr create`,
121
+ and a PR template that requires SemVer + `[Unreleased]` notes on every branch.
122
+ Dropped leftover Claude Code dir, duplicate ruff config, and stale
123
+ `claude.py` lint ignores. Editor folders (`.vscode/`, `.idea/`) are gitignored.
124
+ Rewrote `AGENTS.md` to match the tree (P0–P3 claims removed).
125
+
126
+ ## 0.3.0 (2026-07-28)
127
+
128
+ ### Changed
129
+ - Re-versioned to 0.x; project is pre-1.0 (see note above)
130
+ - Deleted stale plans (`PHASE2.md`, `docs/SECURITY_AUDIT_2026.md`); superseded by `PLAN.md`
131
+ - Rewrote `AGENTS.md` with verified, accurate workflow instructions
132
+
133
+ ## 0.2.0 (2026-07-26, previously "1.2.0")
134
+
135
+ ### Added
136
+ - **`passkey generate`** — cryptographically secure random secret generation
137
+ - Guarantees character diversity (uppercase, lowercase, digits, symbols)
138
+ - Configurable length (`--length N`, default 32)
139
+ - Auto-copy to clipboard (disable with `--no-copy`)
140
+ - Integrated into `passkey new` interactive flow ("Generate a secure value?")
141
+ - **Credential templates** — pre-built configs for popular services
142
+ - 8 built-in templates: GitHub, AWS, Slack, OpenAI, Stripe, Vercel, PostgreSQL, MySQL
143
+ - `passkey template list|show|apply|add` commands
144
+ - Custom templates saved to `~/.config/passkey/templates/`
145
+ - Secret values stripped when saving custom templates
146
+ - Integrated into `passkey new` flow ("Start from a template?")
147
+ - **`passkey share`** — share entries via encrypted file + passphrase
148
+ - 256-word built-in passphrase wordlist (~64 bits entropy, 8 words)
149
+ - Displays passphrase for human relay (no key exchange needed)
150
+ - `shared_by` and `shared_at` metadata tracked in encrypted payload
151
+ - **`passkey receive`** — import shared entries by passphrase
152
+ - Decrypts bundle file with passphrase
153
+ - Single-entry or full-bundle import
154
+ - **`passkey rotate`** — mark an entry as rotated
155
+ - Updates `last_rotated` timestamp for lifecycle tracking
156
+ - **`passkey doctor --deep`** — expanded diagnostics
157
+ - Entry age checks (warns if >90 days without rotation)
158
+ - MCP config security check (warns about plaintext secrets)
159
+ - Bundle file permission check
160
+ - **`passkey audit --summary`** — aggregate audit statistics
161
+ - Total operations, operations by type, most accessed entries
162
+ - Oldest entry, oldest rotation, entries never rotated
163
+ - `last_rotated` field added to entry metadata (serialized in exports)
164
+
165
+ ### Changed
166
+ - `passkey new` now offers generate and template options during creation
167
+ - `passkey info` displays `Last Rotated` timestamp when available
168
+
169
+ ## 0.1.0 (2026-07-26, previously "1.1.0")
170
+
171
+ ### Added
172
+ - **Tool-agnostic MCP support** — works with Claude, Gemini, VS Code, Cursor, OpenCode, Windsurf, Cline, and Zed
173
+ - Adapter-based architecture (`passkey/mcp_config.py`) with per-tool config paths, root keys, and command formats
174
+ - `passkey init --tool <name>` to migrate configs for any supported tool
175
+ - `passkey status` shows security status across all detected tools
176
+ - `passkey servers` lists MCP servers across all tools
177
+ - `passkey doctor` runs diagnostics on all tool configs
178
+ - **Shell tab completion** (`passkey/completion.py`)
179
+ - `passkey completion` shows setup instructions for bash, zsh, and fish
180
+ - `passkey completion --zsh` / `--bash` / `--fish` prints the completion script
181
+ - Entry names complete for all subcommands (`passkey get <TAB>`, `passkey hugg<TAB>`)
182
+ - `passkey list --names-only` for clean one-per-line output
183
+ - **OS-level authentication** (`passkey/auth.py`)
184
+ - macOS: uses `sudo -v` (honors Touch ID / PAM config)
185
+ - Linux: PolicyKit dialog via `pkexec`
186
+ - Windows: UAC elevation via `ShellExecuteW`
187
+ - Fallback: `getpass` + `sudo -S` for headless environments
188
+ - **Interactive onboarding** for first-time users
189
+ - Welcome banner with feature overview
190
+ - Guided first-entry creation
191
+ - Shell completion setup prompt
192
+
193
+ ### Changed
194
+ - `passkey init`, `status`, `doctor`, `servers`, `add` are now top-level commands (not just under `passkey claude`)
195
+ - `passkey claude init/status` kept as backward-compatible aliases
196
+ - Auth required before all secret read/write operations (new, get, edit, delete, run, export, import, etc.)
197
+ - MCP server tools renamed: `passkey_list`, `passkey_fields`, `passkey_status`, `passkey_doctor`, `passkey_wrap_server`
198
+ - Improved error messages with actionable suggestions
199
+
200
+ ### Fixed
201
+ - Bare `except:` in `importers.py` now catches specific exceptions
202
+ - Unused imports removed across codebase
203
+ - All exception re-raises now use `from err` / `from None` for proper chaining
204
+ - Help text: `--new` → `new`, `--list` → `list` (was confusing)
205
+
206
+ ### Security
207
+ - LLMs/agents can discover entry names but never read secret values
208
+ - `passkey list --names-only` outputs names only (no accidental value exposure)
209
+ - MCP server tools never expose values through the protocol
210
+
211
+ ## 0.0.1 (2026-05-08, previously "1.0.0")
212
+
213
+ ### Added
214
+ - Encrypted bundle export/import (`passkey export --encrypt`, `passkey import --decrypt`)
215
+ - AES-256-GCM encryption with scrypt key derivation
216
+ - Portable machine provisioning via passphrase-protected bundles
217
+ - `--setup-claude` flag to auto-configure MCP servers on import
218
+ - Entry name validation (alphanumeric + hyphens/underscores/dots, 1-64 chars)
219
+ - `--insecure` flag for importing files with insecure permissions
220
+ - PID-aware lock file with automatic stale lock cleanup
221
+
222
+ ### Changed
223
+ - Atomic config file writes (prevents corruption on crash)
224
+ - Improved secret detection heuristics (fewer false positives on `PAGE_ID`, `BOARD_ID`, etc.)
225
+ - Stdout export now requires confirmation when secrets are included
226
+ - Import refuses world-readable files by default (use `--insecure` to override)
227
+
228
+ ### Removed
229
+ - `passkey_add_secret` MCP tool (secrets must not transit through LLM context)
230
+ - `passkey_init_server` MCP tool (deprecated, non-functional)
231
+
232
+ ### Security
233
+ - Secrets no longer flow through the MCP/LLM channel
234
+ - Bundle files created with 0600 permissions
235
+ - File-based lock includes PID for stale lock detection
236
+ - Config writes use atomic temp-file + rename pattern
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nick Sanchez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include README.md LICENSE CHANGELOG.md
2
+ recursive-include docs *.md