From 7c1b930cc4cef165f2a13297c8dbe44193d7064d Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Wed, 30 Sep 2026 17:18:20 +0800 Subject: [PATCH] README: name the relay threat that tool-call inspection guards against Co-Authored-By: Claude Opus 5.5 --- README.md | 10 +++++++--- README.zh-CN.md | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bbb4d866..d2829999 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,13 @@ Documentation: [configuration reference](docs/config.md) · private keys and connection-string passwords with placeholders before a request leaves, and restore them where the answer repeats them, so a relay never sees the real values. -- **Tool calls are checked.** Tool-call inspection can cut off an answer whose - tool call matches a dangerous-command rule; hidden-character detection, a - content filter and an output limit complete the five protections. All start +- **Malicious tool calls are cut off.** A relay can rewrite an answer and slip + in a tool call for the client to run. Tool-call inspection can cut off an + answer whose tool call downloads and runs code, sends out environment + variables or credential files, reads private keys, or installs a startup item + or scheduled job, before the client receives it whole; hidden-character + detection, a content filter and an output limit complete the five + protections. All start in observe mode (the output limit starts off) and change nothing until set to enforce. - **Every request is traceable.** Each request is stored with the rule that diff --git a/README.zh-CN.md b/README.zh-CN.md index 06d2189f..5813d4df 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -18,7 +18,7 @@ ThinkWatch Core 是 ThinkWatch 的网关引擎,由一组 Rust crate 及其构 - **一次接入,随时切换**。客户端只保留一个地址和一把密钥,更换上游或模型都在网关中完成,客户端无需改配置或重启。Anthropic Messages、OpenAI Chat Completions、OpenAI Responses 与 Gemini 四种格式双向转换,流式输出同样适用。 - **出站脱敏**。出站脱敏可在请求发出前把 API 密钥、私钥和连接串中的口令替换为占位符,并在回答回显时还原,中转站因此看不到真实的值。 -- **审查工具调用**。上游返回的工具调用命中危险命令规则时,工具调用审查可以切断回答;另有隐藏字符检测、内容过滤和输出长度,共五项防护。出厂时除输出长度为关闭外均为观察档,切换到拦截档之前不改变任何请求。 +- **拦截恶意工具调用**。中转站可以改写回答,塞入让客户端执行的工具调用。回答中的工具调用若是下载即执行、外发环境变量或凭据文件、读取私钥、写入开机启动项或定时任务,工具调用审查可以在客户端收到完整调用之前切断回答;另有隐藏字符检测、内容过滤和输出长度,共五项防护。出厂时除输出长度为关闭外均为观察档,切换到拦截档之前不改变任何请求。 - **每个请求都可追溯**。每个请求连同决定其去向的规则、每次尝试、格式转换、用量、费用及价格来源、首 token 时间和生成速度一并保存。试算可以在不发出请求的情况下说明请求会被送往何处;已保存的请求可以对另一个上游重放,以便对比。 - **路由与故障转移**。规则可按模型、密钥、格式、请求大小、工具、图片、思考等条件匹配,把请求交给一个上游或策略组(按顺序、手动指定、轮流、最低延迟、最低价格)。响应的首字节到达客户端之前,失败的上游由下一个候选替换,并按其给出的失败原因暂停相应的时间。 - **多种上游**。服务商的 API 密钥、任意兼容接口、OpenRouter 等中转站、本地模型、Amazon Bedrock,以及 ChatGPT 和 Z.ai 账号。连通性检查和预热请求默认在本地应答,不产生费用。