安全
密钥不进聊天 句句有依据
这一页讲清楚:Tofu 保管什么、从不保管什么,你批准后 agent 能做什么,部署前的安全检查具体看哪些内容。每一条旁边,都写明了它的局限。
- MAIL_API_KEYsecret••••Qm7xProdPreview
- SMS_API_KEYsecret••••c9d2Prod
- NEXT_PUBLIC_SITE_URLhttps://frankskitchen.comProdPreviewDev
- DATABASE_URLmanaged••••••ProdPreview
Secrets are write-only — once saved, the value is hidden and never shown again.
- key
- "SMS_API_KEY"
- secret
- true
- value
- null
- preview
- "••••c9d2"
The value went to the hosting provider, write-only.
有些东西,永远到不了 Tofu 所以也不可能从 Tofu 泄露
最敏感的信息,都留在各自的服务商那里:你的托管服务商、Google 或 GitHub、DNS 服务商、Stripe。
密钥内容
你保存的密钥内容
密钥内容直接交给托管服务商,之后只能写入,不能读出:控制台里看不到,Tofu 自己也读不到。Tofu 保存的是名称、作用范围和打码预览。
密码
你的账号密码
你用 Google 或 GitHub 登录。Tofu 从不替你设置或保存密码,所以也不会有密码从这里泄露。
服务商密钥
你粘贴的密钥或 token
连接服务商时,Tofu 从不要求你粘贴密钥或 token。连接 DNS 时,你在服务商的页面上批准就行。你批准后生成的授权凭据,由 Tofu 保管,也由 Tofu 撤销。
银行卡号
你的银行卡信息
你直接在 Stripe 的结账页面填写,这些信息永远到不了 Tofu。Tofu 保存的是你的套餐和订阅状态。
例外只有一个,而且由你掌控。托管数据库有一个“显示数据库密钥”的操作,只有所有者能用,会在你要求时现场重新组合出这串密钥。每用一次,都会留下一条审计记录,任何 agent 都碰不到这个操作。目前还不支持更换数据库密码。
你的 agent 替你办事 但必须先经过你批准
coding agent 连接 Tofu 的方式,跟在电视上登录视频 app 差不多:agent 在屏幕上显示一个验证码,你在自己的浏览器里登录 Tofu,核对后点批准。
你复制的安装提示词里写明了客户端和 skill 这两个文件的大小和 SHA-256 校验值。提示词会让 agent 下载后逐一核对,只要有一个对不上,就停下来,什么都不运行。
tofu · login
Approve this sign-in in your browser. The code is
7F3A-C09B-21DE
Approve only a code your own agent printed.
Connect Claude Code (MCP)?
Check that this code matches the one in your coding agent:
7F3A-C09B-21DE
agent 发起请求
agent 里的 Tofu 客户端会发起登录请求,显示一串像 XXXX-XXXX-XXXX 这样的验证码。这个请求 10 分钟内有效。先核对,再批准
认准你登录 Tofu 用的那个网址,在那里打开批准页面。页面上的验证码和你自己的 agent 显示的一模一样,才点批准。有效期 7 天
批准后,客户端会把登录凭据存在本地,只有你能读,也只对这一个 Tofu 网址有效;Tofu 那边只存它的哈希值。你随时可以在控制台的“coding agent”页面撤销它。光删掉本地文件,不算撤销。
批准之后,agent 能做什么
This connection can upload your app’s source or import it from a public GitHub repository, download your app’s code into a new folder on your computer when the agent runs there, get the link that opens your app in Tofu’s builder, which you open yourself, run the safety check, deploy it — its build runs any migration step it has — once you have a hosting plan, save and remove your app’s public settings — an address, a feature flag, a key meant to be public — when the agent runs on your computer, but never a hidden value, which you type yourself in Keys & settings, create the app’s managed database, on its own or in the same call as a deploy, which Tofu runs and pays for as part of your plan, read the app’s build and runtime diagnostics, restore a previous deployment, connect, verify, release or withdraw the authorization for a domain you already own, read domain quotes and prepare a dashboard link for you to review a fresh price, agreements and payment when the agent runs on your computer — it cannot place an order or submit payment, read the stored status of domains you bought through Tofu and ask the registrar to send its confirmation email again to the registrant, without seeing your owner details or changing renewal settings, read and add DNS records on a domain you bought through Tofu, and delete one of yours — never its mail (MX) or verification (TXT) records, which stay with you, read your app’s own traffic — the first read for an app that has no counter yet issues its key — and turn that counter on or off, read whether your app is answering its visitors, and turn Tofu’s emails about it on or off, change how your app’s users sign in and how its sign-in email is sent, see who has an account in your app, add a person by email or remove one — which signs them out — choose whether anyone can sign up or only the people you add, and make the app private — only people with a link can open it — or open to everyone again, send a short message to up to ten of your app’s users, from your app’s own email address, get an invite link that lets one person into your private app — you hand the link out yourself, and the first person who opens it gets in for up to 30 days — list the links you made and turn one off again, choose who can open your app — anyone with the link, only people you list by email, or anyone with a code you share, which puts a sign-in page in front of the whole app — add or remove those people, make a new code, sign everyone out, and keep exact paths open for services like webhooks, connect your app to your own Stripe account when the agent runs on your computer — you install Tofu’s app on Stripe’s own page — then create payment links there, pass their payment events to the app or disconnect it, with the money going straight to you and nothing in its reach that moves money out of your account, set up email your app sends from its own address, pause it, give it a new key or remove it, when the agent runs on your computer — Tofu writes the app’s sending key into its settings, and nothing is sent until the app sends email itself, restore an archived database into a new one Tofu runs and pays for as part of your plan, and hand you a short-lived link to download its archive, keep a database Tofu warned you about from being archived for going unused, list your database’s daily backups and ask a person at Tofu to put it back to one, which loses what was saved after it, see which of your app’s database setup steps are done, choose whether Tofu runs them for an app, and mark one as done so it never runs, when the agent runs on your computer, delete an app — the source you uploaded is kept until you ask Tofu to erase it — or its database, with nothing kept, send Tofu’s team a problem report you approved word for word, with your app’s status attached, sign in to Tofu, read the account’s id and email address, report the plan and the account’s GitHub state, and turn automatic updates off.
It cannot buy, renew or transfer a domain, submit a payment, read domain owner details, an environment value or a database password or connection string, change your plan or billing, or import a private repository from GitHub. Those stay with you.
Your agent acts on your instructions, and Tofu tells it to ask for your agreement before any call that spends money, writes to a live service or destroys something. Tofu can’t see your conversation with it, so it can’t check that the agent asked: connect only agents and apps you trust, and disconnect any of them on the Coding agent page.
查过的,都写清楚 没查的,也写清楚
每次构建前,Tofu 都会检查马上要部署的那批文件。它特意只承诺一件事:查了什么就说什么,绝不夸大。
你的 agent 会用到的工具
detectsetFrameworkscan
每次部署前,先过一道关
只要发现下面任何一种情况,Tofu 就会拦下这次部署:代码里写着真实可用的密钥(不是测试用的);登录表单会把访客填的账号密码发到别的网站;有代码在收集钱包助记词。有文件读不了,也会拦下。这道关查的,正是马上要上传的那批文件。
靠规则,不靠 AI 模型
Tofu 用一套固定规则检查你上传的内容,查这些问题:暴露在外的服务密钥、没开 Row Level Security 的表、谁都能写入数据的访问策略、不验证来源的 Stripe webhook。还有已知的恶意代码特征,比如会自己解码再运行的代码、会下载并运行程序的安装脚本。可能伤害别人的问题,一发现就拦下部署:已知的恶意代码、钓鱼页面、泄露的密钥。只影响你自己 app 的做法,比如让一张表谁都能改,一律标成警告,绝不拦下部署。
每份结果都写明检查范围
结果里会写明:收到了多少个文件、实际读了其中多少个、做了哪些检查。还会附一份清单,列出所有检查都不查的风险。这份清单永远不会是空的:总有检查管不到的地方。
发现问题,还告诉你怎么修
每个问题都会写明触发了哪条规则、出在哪个文件、具体是怎么回事,还附上一段修复提示词,直接交给你的 coding agent 就行。
- 没有需要拦下部署的问题时,结果会这样写
- No blocking finding among the checks that ran.
- 一个文件都没读到时,结果会这样写
- Nothing was inspected, so this is not a pass.
能打开,才上线 上一个能用的版本继续在线
健康检查
先检查,再切换网址
构建完成后,Tofu 先访问新版本专属的网址。能打开,才把 app 的网址切到新版本。
构建失败
构建失败,线上一切照旧
上一个版本照常在线。构建过程中数据库迁移出错,也算构建失败。
回滚
一步回到旧版本,不用重新构建
回滚会把 app 的网址切回之前某个能正常打开的版本。你的数据不会跟着回退。
访问你 app 的人 只统计次数,不追踪个人
为 app 开启 Tofu 的访问统计后,页面浏览量记在 Tofu 自己的服务器上。数据归你:在控制台里查看,也能在那里关掉统计,Tofu 不会拿这些数据另作他用。
- 不在访客的浏览器里设置 cookie。
- 不往你的 app 里加第三方统计脚本。
- 不保存 IP 地址。
- 不保存完整网址:网址里 ? 和 # 后面的部分都去掉;访客从哪个网站点进来,也只记那个网站的域名。
- 访客如果开启了 Do Not Track 或 Global Privacy Control,他们的浏览不会计入统计。
- 统计数据默认保留 90 天,最长不超过 365 天;删除 app 时会一起删掉。
发现漏洞了?先告诉我们
发邮件告诉我们你发现了什么、怎样重现。请只在你自己的账号和 app 上测试,公开前先给我们留出修复的时间。
这个邮箱地址也写在 /.well-known/security.txt 里,安全研究人员用工具找联系方式时,会先查这里。
Contact: mailto:hello@trytofu.ai Expires: 2027-09-27T00:00:00.000Z Preferred-Languages: en Canonical: https://trytofu.ai/.well-known/security.txt Policy: https://trytofu.ai/security#report
Tofu 做不到的事
安全检查不能保证没有恶意代码。 安全检查只能认出已知的恶意代码特征,看不出代码想做什么;也不查 app 运行起来后做什么、数据库里存了什么,还有
package.json里没直接列出的依赖。没有详细的安全报告。 这个功能还没做出来。控制台里会如实写明,不拿示例结果充数。
接入的 agent 能访问你所有的项目,也能修改。 你批准的 agent 能做你账号能做的一切:所有项目、所有操作。用完记得到控制台的 Coding agent 页面撤销授权。
校验和只能查出下载出错,代替不了签名。 我们公布的 SHA-256 校验和,能查出下载的文件对不上或已损坏。但校验和本身也是从 Tofu 自己的网址经 HTTPS 拿到的,所以分发文件的服务器一旦被攻破,校验和也查不出来。
日志里的密钥不一定都能打码。 Tofu 显示日志时,会给看起来像密钥、密码的文字打码。但有些密钥保存后连 Tofu 也读不回原文,也就没法拿它去日志里把每一处都找出来。所以千万别让 app 把自己的密钥写进日志。
删除 app 后,上传的源码还在。 源码会一直保存在 Tofu 的私有存储里,直到你联系我们删除。
不能自己注销账号。 要注销账号,请发邮件到 hello@trytofu.ai。我们会人工处理,并告诉你删掉了哪些、哪些删不了。
没有合规认证。 Tofu 没有 SOC 2 或 ISO 27001 认证,没有公开的审计报告,也不声明服务符合 GDPR。
说说你想做什么 app,或者带上 agent 已经做好的 app。Tofu 帮你上线。
任何 coding agent 都能用
© 2026 Tofu
trytofu.ai
本页由英文翻译;如有内容冲突,请以英文原版为准。