Skip to content

Encrypt the plugin vault and harden purge and Bash permissions - #2

Merged
sidmohan0 merged 12 commits into
mainfrom
feat/core-1.7-application-vault
Nov 18, 2026
Merged

sidmohan0 merged 12 commits into
mainfrom
feat/core-1.7-application-vault

Conversation

@sidmohan0

@sidmohan0 sidmohan0 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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.

claude and others added 8 commits November 17, 2026 19:06
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 sidmohan0 changed the title Move to datafog-core 1.7 and the encrypted ApplicationVault Encrypt the plugin vault and harden purge and Bash permissions Nov 18, 2026
@sidmohan0
sidmohan0 marked this pull request as ready for review November 18, 2026 11:13
@sidmohan0
sidmohan0 merged commit 3c41b49 into main Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants