hyeonsangjeon/pyveil

GitHub: hyeonsangjeon/pyveil

pyveil 是一款零依赖的 Python 中间件,用于在数据到达 LLM、工具调用或日志之前对 PII 和密钥进行本地脱敏。

Stars: 3 | Forks: 0

# pyveil:面向 Python AI agent 的 PII 和密钥脱敏中间件

在敏感数据到达 LLM、工具、MCP 资源、内存存储、日志或 trace 之前将其拦截。

PyPI version Tests Python 3.8 to 3.14 Zero core dependencies Typed package Synthetic evaluation: 39 cases passing MIT license

文档 · 指南 · 评估 · PyPI · 实用手册 · 检测参考 · 支持 · 安全

`pyveil` 是一款面向 LLM 应用和 AI agent 的本地化、无依赖脱敏中间件。它会在数据跨越应用边界之前,将高置信度的 PII 和凭据替换为确定性的、作用域内的 HMAC 占位符。 | 原始应用上下文 | 发送至模型的上下文 | | --- | --- | | `Email alice@example.com` | `Email [EMAIL:a13f7c91b0d2]` | | `api_key: sk-proj-...` | `api_key: [API_KEY:38ded98a17e7]` | | `Authorization: Bearer ...` | `[AUTH_HEADER:4fe2926b7d20]` | 无网络调用。无可逆存储库。默认情况下,检测结果中不包含原始值。 ## 试用 ``` pip install pyveil pyveil demo # 或:python -m pyveil demo ``` 或在隔离环境中运行合成演示: ``` uvx pyveil demo ``` ``` before: Email alice@example.com, call 010-1234-5678, and use API key sk-proj-... after: Email [EMAIL:...], call [PHONE:...], and use API key [API_KEY:...] found: API_KEY, EMAIL, PHONE ``` ## 从你的集成开始 选择你需要的边界,并从一个可运行的示例开始。无密钥路径使用合成输入,并在发起 provider 请求前停止。 | 你正在使用 | 安装 | 从这里开始 | 受保护的边界 | | --- | --- | --- | --- | | OpenAI Agents SDK | `pip install pyveil openai-agents` | [预分发 Runner 包装器](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/openai_agents_guardrail.py) | 在 `Runner.run` 之前对输入进行脱敏;当前的 SDK 需要 Python 3.10+ | | LiteLLM SDK 或 Proxy | `pip install pyveil litellm` 或 `pip install pyveil "litellm[proxy]"` | [SDK 包装器和 Proxy 预调用 hook](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/litellm_proxy_filter.py) | 在 `completion(...)` 或 proxy provider 分发之前对消息进行脱敏;当前的 LiteLLM 需要 Python 3.10+ | | OpenAI Responses API | `pip install "pyveil[openai]"` | [无密钥契约指南](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/openai.md) | 在 `client.responses.create(...)` 之前的精确输入 | | Anthropic / Claude | `pip install "pyveil[anthropic]"` | [无密钥契约指南](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/anthropic.md) | 在 `client.messages.create(...)` 之前的精确内容 | | Azure OpenAI | `pip install "pyveil[azure-openai]"` | [环境和 YAML 示例](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/azure_openai.py) | Azure Responses API 请求之前的 prompt | | Ollama | `pip install "pyveil[ollama]"` | [本地端到端指南](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/ollama.md) | 本地模型调用之前的 prompt | | MCP | `pip install pyveil` | [Server 包装器](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/mcp_server_wrapper.py) | agent 上下文之前的工具结果和资源内容 | | FastAPI、日志或内存 | `pip install pyveil` | [实用手册](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/cookbook.md) | 请求 payload、日志记录和内存写入 | 在生产使用之前,请确认支持的[检测形态](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/redaction-reference.md)并阅读[安全契约](https://github.com/hyeonsangjeon/pyveil/blob/main/SECURITY.md)。这些示例演示了如何放置边界;它们并不宣称具有完美的 PII 召回率或合规性。 ### OpenAI Agents 和 LiteLLM 并排对比 | | OpenAI Agents SDK | LiteLLM Python SDK | LiteLLM Proxy | | --- | --- | --- | --- | | 检测点 | `Runner.run` 之前 | `litellm.completion` 之前 | provider 分发之前的 `async_pre_call_hook` | | 输入 | 字符串或结构化的 agent 输入 | 消息列表 | 当作为列表时的 `data["messages"]` | | 安全输出 | 传递给 `Runner.run` 的相同结构 | 传递给 `completion(...)` 的已脱敏消息列表 | 带有已脱敏 `messages` 的 payload 副本 | | 绕过风险 | 直接调用 `Runner.run` | 直接调用 `completion(...)` | 非消息 payload 和字段 | | 示例限制 | 不涵盖后续的工具、内存、日志或 trace | 不涵盖其他 LiteLLM API | 仅处理 completion 风格的 `messages` | 查看[完整对比](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/openai-agents-vs-litellm.md)以获取安装命令、失败行为、预期输出、检测器范围和安全限制。 ## 保护 LLM 调用 将 `pyveil` 直接放置在 provider 调用之前。相同的代码适用于 OpenAI、Azure OpenAI、Anthropic、Gemini、LiteLLM 或内部网关。 ``` from pyveil import Channel, Veil veil = Veil.high( secret=b"tenant-or-run-secret", scope="tenant/session", ) messages = [ {"role": "user", "content": "Email alice@example.com about my account."}, ] safe = veil.redact_data(messages, channel=Channel.PROMPT_INPUT) response = call_llm(safe.data) # Your provider SDK call ``` provider 会接收到相同的列表和字典结构,敏感值在序列化或传输之前已被替换。 ## OpenAI 和 Claude:经过契约测试的无密钥模板 安装特定于 provider 的模板,而无需将任一 SDK 添加到 pyveil 的零依赖核心中: ``` pip install "pyveil[openai]" # OpenAI Responses API pip install "pyveil[anthropic]" # Claude Messages API ``` 这两种集成都会在最终的 SDK 边界进行本地脱敏,并返回确切的 provider 输入以供检查: ``` from pyveil.integrations.openai import ask_openai, load_settings settings = load_settings() result = ask_openai( "Write a follow-up for alice@example.com or 010-1234-5678.", settings, ) print(result.redacted_input) # exact client.responses.create(...) input print(result.output_text) ``` ``` from pyveil.integrations.anthropic import ask_anthropic, load_settings settings = load_settings() result = ask_anthropic( "Write a follow-up for alice@example.com or 010-1234-5678.", settings, ) print(result.redacted_input) # exact client.messages.create(...) content print(result.output_text) ``` 无需 API key 即可证明任一边界: ``` PYVEIL_SECRET=docs-demo-secret OPENAI_MODEL=gpt-5.6-luna \ python -m pyveil.integrations.openai --dry-run PYVEIL_SECRET=docs-demo-secret ANTHROPIC_MODEL=claude-haiku-4-5 \ python -m pyveil.integrations.anthropic --dry-run ``` ``` sent-to-openai: ... [EMAIL:17c25f8a4fe3] ... [PHONE:3f6dc5a3c9f3]. sent-to-anthropic: ... [EMAIL:0b77abd1b26b] ... [PHONE:ec56e2456ba2]. provider-response: skipped (--dry-run) ``` 该代码库还通过本地 mock HTTP transport 运行了真实的官方 SDK,并针对序列化后的 `/v1/responses` 和 `/v1/messages` JSON body 进行断言。这些测试不使用凭据,不发起网络请求,也不会产生 provider 费用。**并未**声明进行了真实的付费 API 调用。 历史 provider 模型不是免费的备用方案,可能会被淘汰;请保持 model ID 可配置,并使用 dry-run 或 mock 契约进行无成本检查。 当前的 OpenAI 和 Anthropic SDK 需要 Python 3.9+。pyveil 核心以及两条无密钥 dry-run 路径仍与 Python 3.8 到 3.14 兼容。请使用已提交的 [OpenAI 指南](docs/integrations/openai.md)和 [Anthropic / Claude 指南](docs/integrations/anthropic.md)了解配置、离线验证和边界说明。 ## Ollama:本地端到端 在相同的脱敏边界后运行本地模型。可选的集成使用 Ollama 官方的 Python 客户端,默认使用 `qwen3.5:4b`,这是一个 Q4_K_M 4.7B 模型,在配备 4K 上下文的 16GB Apple silicon Mac 上可以轻松运行: ``` pip install "pyveil[ollama]" ollama pull qwen3.5:4b ``` ``` from pyveil.integrations.ollama import ask_ollama, load_settings settings = load_settings() # OLLAMA_* + PYVEIL_* environment variables result = ask_ollama( "Write a follow-up for alice@example.com or 010-1234-5678.", settings, ) print(result.redacted_input) # The exact prompt sent to Ollama print(result.output_text) # The local model response ``` 无需加载模型即可证明边界: ``` PYVEIL_SECRET=docs-demo-secret \ python -m pyveil.integrations.ollama --dry-run ``` ``` mode: dry-run model: qwen3.5:4b host: http://127.0.0.1:11434 sent-to-ollama: Write a one-sentence support follow-up for [EMAIL:71c6727a7fa2] or [PHONE:b4b889df07ce]. findings: EMAIL=1, PHONE=1 ollama-response: skipped (--dry-run) ``` 要进行实时本地调用,请设置 `PYVEIL_SECRET` 并运行该模块。配置优先级依次为:进程环境变量、`.env`、YAML,最后是默认值: ``` PYVEIL_SECRET=a-long-random-hmac-secret \ python -m pyveil.integrations.ollama python -m pyveil.integrations.ollama \ --config examples/ollama.example.yaml --env-file .env ``` 已提交的 [`.env` 模板](examples/ollama.env.example)和 [YAML 模板](examples/ollama.example.yaml)公开了模型、主机、上下文、输出长度、temperature、timeout 和 keep-alive。pyveil 将默认上下文限制为 4096,并使用 `keep_alive=0`,以便单次调用能释放模型内存;设置 `OLLAMA_KEEP_ALIVE=5m` 可以加快重复调用的速度。 在此项目的 M1 Mac mini(16GB 内存,Ollama 0.31.2)上观察到的情况:在 4096-token 上下文下,`qwen3.5:4b` 使用了约 3.2GB 内存,冷请求耗时 8.1 秒,热请求耗时 1.3 秒。这些是本地测量结果,并非可移植的性能保证。请参阅 [Ollama 集成指南](docs/integrations/ollama.md)了解完整的设置和内存权衡。 ## Azure OpenAI:端到端 安装可选的 Azure 示例依赖项,然后从环境变量、`.env` 或 YAML 加载配置: ``` pip install "pyveil[azure-openai]" ``` ``` from pyveil.integrations.azure_openai import ask_azure_openai, load_settings settings = load_settings() # AZURE_OPENAI_* + PYVEIL_* environment variables result = ask_azure_openai( "Write a follow-up for alice@example.com or 010-1234-5678.", settings, ) print(result.redacted_input) # The exact text sent to Azure OpenAI print(result.output_text) # The model response ``` 该集成使用 Azure OpenAI 的 v1 端点和 Responses API。部署名称作为 `model` 传递;pyveil 会在 `client.responses.create(...)` 运行之前对 prompt 进行脱敏。 无需 Azure 请求即可证明边界: ``` PYVEIL_SECRET=docs-demo-secret \ python -m pyveil.integrations.azure_openai --dry-run ``` ``` mode: dry-run deployment: not configured sent-to-azure: Write a one-sentence support follow-up for [EMAIL:347ab11285a3] or [PHONE:548017338f6f]. findings: EMAIL=1, PHONE=1 azure-response: skipped (--dry-run) ``` 要进行实时调用,请导出 `AZURE_OPENAI_ENDPOINT`、`AZURE_OPENAI_DEPLOYMENT`、`AZURE_OPENAI_API_KEY`、`PYVEIL_SECRET` 以及可选的 `PYVEIL_SCOPE`,或者使用已提交的 [`.env` 模板](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/azure_openai.env.example) 和 [YAML 模板](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/azure_openai.example.yaml): ``` python -m pyveil.integrations.azure_openai --env-file .env python -m pyveil.integrations.azure_openai \ --config examples/azure_openai.example.yaml --env-file .env ``` 进程环境变量会覆盖 `.env`,而后者会覆盖非机密的 YAML 设置。如果将 API key 和 pyveil HMAC 密钥直接放在 YAML 中,将会被拒绝;YAML 仅指定包含它们的环境变量。

