From 2dd199b479cca032d927953e11498f3dc29df18c Mon Sep 17 00:00:00 2001 From: WaylandYang Date: Thu, 3 Sep 2026 14:48:21 +0800 Subject: [PATCH] The security notes are back, with a private address for reports Co-Authored-By: Claude Fable 5.1 --- SECURITY.md | 50 +++++++++++++++++++++++++++++++++++++++++++++-- SECURITY.zh-CN.md | 2 +- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 64517446..f242746f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,5 +1,51 @@ # Security -If you find a vulnerability in Utopia, please email **security@deeplethe.com** rather than opening a public issue. Include the affected version or commit, the endpoint or component, and steps to reproduce. +*[中文版](SECURITY.zh-CN.md)* -You will get an acknowledgement within a few days. Once a fix is released, the advisory names the reporter unless you ask otherwise. +Utopia is at v0.1. Below are the **known, unresolved** limits — not a vulnerability report, +but the places the design has not reached yet. + +## Before you put this on a public network + +**Credentials are stored in the clear.** LLM API keys and Ask-the-Data connection strings +are plain text in Postgres (`llm_settings.chat_api_key`, `data_sources.conn_string`). Anyone +who can read the database can read them. Encryption at rest is a 1.0 item; until then, keep +the system and its database inside a trusted network. + +**The default database password is `utopia`.** By default the port binds to loopback +(`127.0.0.1:1517`), so nothing outside the host can connect. If you change `UTOPIA_DB_BIND` +to expose it, change `UTOPIA_DB_PASSWORD` in `.env` first. + +**A data source is only as safe as its grants.** Registering one is a deployment-level +action, but the connection string reaches every workspace the source is granted to. Grant it +only where that database should be visible, and use a read-only database role in the string +itself — the SQL gate below is defence in depth, not a substitute for least privilege at the +source. + +## What is in place + +- **JWT signing key generated on first start** — 32 bytes from a CSPRNG, stored in the + database. No deployment shares a default key. +- **`Secure` on session cookies behind TLS** — decided from `X-Forwarded-Proto`, so local + HTTP development still works. Force it with `UTOPIA_COOKIE_SECURE=true` if your proxy + omits the header. +- **Database port bound to loopback** — `127.0.0.1:1517`; the app reaches the database over + the compose network. +- **Optional least-privilege runtime role** — set `UTOPIA_APP_DB_PASSWORD` and + `UTOPIA_MIGRATION_URL`, and the app connects as a role that can only read and write + business tables and append to the ledger, while migrations run as the owner. +- **Data sources reach only granted workspaces** — a registered database is mounted into a + knowledge base only where an explicit grant exists. Before this, any base admin could + mount any registered source, which crossed tenants. +- **Read-only gate on Ask-the-Data** — parser allowlist, read-only transaction, enforced row + limit; three layers, so a statement past the parser still cannot write. +- **Accounts are deactivated, not deleted** — `users.deactivated_at` blocks sign-in while the + ledger keeps that person's decisions attributable. +- **Passwords hashed with argon2.** + +## Reporting a vulnerability + +Email **security@deeplethe.com** rather than opening a public issue. Include the affected +version or commit, the endpoint or component, and steps to reproduce. You will get an +acknowledgement within a few days, and the release that carries the fix names you unless you +ask otherwise. diff --git a/SECURITY.zh-CN.md b/SECURITY.zh-CN.md index 274957a8..3eedc25f 100644 --- a/SECURITY.zh-CN.md +++ b/SECURITY.zh-CN.md @@ -25,4 +25,4 @@ Utopia 目前是 v0.1。下面是**已知的、尚未解决的**限制 —— ## 报告漏洞 -请开一个 issue。如果涉及可被利用的细节,先只写复现的最小信息,我们再私下沟通完整内容。 +请发邮件到 **security@deeplethe.com**,不要开公开 issue。写明受影响的版本或提交、端点或组件、复现步骤。几天内会有回复;带修复的那个版本会在说明里致谢,除非你不希望。