Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"name": "datafog",
"source": "./",
"description": "Replaces personal data and credentials with reversible markers before the model sees them."
"description": "Locally replaces detected personal data and selected credentials with reversible markers in Claude Code. See the README for coverage and platform limits."
}
]
}
24 changes: 19 additions & 5 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{
"name": "datafog",
"displayName": "DataFog",
"description": "Keeps emails, phone numbers, card and ID numbers, API keys and other credentials out of the model's context: values in files, command output and tool results are replaced by reversible markers before Claude sees them, and swapped back locally when Claude writes. See the README for coverage and platform limits.",
"version": "0.2.0",
"description": "Locally replaces detected personal data and selected credentials with reversible markers in Claude Code files and tool output. Uses an encrypted local vault. Requires a supported Mac or Linux machine; coverage and failure-mode limits apply.",
"version": "0.2.1",
"author": {
"name": "DataFog",
"url": "https://datafog.ai"
},
"homepage": "https://datafog.ai",
"repository": "https://github.com/DataFog/datafog-claude-plugin",
"license": "Apache-2.0",
"keywords": ["privacy", "pii", "secrets", "redaction", "hooks"],
"keywords": [
"privacy",
"pii",
"secrets",
"redaction",
"hooks"
],
"userConfig": {
"keep_vault_on_uninstall": {
"type": "boolean",
Expand All @@ -22,7 +28,11 @@
"type": "string",
"title": "Files that cannot be checked",
"description": "What to do when Claude reads a file DataFog cannot check (images, PDFs, binary or very large files): ask you each time, deny the read, or allow it unchecked.",
"options": ["ask", "deny", "allow"],
"options": [
"ask",
"deny",
"allow"
],
"default": "ask"
},
"entities": {
Expand All @@ -31,5 +41,9 @@
"description": "Comma-separated list, or empty for the default set (EMAIL, PHONE, SSN, CREDIT_CARD, API_KEY, BEARER_TOKEN, JWT, PRIVATE_KEY, CREDENTIAL_URI, US_ROUTING_NUMBER, NPI, ACCOUNT_NUMBER). Also available, noisy in code: DATE, IP_ADDRESS, ZIP_CODE, STREET_ADDRESS, UUID.",
"default": ""
}
}
},
"documentationUrl": "https://github.com/DataFog/datafog-claude-plugin#readme",
"supportUrl": "https://github.com/DataFog/datafog-claude-plugin/issues",
"privacyPolicyUrl": "https://github.com/DataFog/datafog-claude-plugin/blob/main/PRIVACY.md",
"icon": "./assets/datafog-icon-512.png"
}
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,25 @@ on:
push:
branches: [main, "rebuild/**"]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
manifests:
name: strict plugin and marketplace validation
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install the reviewed Claude Code validator
run: npm install --global @anthropic-ai/claude-code@2.1.327
- name: Validate both manifests without model credentials
run: sh scripts/verify-manifests.sh

test:
name: tests (${{ matrix.os }}, Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
Expand All @@ -25,10 +42,10 @@ jobs:
# tests/test_keystore.py can run the key-store mode against a private Secret Service.
- name: Install zsh and a Secret Service (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y zsh dbus gnome-keyring libsecret-tools
run: sudo apt-get update && sudo apt-get install -y zsh dbus gnome-keyring libsecret-tools libglib2.0-bin

- name: Install the engine's two dependencies and the test tools
run: python -m pip install "datafog-core>=1.7.0,<1.8" "datafog-fogvault>=1.7.0,<1.8" "pytest>=8" "ruff>=0.6" "mypy>=1.10"
run: python -m pip install "datafog-core==1.7.0" "datafog-fogvault==1.7.0" "pytest>=8" "ruff>=0.6" "mypy>=1.10"

- name: Manifests and hook config parse
run: |
Expand Down
65 changes: 65 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Privacy and local data handling

DataFog for Claude Code processes text locally to replace detected personal data and
selected credentials with reversible markers. This notice describes the plugin, not
Anthropic's services, your shell commands, or other installed tools.

## What the plugin processes and stores

The hooks examine supported file content, tool inputs/results and submitted prompts.
Detected values are stored in an encrypted local ApplicationVault so markers can be
restored. Processes temporarily hold decrypted values in memory. The encryption key is
stored in macOS Keychain or Linux Secret Service by default. Explicit `vault_key: file`
mode stores the key beside the vault and provides weaker protection.

The vault is shared across projects. By default it lives at
`~/Library/Application Support/DataFog/vaults/claude-code` on macOS or
`${XDG_DATA_HOME:-~/.local/share}/datafog/vaults/claude-code` on Linux. Configuration can
change this location. The marker index, vault metadata and Bash restore-ticket signing
key are not encrypted. They do not contain the original value mapping.

The plugin data directory also contains its Python environment, settings, tokenized
shadow copies and diagnostic logs. Configuration can contain user-entered allowlist
values in plaintext. Diagnostic event entries contain events, tool names,
entity types, counts and error codes, rather than prompt/file content or detected values.
The event log rotates after approximately 2 MB, keeping a previous log. The separate
bootstrap log appends installer output, which can include paths and error details;
it has no automatic rotation. Shadow copies retain
content that was not detected, so they must not be treated as fully anonymized files.
Session startup attempts to remove shadow copies not refreshed for a week; this is
best-effort cleanup, not a guaranteed deletion deadline.

## Network activity and other software

The plugin does not send scanned text or vault values to a DataFog service and has no
plugin analytics endpoint. Initial installation downloads dependencies through `uv`
or `pip`; package infrastructure receives ordinary download requests. GitHub supplies
the plugin source. Detection and vault operations run locally after installation.

Claude Code communicates with its model provider. Its own settings govern transcripts,
prompt history, telemetry and retention. DataFog cannot guarantee that all personal data
is removed: unknown formats, unscanned content and post-tool hook failures can expose it.
Built-in Write/Edit/NotebookEdit and Grep/Glob inputs can contain restored values in
Claude Code's local records. Commands can transmit data, and explicit
`restore_in_mcp_input: true` can pass restored values to third-party MCP tools.

## Retention and deletion

By default the vault and its key survive plugin uninstall so markers in your files remain
recoverable. `/datafog:purge` requests confirmation; a successful purge deletes the vault,
its key and shadow copies. Partial deletion failures are reported and may require manual
cleanup. Purging permanently removes marker recovery; it does not erase values
already written to your files, external services, Claude records or backups. Diagnostic
logs and configuration are separate from the vault. The README explains the alternative
plugin-data storage option and its uninstall consequences.

## Limits and support

Encryption at rest does not prevent software running as your logged-in account from
accessing values. DataFog reduces accidental exposure; it is not a sandbox or a complete
secret scanner. See the README's coverage table, known gaps and configuration defaults.

For non-sensitive questions, use the
[repository issue tracker](https://github.com/DataFog/datafog-claude-plugin/issues).
Do not include real credentials, personal data, vault files or unredacted transcripts.
For a vulnerability, follow [private security reporting](SECURITY.md).
Loading
Loading