pyveil redacts synthetic PII and secrets before an AI agent boundary

## 为什么选择 pyveil | 需求 | pyveil 提供的功能 | | --- | --- | | 保持数据本地化 | 标准库核心,零必需依赖,零网络调用 | | 保留引用 | 基于 HMAC-SHA256 生成的稳定 `[TYPE:12hex]` 占位符 | | 隔离租户和运行实例 | 调用者定义的 `scope` 会跨边界更改占位符 | | 脱敏真实的 agent payload | 递归处理字典、列表、元组和 JSON 字符串 | | 覆盖范围超越 prompt | 面向工具、MCP、内存、日志、trace、输入和输出的策略通道 | | 阻止工具调用中的凭据 | 默认拦截 Auth header、私钥、API key、JWT 和 token | | 覆盖应用特定数据 | 精确的已知值和受信任的自定义 regex 规则 | | 审计而不泄露 | 检测结果包含类型、规则、路径、占位符和指纹,而不是原始值 | | 验证支持的行为 | 公开的 39 例合成回归语料库、评估器和 CI 门控 | ## 可复现的证据 该代码库提供了一个公开的合成检测器语料库和一个基于标准库的评估器: ``` python evaluation/evaluate.py --check ``` 对于语料库 v1,pyveil 0.2.5 匹配了 39 个用例(33 个正例,6 个负例)中的所有 36 个预期结果,没有出现语料库误报、漏报、标记值泄露或非空的 `Finding.raw` 值。 该代码库还提供了一个机器可读的[防护面契约](compatibility/README.md),其中包含每个通道的合成 fixture、一个在 manifest 或文档发生偏移时会失败的验证器,以及一份隐私安全的证据凭证: ``` python scripts/validate_compatibility.py --check # manifest, fixtures, and docs agree python -m pytest tests/test_compatibility_surfaces.py python scripts/verify_zero_dependencies.py # 0 runtime dependencies ``` 这些数字仅描述了文档记录的支持形态。它们**不是**真实世界的 PII 召回基准,也不涵盖未知的姓名、地址、语言、文档或图像。请阅读[方法和限制](https://hyeonsangjeon.github.io/pyveil/evaluation.html)。 ## 已知名称和域 ID Regex 无法发现任意名称或地址。当你的应用已经知道某个值是敏感的时,无需添加 NER 模型即可将该值告知 `pyveil`: ``` from pyveil import CustomRule, Veil rules = [ CustomRule.exact("PERSON", ["Alice Kim", "Hong Gildong"]), CustomRule("CUSTOMER_ID", r"\bCUS-[A-Z0-9]{8}\b", rule_id="customer_id"), ] veil = Veil.high( secret=b"tenant-secret", scope="tenant/session", rules=rules, ) result = veil.redact_text("Alice Kim owns CUS-A1B2C3D4.") print(result.text) # [PERSON:...] 拥有 [CUSTOMER_ID:...]。 ``` 自定义模式是受信任的应用程序代码。请保持其范围狭窄,并针对真实的正负样本进行测试。 ## Agent 边界 经典的脱敏通常止步于文本输入。Agent 会在多个层面上传输数据,因此通道是第一-class 的策略输入: | 通道 | 脱敏时机(在...之前) | | --- | --- | | `prompt.input` | 用户、RAG 或应用上下文到达模型 | | `prompt.output` | 模型输出被展示或链式调用 | | `tool.call.arguments` | 模型控制的工具执行 | | `tool.call.result` | 工具输出返回给模型 | | `mcp.resource.content` | MCP 资源内容进入上下文 | | `memory.write` | 文本被嵌入或化 | | `trace.span.attributes` | 属性通过遥测离开 | | `log.record` | 记录到达处理器或外部接收器 | ``` user / retrieval / tool / resource data | pyveil | model / tool / MCP / memory / trace / log boundary ``` 上述每个通道都有对应的合成 fixture 和在[兼容性契约](compatibility/README.md)中的可复现命令,并总结在一份隐私安全的[兼容性证明凭证](compatibility/receipt.md)中,该凭证记录了脱敏计数和输出哈希,绝不包含原始值。 ## 检测面板 核心检测刻意保持保守且高精确度: | 类型 | 示例 | HIGH 级别输出 | | --- | --- | --- | | `EMAIL` | 电子邮件地址 | `[EMAIL:12hex]` | | `PHONE` | 韩国、带分隔符的国际格式以及紧凑型 E.164 电话格式 | `[PHONE:12hex]` | | `CREDIT_CARD` | 通过 Luhn 校验的卡号 | `[CREDIT_CARD:12hex]` | | `JWT` | 紧凑型 JSON Web Token | `[JWT:12hex]` | | `AUTH_HEADER` | Bearer 和 Basic 授权标头 | `[AUTH_HEADER:12hex]` | | `PRIVATE_KEY` | PEM 私钥块 | `[PRIVATE_KEY:12hex]` | | `API_KEY` | OpenAI、GitHub、Slack、Google 和 AWS 风格的密钥 | `[API_KEY:12hex]` | | `URL_QUERY_SECRET` | token、key、secret、code 和 auth 查询值 | `[URL_QUERY_SECRET:12hex]` | | `KV_SECRET` | password、cookie、secret 和 token 键值对 | `[KV_SECRET:12hex]` | | 自定义 | 已知值和应用 regex 规则 | `[YOUR_TYPE:12hex]` | 请参阅[完整脱敏参考](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/redaction-reference.md)了解示例、验证规则、LOW 级别脱敏输出和限制。 ## HIGH 和 LOW 级别 在模型、agent、工具、MCP、内存、trace 和外部日志边界使用 `HIGH`。它会生成稳定的 HMAC 占位符,例如 `[EMAIL:a13f7c91b0d2]`。 仅在需要保留形状以供人类查看的预览场景中使用 `LOW`: ``` alice@example.com -> al***@e******.com 010-1234-5678 -> 010-****-5678 4242 4242 4242 4242 -> **** **** **** 4242 ``` 类似凭据的值在两个级别中都会保持严格的隐藏状态。 ## 策略 默认的 high 策略会对支持的检测结果进行脱敏,并拦截 `tool.call.arguments` 中的凭据: ``` from pyveil import Action, Channel, Entity, Policy, Veil policy = Policy.default_high().override( Channel.PROMPT_INPUT, Entity.EMAIL, Action.PASS, ) veil = Veil.high(secret=b"tenant-secret", policy=policy) ``` 当同时提供 `policy` 和 `level` 时,显式的策略将决定通道级别和操作。为每个租户、会话或运行构建一个 `Veil` 并重复使用。 ## CLI 使用 stdin 处理 shell 管道,使用文件进行预检,使用 JSON 输出进行结构化自动化: ``` export PYVEIL_SECRET="tenant-or-run-secret" export PYVEIL_SCOPE="tenant/session" printf 'Email alice@example.com' | pyveil redact - pyveil redact request.json --channel tool.call.result --format json pyveil scan prompt.txt --format json pyveil init pyveil test-config pyveil.yaml ``` `scan` 会输出不包含敏感原始值的检测元数据。JSON 形态的输入会被结构化地解析和遍历。 ## 集成方案 | 技术栈或边界 | 可直接复制的示例 | | --- | --- | | 任何 LLM provider | [Provider 中立的客户端包装器](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/llm_client_boundary.py) | | OpenAI Agents SDK | [预分发 `Runner.run` 包装器](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/openai_agents_guardrail.py) | | OpenAI Responses API | [可安装的集成](https://github.com/hyeonsangjeon/pyveil/blob/main/pyveil/integrations/openai.py)和[无密钥契约指南](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/openai.md) | | Anthropic / Claude | [可安装的集成](https://github.com/hyeonsangjeon/pyveil/blob/main/pyveil/integrations/anthropic.py)和[无密钥契约指南](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/integrations/anthropic.md) | | Azure OpenAI | [可运行的环境/YAML 集成](https://github.com/hyeonsangjeon/pyveil/blob/main/pyveil/integrations/azure_openai.py)和[简短示例](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/azure_openai.py) | | LiteLLM | [SDK 包装器和 Proxy 预调用 hook](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/litellm_proxy_filter.py) | | FastAPI | [请求中间件示例](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/fastapi_middleware.py) | | MCP | [Server 包装器](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/mcp_server_wrapper.py)和[集成指南](https://hyeonsangjeon.github.io/pyveil/manual.html#integrations) | | Python logging | [日志过滤器示例](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/log_filter.py) | | Agent 内存 | [嵌入前示例](https://github.com/hyeonsangjeon/pyveil/blob/main/examples/memory_write.py) | [实用手册](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/cookbook.md)涵盖了 prompt、工具、MCP、内存、日志记录、trace、JSON 和 CLI 工作流。 ## 选择合适的工具 当你想要一个小巧的本地边界过滤器,用于在 agent 上下文流中对结构化 PII、凭据、已知值和域标识符进行过滤时,请选择 `pyveil`。 当你需要对未知人员、组织、位置或地址进行广泛的语义发现时,请选择 Presidio、GLiNER 或其他基于 NER 的系统。 当你需要托管策略、文档/图像覆盖、事件工作流或合规性报告时,请选择企业级 DLP 产品。 这些工具可以分层叠加。`pyveil` 不承诺完美的召回率。 请参阅完整的 [pyveil 与 Presidio、NER、guardrails 和 DLP 的决策指南](https://hyeonsangjeon.github.io/pyveil/guides/pyveil-vs-presidio.html)。 ## 安全契约 - 默认情况下,原始敏感值不会存储在 `Finding` 对象中。 - 占位符使用带有调用方提供的 secret 和 scope 的 HMAC-SHA256。 - 类似凭据的值可以在模型控制的工具执行之前被拦截。 - `max_input_chars` 限制了对文本和结构化 payload 执行的工作量。 - 核心不进行网络调用,也没有必需的第三方依赖。 - pyveil 没有可逆存储库或解掩码 API。 `pyveil` 并非合规性保证、企业 DLP 系统、密钥扫描替代品或 prompt 注入防火墙。在生产使用之前,请阅读[威胁模型](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/threat-model.md)、[已知限制](https://github.com/hyeonsangjeon/pyveil/blob/main/docs/known-limitations.md)和[安全策略](https://github.com/hyeonsangjeon/pyveil/blob/main/SECURITY.md)。 ## 指南 - [完整手册](https://hyeonsangjeon.github.io/pyveil/manual.html) - [Python LLM PII 脱敏指南](https://hyeonsangjeon.github.io/pyveil/guides/python-llm-pii-redaction.html) - [MCP PII 脱敏指南](https://hyeonsangjeon.github.io/pyveil/guides/mcp-pii-redaction.html) - [pyveil 与 Presidio / NER / DLP 对比](https://hyeonsangjeon.github.io/pyveil/guides/pyveil-vs-presidio.html) - [可复现的检测器评估](https://hyeonsangjeon.github.io/pyveil/evaluation.html) - [英文视频指南](https://github.com/hyeonsangjeon/pyveil/releases/download/v0.1.2/pyveil-usage-guide-en.mp4) - [韩文视频指南](https://github.com/hyeonsangjeon/pyveil/releases/download/v0.1.2/pyveil-usage-guide-ko.mp4) - 面向编码 agent 的 [AGENTS.md](https://github.com/hyeonsangjeon/pyveil/blob/main/AGENTS.md) - 面向 LLM 可读导航的 [llms.txt](https://hyeonsangjeon.github.io/pyveil/llms.txt) - [贡献指南](https://github.com/hyeonsangjeon/pyveil/blob/main/CONTRIBUTING.md) ## 开发 ``` uv run --extra dev ruff check . uv run --extra dev mypy pyveil tests uv run --extra test pytest uv run --extra test python evaluation/evaluate.py --check ``` CI 在 Python `3.8` 到 `3.14` 上运行测试套件。核心保持类型化、无依赖且基于 MIT 许可证。
标签:AI风险缓解, Python, 人工智能, 敏感信息脱敏, 无后门, 用户模式Hook绕过, 网络安全, 逆向工具, 隐私保护