egressveil 0.2.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.
- egressveil-0.2.0/.gitignore +41 -0
- egressveil-0.2.0/CHANGELOG.md +68 -0
- egressveil-0.2.0/LICENSE +21 -0
- egressveil-0.2.0/PKG-INFO +330 -0
- egressveil-0.2.0/README.md +292 -0
- egressveil-0.2.0/SECURITY.md +42 -0
- egressveil-0.2.0/configs/egressveil.example.yaml +81 -0
- egressveil-0.2.0/docs/architecture.md +107 -0
- egressveil-0.2.0/docs/integrations.md +94 -0
- egressveil-0.2.0/docs/releasing.md +79 -0
- egressveil-0.2.0/docs/roadmap.md +65 -0
- egressveil-0.2.0/docs/security-design.md +186 -0
- egressveil-0.2.0/docs/threat-model.md +71 -0
- egressveil-0.2.0/pyproject.toml +108 -0
- egressveil-0.2.0/src/egressveil/__init__.py +7 -0
- egressveil-0.2.0/src/egressveil/__main__.py +8 -0
- egressveil-0.2.0/src/egressveil/audit/__init__.py +99 -0
- egressveil-0.2.0/src/egressveil/cli.py +455 -0
- egressveil-0.2.0/src/egressveil/config.py +690 -0
- egressveil-0.2.0/src/egressveil/detectors/__init__.py +86 -0
- egressveil-0.2.0/src/egressveil/detectors/patterns.py +245 -0
- egressveil-0.2.0/src/egressveil/inspection.py +266 -0
- egressveil-0.2.0/src/egressveil/policy/__init__.py +37 -0
- egressveil-0.2.0/src/egressveil/policy/engine.py +35 -0
- egressveil-0.2.0/src/egressveil/providers/__init__.py +39 -0
- egressveil-0.2.0/src/egressveil/providers/anthropic.py +178 -0
- egressveil-0.2.0/src/egressveil/proxy/__init__.py +10 -0
- egressveil-0.2.0/src/egressveil/proxy/server.py +354 -0
- egressveil-0.2.0/src/egressveil/py.typed +0 -0
- egressveil-0.2.0/src/egressveil/redactor/__init__.py +54 -0
- egressveil-0.2.0/tests/__init__.py +0 -0
- egressveil-0.2.0/tests/conftest.py +49 -0
- egressveil-0.2.0/tests/fakes.py +108 -0
- egressveil-0.2.0/tests/helpers.py +74 -0
- egressveil-0.2.0/tests/test_audit.py +65 -0
- egressveil-0.2.0/tests/test_cli.py +128 -0
- egressveil-0.2.0/tests/test_cli_gateway.py +107 -0
- egressveil-0.2.0/tests/test_config.py +339 -0
- egressveil-0.2.0/tests/test_detectors.py +163 -0
- egressveil-0.2.0/tests/test_gateway.py +427 -0
- egressveil-0.2.0/tests/test_inspection.py +383 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
*.whl
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
|
|
15
|
+
# Tooling caches
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
coverage.xml
|
|
21
|
+
htmlcov/
|
|
22
|
+
|
|
23
|
+
# Local EgressVeil config and logs (may contain internal domains / audit data)
|
|
24
|
+
/egressveil.yaml
|
|
25
|
+
*.audit.jsonl
|
|
26
|
+
audit.jsonl
|
|
27
|
+
.egressveil/
|
|
28
|
+
|
|
29
|
+
# Secrets - never commit
|
|
30
|
+
.env
|
|
31
|
+
.env.*
|
|
32
|
+
!.env.example
|
|
33
|
+
*.pem
|
|
34
|
+
*.key
|
|
35
|
+
|
|
36
|
+
# Editors / OS
|
|
37
|
+
.vscode/
|
|
38
|
+
.idea/
|
|
39
|
+
*.swp
|
|
40
|
+
.DS_Store
|
|
41
|
+
Thumbs.db
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
intends to follow [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.0] - 2026-11-16
|
|
10
|
+
|
|
11
|
+
First public release. EgressVeil is free and open source under the MIT
|
|
12
|
+
License. This release protects Claude Code's Anthropic API traffic from
|
|
13
|
+
leaking secrets and tokens. It is pre-alpha: see the README for coverage
|
|
14
|
+
limitations.
|
|
15
|
+
|
|
16
|
+
### Added: release and community
|
|
17
|
+
|
|
18
|
+
- A release workflow builds and smoke-tests each release, attaches signed
|
|
19
|
+
build provenance, and creates the GitHub release. PyPI Trusted Publishing
|
|
20
|
+
is ready but turned off until the project is registered on PyPI (see
|
|
21
|
+
`docs/releasing.md`).
|
|
22
|
+
- Official support for Python 3.13 and 3.14. CI tests Python 3.11 to 3.14 on
|
|
23
|
+
Linux, macOS and Windows.
|
|
24
|
+
- `SUPPORT.md`, `CODEOWNERS`, and install instructions using pipx or pip with
|
|
25
|
+
the release wheel.
|
|
26
|
+
|
|
27
|
+
### Added: Phase 1, the Claude Code gateway
|
|
28
|
+
|
|
29
|
+
- `egressveil serve`: a local aiohttp gateway for the Anthropic Messages API
|
|
30
|
+
(`/v1/messages`, `/v1/messages/count_tokens`), with streaming passthrough,
|
|
31
|
+
bounded request bodies and stream chunks, verified TLS to an allowlisted
|
|
32
|
+
upstream, no redirect following, and no use of environment proxies.
|
|
33
|
+
- An Anthropic request parser that inspects every string field, hardened
|
|
34
|
+
against duplicate keys, `NaN` and deep nesting.
|
|
35
|
+
- `secrets` and `tokens` detectors with vendor, private-key, URL-credential,
|
|
36
|
+
generic-assignment, JWT, bearer and Basic auth rules.
|
|
37
|
+
- A policy engine (the most restrictive action wins), keyed stable
|
|
38
|
+
redaction placeholders, and escalation to `BLOCK` for signed `thinking`
|
|
39
|
+
content and for URLs.
|
|
40
|
+
- Strict-mode fail-closed handling for unsupported routes, content types and
|
|
41
|
+
encodings, invalid JSON, opaque images and PDFs, and detector errors.
|
|
42
|
+
Permissive mode forwards these and flags them.
|
|
43
|
+
- A JSONL audit log with keyed digests and a `0600` key file. It never
|
|
44
|
+
records bodies, headers, query strings or raw values.
|
|
45
|
+
- Host-header (DNS-rebinding) and browser-`Origin` rejection, and a local
|
|
46
|
+
`/_egressveil/health` endpoint.
|
|
47
|
+
- `egressveil scan`: runs the detectors and policy over files or stdin.
|
|
48
|
+
- `doctor` detects a running gateway and lists the active detectors.
|
|
49
|
+
- Config option `gateway.allow_opaque_content`.
|
|
50
|
+
- Runtime dependency: `aiohttp`.
|
|
51
|
+
|
|
52
|
+
### Added: Phase 0, the foundation
|
|
53
|
+
|
|
54
|
+
- Project scaffold: `src/` layout, Hatchling packaging, MIT license.
|
|
55
|
+
- CLI commands: `egressveil version`, `egressveil config validate` and
|
|
56
|
+
`egressveil doctor`.
|
|
57
|
+
- A strict YAML configuration schema with secure defaults enforced at
|
|
58
|
+
validation: loopback-only listener, https allowlisted upstreams, strict
|
|
59
|
+
mode, no raw-value audit logging, and no telemetry.
|
|
60
|
+
- Secret-safe validation output, and rejection of config files that contain
|
|
61
|
+
credential-shaped values.
|
|
62
|
+
- Documentation: architecture, threat model, security design, integrations
|
|
63
|
+
and roadmap.
|
|
64
|
+
- CI: Ruff, strict mypy, and pytest on Python 3.11 and 3.12 across Linux,
|
|
65
|
+
macOS and Windows; a build check; and pip-audit dependency auditing.
|
|
66
|
+
|
|
67
|
+
[Unreleased]: https://github.com/qmmughal/egressveil/compare/v0.2.0...HEAD
|
|
68
|
+
[0.2.0]: https://github.com/qmmughal/egressveil/releases/tag/v0.2.0
|
egressveil-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 EgressVeil contributors
|
|
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,330 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: egressveil
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: The local privacy gateway for AI coding agents.
|
|
5
|
+
Project-URL: Homepage, https://github.com/qmmughal/egressveil
|
|
6
|
+
Project-URL: Issues, https://github.com/qmmughal/egressveil/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/qmmughal/egressveil/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Security, https://github.com/qmmughal/egressveil/blob/main/SECURITY.md
|
|
9
|
+
Author: EgressVeil contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-agents,dlp,gateway,llm,privacy,redaction,security
|
|
13
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Security
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Requires-Dist: aiohttp>=3.10
|
|
28
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
29
|
+
Requires-Dist: typer>=0.12
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
32
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
33
|
+
Requires-Dist: pip-audit>=2.7; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
36
|
+
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# EgressVeil
|
|
40
|
+
|
|
41
|
+
**The local privacy gateway for AI coding agents.**
|
|
42
|
+
|
|
43
|
+
[](https://github.com/qmmughal/egressveil/actions/workflows/ci.yml)
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
|
|
46
|
+
EgressVeil is a local-first, open-source security gateway. It detects sensitive
|
|
47
|
+
information in the API traffic that supported AI coding agents send to LLM
|
|
48
|
+
providers, and redacts or blocks it before it leaves your machine.
|
|
49
|
+
|
|
50
|
+
**Free and open source, for everyone.** EgressVeil is released under the
|
|
51
|
+
[MIT License](LICENSE). You can use it, modify it, redistribute it and build
|
|
52
|
+
commercial products on it at no cost. There are no paid tiers, accounts,
|
|
53
|
+
license keys or usage limits. It runs entirely on your machine, has no
|
|
54
|
+
telemetry, and its only network connection is to the LLM provider you
|
|
55
|
+
configure.
|
|
56
|
+
|
|
57
|
+
> **Project status: pre-alpha (Phase 1).** EgressVeil now runs as a local
|
|
58
|
+
> gateway for the **Anthropic Messages API**, the API Claude Code uses. It
|
|
59
|
+
> detects **secrets and tokens** and blocks or redacts them according to your
|
|
60
|
+
> policy. PII and internal-hostname detection, and support for other agents,
|
|
61
|
+
> are not implemented yet. Detection is heuristic. Treat EgressVeil as one
|
|
62
|
+
> layer of defense, not a guarantee.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Why
|
|
67
|
+
|
|
68
|
+
AI coding agents read your working tree and send large parts of it to a
|
|
69
|
+
remote LLM API. That context can contain `.env` files, cloud credentials,
|
|
70
|
+
customer data pasted into a test fixture, or internal hostnames. Today the
|
|
71
|
+
only control most teams have is to hope that none of it gets read.
|
|
72
|
+
|
|
73
|
+
EgressVeil sits between the agent and the provider API on `localhost`. It
|
|
74
|
+
inspects each request, applies a policy you control (`ALLOW`, `REDACT`,
|
|
75
|
+
`BLOCK`, `LOG_ONLY`), and writes an audit trail that never contains the raw
|
|
76
|
+
secret.
|
|
77
|
+
|
|
78
|
+
## What EgressVeil is not
|
|
79
|
+
|
|
80
|
+
- **It is not a firewall for everything your agent does.** It inspects only
|
|
81
|
+
the LLM API traffic that a supported agent sends through it. Shell commands,
|
|
82
|
+
package installs, web fetches, MCP servers, git pushes and other network
|
|
83
|
+
activity from the agent or its tools are **not** covered.
|
|
84
|
+
- It cannot inspect traffic that an agent sends straight to a vendor backend
|
|
85
|
+
that you can't redirect, which affects Cursor in particular (see
|
|
86
|
+
[Integrations](#integration-compatibility)).
|
|
87
|
+
- It does not inspect responses from the model (planned).
|
|
88
|
+
- It is not a replacement for keeping secrets out of your repository.
|
|
89
|
+
|
|
90
|
+
See [docs/threat-model.md](docs/threat-model.md) for the full scope.
|
|
91
|
+
|
|
92
|
+
## Quick start with Claude Code
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
egressveil serve
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
In another terminal, point Claude Code at the gateway and start it as usual:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Linux/macOS
|
|
102
|
+
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
|
|
103
|
+
claude
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
# Windows PowerShell
|
|
108
|
+
$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:8787"
|
|
109
|
+
claude
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Claude Code keeps its own credentials. EgressVeil passes the auth header to
|
|
113
|
+
`api.anthropic.com` unchanged and never logs it.
|
|
114
|
+
|
|
115
|
+
If a request contains something your policy blocks, the request never leaves
|
|
116
|
+
your machine, and Claude Code shows an error like this:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
API Error: 400 EgressVeil: request blocked before leaving this machine:
|
|
120
|
+
sensitive data detected: secrets/aws_access_key_id at messages[4].content[0].content[0].text.
|
|
121
|
+
Remove the value from the conversation (for example start a new session)
|
|
122
|
+
or adjust the EgressVeil policy. (request ev_3c1f0a9e2b7d4c11)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
> **Note on `BLOCK`:** Claude Code resends the whole conversation on every
|
|
126
|
+
> turn. Once a blocked value is in the conversation, every later request is
|
|
127
|
+
> blocked too, until you start a new session (for example with `/clear`). If
|
|
128
|
+
> you prefer to keep working, set the `secrets` and `tokens` rules to
|
|
129
|
+
> `REDACT`. The model then sees a placeholder such as
|
|
130
|
+
> `[EGRESSVEIL:aws_access_key_id:5b2e91c0]` instead of the value.
|
|
131
|
+
|
|
132
|
+
## Features
|
|
133
|
+
|
|
134
|
+
### Implemented
|
|
135
|
+
|
|
136
|
+
| Feature | Notes |
|
|
137
|
+
| --- | --- |
|
|
138
|
+
| `egressveil serve` | A local gateway for the Anthropic Messages API (`/v1/messages`, `/v1/messages/count_tokens`), with streaming (SSE) passthrough |
|
|
139
|
+
| Secret detectors | Anthropic, OpenAI, AWS, GitHub, GitLab, Slack, Stripe, Google, npm and Hugging Face keys; private keys; credentials in URLs; generic `password = "..."` and `.env` assignments |
|
|
140
|
+
| Token detectors | JWTs, bearer tokens and Basic auth headers |
|
|
141
|
+
| Policy engine | `ALLOW` / `REDACT` / `BLOCK` / `LOG_ONLY` for each detector. The most restrictive action wins |
|
|
142
|
+
| Redaction | Placeholders keyed by an HMAC of the value, so the same value always gets the same placeholder. That keeps conversations consistent and prompt caching effective. Redacted values are never restored |
|
|
143
|
+
| Fail-closed strict mode | Blocks unsupported endpoints, non-JSON or compressed bodies, malformed or duplicate-key JSON, too-deep nesting, uninspectable images and PDFs, and requests where a detector fails |
|
|
144
|
+
| Audit log | JSONL with request metadata, rule IDs, JSON locations and keyed digests. Never bodies, headers, query strings or raw values |
|
|
145
|
+
| Local hardening | Loopback-only listener. Host-header check against DNS rebinding. Browser `Origin` requests rejected. Upstreams are https-only and allowlisted, TLS is verified, and redirects are not followed |
|
|
146
|
+
| `egressveil scan` | Run the detectors and policy over files or stdin. Prints locations and rule IDs, never values |
|
|
147
|
+
| `egressveil doctor` | Checks Python, config, the listen port and whether the gateway is running, the audit location, the base-URL environment variables, and the active detectors |
|
|
148
|
+
| `egressveil config validate` | A strict schema with secure defaults. Output never contains values |
|
|
149
|
+
|
|
150
|
+
### Planned
|
|
151
|
+
|
|
152
|
+
| Feature | Phase |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| OpenAI-compatible API parser (for Aider) | 2 |
|
|
155
|
+
| PII and internal-hostname detectors | 2 |
|
|
156
|
+
| `egressveil run -- <agent>` launcher that sets base URLs | 2 |
|
|
157
|
+
| OpenClaw integration | 3 |
|
|
158
|
+
| Cursor: documented, experimental support where technically possible | 3 |
|
|
159
|
+
| Response-side inspection | 3 |
|
|
160
|
+
|
|
161
|
+
The details are in [docs/roadmap.md](docs/roadmap.md).
|
|
162
|
+
|
|
163
|
+
## Security architecture
|
|
164
|
+
|
|
165
|
+
```mermaid
|
|
166
|
+
flowchart TD
|
|
167
|
+
A[AI coding agent<br/>Claude Code] -->|"HTTP on 127.0.0.1<br/>ANTHROPIC_BASE_URL"| G
|
|
168
|
+
|
|
169
|
+
subgraph G[EgressVeil local gateway]
|
|
170
|
+
direction TB
|
|
171
|
+
H[Host / Origin / size checks] --> P[Anthropic parser<br/>every string field]
|
|
172
|
+
P --> D[Secret & token detectors]
|
|
173
|
+
D --> E[Policy engine]
|
|
174
|
+
E -->|REDACT| R[Redactor]
|
|
175
|
+
E -->|BLOCK or uninspectable| X[Local 400 error]
|
|
176
|
+
E -.-> L[(Audit log<br/>no raw values)]
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
R -->|verified TLS, allowlisted host| U[api.anthropic.com]
|
|
180
|
+
E -->|ALLOW / LOG_ONLY| U
|
|
181
|
+
U -->|streamed response| A
|
|
182
|
+
|
|
183
|
+
T[Other agent traffic:<br/>shell, web fetch, MCP, git] -. "NOT inspected" .-> I((Internet))
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Each control, and whether it is implemented, is described in
|
|
187
|
+
[docs/security-design.md](docs/security-design.md).
|
|
188
|
+
|
|
189
|
+
## Installation
|
|
190
|
+
|
|
191
|
+
EgressVeil requires Python 3.11 to 3.14 and runs on Windows, macOS and Linux.
|
|
192
|
+
|
|
193
|
+
The recommended way to install it is with [pipx](https://pipx.pypa.io/),
|
|
194
|
+
which puts the CLI in its own isolated environment:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
pipx install "git+https://github.com/qmmughal/egressveil.git@v0.2.0"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Or with pip, into the virtual environment of your choice:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pip install "egressveil @ https://github.com/qmmughal/egressveil/releases/download/v0.2.0/egressveil-0.2.0-py3-none-any.whl"
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Every release file on the [Releases page](https://github.com/qmmughal/egressveil/releases)
|
|
207
|
+
is built by GitHub Actions and has signed build provenance. You can verify a
|
|
208
|
+
download with:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
gh attestation verify egressveil-0.2.0-py3-none-any.whl --repo qmmughal/egressveil
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
A PyPI package (`pip install egressveil`) is planned. See [docs/releasing.md](docs/releasing.md).
|
|
215
|
+
|
|
216
|
+
To work on EgressVeil itself, install it from source:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
git clone https://github.com/qmmughal/egressveil.git
|
|
220
|
+
cd egressveil
|
|
221
|
+
python -m venv .venv
|
|
222
|
+
# Windows: .venv\Scripts\activate
|
|
223
|
+
# Linux/macOS: source .venv/bin/activate
|
|
224
|
+
python -m pip install -e ".[dev]"
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow.
|
|
228
|
+
|
|
229
|
+
## Usage
|
|
230
|
+
|
|
231
|
+
```console
|
|
232
|
+
$ egressveil serve
|
|
233
|
+
EgressVeil 0.2.0 gateway
|
|
234
|
+
listening http://127.0.0.1:8787
|
|
235
|
+
upstream https://api.anthropic.com
|
|
236
|
+
mode strict
|
|
237
|
+
audit log /home/you/.egressveil/audit.jsonl
|
|
238
|
+
note: not implemented yet, no effect: internal_hostnames, pii
|
|
239
|
+
|
|
240
|
+
Point Claude Code at the gateway:
|
|
241
|
+
export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
|
|
242
|
+
|
|
243
|
+
Press Ctrl+C to stop.
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Scan files before you share them with an agent:
|
|
247
|
+
|
|
248
|
+
```console
|
|
249
|
+
$ egressveil scan .env deploy/notes.md
|
|
250
|
+
.env:3:16: BLOCK secrets/env_file_assignment
|
|
251
|
+
deploy/notes.md:12:9: BLOCK secrets/aws_access_key_id
|
|
252
|
+
2 finding(s).
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The exit status is 0 when nothing is found, 1 when there are findings, and
|
|
256
|
+
2 when a file can't be read.
|
|
257
|
+
|
|
258
|
+
Validate configuration, or check your environment:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
egressveil config validate --config configs/egressveil.example.yaml
|
|
262
|
+
egressveil doctor
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Each audit event is one JSON line:
|
|
266
|
+
|
|
267
|
+
```json
|
|
268
|
+
{"ts":"2026-11-16T09:12:03.512+00:00","request_id":"ev_3c1f0a9e2b7d4c11","provider":"anthropic","method":"POST","path":"/v1/messages","outcome":"block","reason":"policy","route":"json_inspect","inspected":true,"bytes_in":48211,"findings":[{"detector":"secrets","rule_id":"aws_access_key_id","location":"messages[4].content[0].content[0].text","action":"BLOCK","digest":"9f2c4be01a7d33e8"}]}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Configuration is discovered in this order: `--config PATH`, then
|
|
272
|
+
`$EGRESSVEIL_CONFIG`, then `./egressveil.yaml`, then the user config directory
|
|
273
|
+
(`%APPDATA%\egressveil\` on Windows, `~/Library/Application Support/egressveil/`
|
|
274
|
+
on macOS, `~/.config/egressveil/` on Linux), and finally the built-in defaults.
|
|
275
|
+
All options are documented in
|
|
276
|
+
[configs/egressveil.example.yaml](configs/egressveil.example.yaml).
|
|
277
|
+
|
|
278
|
+
## Integration compatibility
|
|
279
|
+
|
|
280
|
+
| Agent | Status | Routing mechanism | Coverage |
|
|
281
|
+
| --- | --- | --- | --- |
|
|
282
|
+
| **Claude Code** | **Available (pre-alpha)** | `ANTHROPIC_BASE_URL=http://127.0.0.1:8787` | Anthropic Messages API calls only. Not tool, shell, web or MCP traffic |
|
|
283
|
+
| **Aider** | Partial: Anthropic models only | `ANTHROPIC_BASE_URL`. OpenAI-compatible models need Phase 2 | LLM API calls only |
|
|
284
|
+
| **OpenClaw** | Future | To be determined | Not supported yet |
|
|
285
|
+
| **Cursor** | Limited and experimental | Most model traffic goes through Cursor's own backend | Expected to be partial at best. See the docs |
|
|
286
|
+
|
|
287
|
+
Routing details and their limitations are in [docs/integrations.md](docs/integrations.md).
|
|
288
|
+
|
|
289
|
+
## Security limitations
|
|
290
|
+
|
|
291
|
+
- Coverage is limited to API calls that a supported agent sends to the
|
|
292
|
+
gateway. An agent, plugin or tool that ignores the base-URL setting, or that
|
|
293
|
+
makes its own network calls, bypasses EgressVeil.
|
|
294
|
+
- Detection is heuristic. Encoded, split or novel secrets can get through,
|
|
295
|
+
and false positives happen. PII and internal hostnames are **not** detected
|
|
296
|
+
yet.
|
|
297
|
+
- Images and PDFs cannot be inspected. Strict mode blocks them unless you
|
|
298
|
+
set `gateway.allow_opaque_content: true`.
|
|
299
|
+
- Model responses are not inspected.
|
|
300
|
+
- The gateway connects directly to the upstream and does not use
|
|
301
|
+
`HTTPS_PROXY`.
|
|
302
|
+
- EgressVeil does not perform TLS interception and does not install a root CA.
|
|
303
|
+
- A local process running as your user can reconfigure or bypass EgressVeil.
|
|
304
|
+
It does not defend against malware on your machine.
|
|
305
|
+
|
|
306
|
+
To report a vulnerability, see [SECURITY.md](SECURITY.md).
|
|
307
|
+
|
|
308
|
+
## Roadmap
|
|
309
|
+
|
|
310
|
+
| Phase | Focus |
|
|
311
|
+
| --- | --- |
|
|
312
|
+
| 0, done | Repository, packaging, CI, config schema, CLI, doctor, threat model |
|
|
313
|
+
| **1, current** | Anthropic gateway for Claude Code: streaming proxy, secret and token detectors, policy, redaction, audit, `scan` |
|
|
314
|
+
| 2 | OpenAI-compatible parser for Aider, PII and hostname detectors, agent launcher |
|
|
315
|
+
| 3 | OpenClaw, experimental Cursor support, policy packs, response inspection |
|
|
316
|
+
|
|
317
|
+
See [docs/roadmap.md](docs/roadmap.md).
|
|
318
|
+
|
|
319
|
+
## Contributing and support
|
|
320
|
+
|
|
321
|
+
Contributions of any size are welcome, including detectors, false-positive
|
|
322
|
+
reports, docs and integrations. Please read [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
323
|
+
and the [Code of Conduct](CODE_OF_CONDUCT.md). For questions, see
|
|
324
|
+
[SUPPORT.md](SUPPORT.md). Never include real credentials in issues, tests or
|
|
325
|
+
fixtures.
|
|
326
|
+
|
|
327
|
+
## License
|
|
328
|
+
|
|
329
|
+
EgressVeil is free software, released under the [MIT License](LICENSE).
|
|
330
|
+
© 2026 EgressVeil contributors.
|