Skip to main content

veil

Privacy middleware for AI coding agents. The model sees consistent pseudonyms (user_ab12@example.test, First_Ab12 Last_Ab12); your machine keeps the real values, and commands the agent runs locally get the real values back (shell- and SQL-safe).

pip install "veil-proxy[postgres]"    # extras: postgres, mysql, mongo, redis, bedrock, ner, mssql, all
                                      # (installs the `veil` and `veil-hook` commands; import name `veil`)
veil init ~/code/myapp                # seed from .env DB URLs, SQLite, fixtures; wire Claude Code
veil service install                  # proxy as a LaunchAgent (macOS) / systemd user unit (Linux)
veil status ~/code/myapp

Evidence from our own test runs (details and the harness to re-run them are on GitHub: https://github.com/lemonadesaltbagel/veil):

  • 39 requests from real agent sessions against a live model leaked 0 real values (checked with a scanner that also decodes escaped and transformed text), and every session still found the bug.
  • Seeding from your own data lets 1.8% of names and contact details through, versus 80.4% for pattern matching (1,000 labelled records).
  • 21/21 one-command bypass transforms are contained. Restored values are escaped for every language layer they pass through (shell, heredocs, python -c, node -e, SQL, bash -c...): 35/35 injection tests, and 55,000 fuzzed nested commands executed with 0 code executions.
  • Prompt caching keeps working (74–89% cache hits); about 19 ms overhead per request at 40k seeded values, and 37 + 68 ms per 234 KB request at 1.2 million seeded values (1.1 GB).

One local proxy (default 127.0.0.1:8787) serves every client, routed by path: Anthropic Messages (Claude Code, Agent SDK), Amazon Bedrock InvokeModel (binary eventstream), Google Vertex rawPredict, Microsoft Foundry (/foundry), Claude Platform on AWS (/anthropic-aws), OpenAI Chat Completions (Aider, Continue, OpenAI SDK) and OpenAI Responses (Codex CLI).

Seeds from Postgres, MySQL/MariaDB, SQLite, SQL Server (native sensitivity labels), MongoDB, Redis, Elasticsearch/OpenSearch and fixture files, plus personal fields declared in code (Prisma, Django, Rails, SQLAlchemy, OpenAPI, protobuf), and re-seeds automatically when the data changes.

veil display tokens        # screen sharing: answers keep pseudonyms (veil display real to undo)
veil quasi redact          # also pseudonymise rare cities, postal codes, birth dates, employers
veil keys rotate           # re-encrypt the vault; --token-secret for new pseudonyms

Teams: veil team export | join shares the pseudonym secret (never the vault key); veil team managed-settings writes a Claude Code managed-settings.d/ drop-in that pins the proxy with allowedProviders: ["customEndpoint"].

Optional NER for free text: pip install "veil-proxy[ner]" then veil ner-model fetch.

Status: alpha. Keys: macOS Keychain / Linux Secret Service (secret-tool) / Windows Credential Manager, or VEIL_VAULT_KEY / VEIL_TOKEN_SECRET (base64). State: ~/.veil (encrypted vault).

Metadata

Release files for veil-proxy 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for veil-proxy 0.2.1
File Size Uploaded Provenance
veil_proxy-0.2.1.tar.gz 763.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for veil-proxy 0.2.1
File Interpreter ABI Platform
veil_proxy-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / veil_proxy-0.2.1.tar.gz

Download URL veil_proxy-0.2.1.tar.gz
Size 763.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a8702ca2a5f323eb3b73f31b70bcad8c9e85f025b59ed8143019b44b85c4e4b9
BLAKE2b-256 checksum
How to use checksums
f6ec0dc63fdb9bba058b6043beed24e635b9dffecb7e3a5698c2c8f516fef0ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / veil_proxy-0.2.1-py3-none-any.whl

Download URL veil_proxy-0.2.1-py3-none-any.whl
Size 775.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
999d1b2f9934738f5ad32e0ce0cbbdfc7db463393745b4a1491716376bcf36e6
BLAKE2b-256 checksum
How to use checksums
9d9085c36e8b9d7c3dc0af9f329671ab056925eefc7e7fa80c0e0629ce291eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for veil-proxy 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page