Repository navigation
Encrypt the plugin vault and harden purge and Bash permissions - #2
Merged
Merged
Conversation
Pins: pyproject, bootstrap, CI, README, CORE_REQUIREMENT. The engine needed no change: the whole suite passes on core 1.7.0. tests/test_core_behaviour.py pins, through the plugin's tokenize path, what changed against 1.4.0: an address no longer takes the text joined in front of it; core #272 (a non-ASCII letter between two addresses leaves the second domain visible) as today's behaviour on 1.7.0 only plus the correct outcome as a non-strict xfail; and the phone shapes 1.7 no longer reports. README lists #272 and the phone shapes as known gaps 18 and 19. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
store.py wraps ApplicationVault and keeps a marker index; vault.py matches known values itself; bootstrap, launcher, cli and config follow. The test suite still targets the removed file store and is adapted in the next commits. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
test_store.py: layout and modes, ciphertext on disk, corruption, wrong and missing key, loose permissions, symlinks, two directories, marker index healing, purge, and the core limit on unlistable parent directories. test_concurrency.py: 8x100 parallel writers with a long-lived reader, twelve parallel hook processes, kills after commit and before the index, SIGKILL at random moments. test_fail_closed.py: the break matrix now covers the key store, key mode mismatch, the vault library and an unsupported machine. test_vault.py: known-value matching rules and exact round trips of hostile values. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
The live driver's throwaway vaults keep their key in a file, so a run never touches the Keychain; the Keychain path is the optional case L28 (LIVE_KEYCHAIN=1), which creates and removes one entry for its own vault. Full suite green on Python 3.12. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
test_keystore.py runs the default key mode against a private Secret Service (throwaway D-Bus session and GNOME Keyring; Linux only, never the real key store): key in the store, no key file, second process, two vaults, purge removes only its own entry, removed or wrong key fails closed. test_vault_security.py: no key or value in outputs, logs, argv, environment or temp files, and one message on an unsupported machine from bootstrap, session start, hooks, status and doctor. CI installs the Secret Service tools. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
README: supported machines and the single fail-closed message, how the vault is stored and where its key lives, vault_key=file as an explicit weaker option, keep or delete on uninstall, purge, leftovers of development builds, limits of core's vault library, speed table, what is unverified on macOS. Commands and the plugin option text follow. restore_spans reads the vault once instead of twice; exact known-value occurrences skip the regex. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Smu5UBDZuKK1PoTZh8DNKv
sidmohan0
marked this pull request as ready for review
November 18, 2026 11:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses datafog-core/datafog-fogvault 1.7 with an encrypted ApplicationVault and the operating system's key store by default. Supported: macOS Apple Silicon and Linux x86_64 with glibc 2.38+. Unsupported platforms and unavailable key stores block tool calls.
Independent security reviews reproduced and closed purge symlink traversal, silent deletion failures, unsafe lock files, FIFO hangs, and zsh arithmetic operands that could bypass Bash deny/ask rules. Purge holds the lock through key removal and returns failure on incomplete deletion. Main's plain-command allow-list is merged, including its tests.
The README now explains the three coverage groups, transcript and post-tool crash limits, supported platforms, and why names/address detection should be a future opt-in local model. Directory submission is deferred until interactive approval flows are verified. ApplicationVault gaps are tracked in DataFog/datafog-core#275.
Validation: independent final cross-review found no blocker; lint, types, shell parsing and plugin validation pass. Real Claude Code 2.1.299 on this Mac with LIVE_KEYCHAIN=1 completed 29 runs/30 cases: 187 PASS, 25 INFO, no failures or skips. Key creation 0.1 s; 15 hook processes p50 54 ms/max 93 ms; no blocking prompt; purge verified vault and key entry absent. The live runner uses fixture settings and retains both DataFog MCP tools. The last commit only repairs the file-key setting in the merged test fixture; engine code is identical to the live-tested commit.
Full local suite on this Mac: 2,476 passed, 42 skipped, 1 documented expected failure for core #272 (630.50 s). All four macOS/Linux Python 3.10/3.12 CI jobs passed on 3895eba: https://github.com/DataFog/datafog-claude-plugin/actions/runs/44290493723. All release gates are clean. Plugin version: 0.2.0.