Elffuss BraidHub

kikocis/utopia public

The security notes are back, with a private address for reports (#252)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Changesetffe9e37e55e37bb726df2ff8dcc46327ceca2157100912e705ca6dda9358647f
AuthorWaylandYang <145302500+WaylandYang@users.noreply.github.com> · 2026-09-03 14:53 +08:00
CommitterGitHub <noreply@github.com> · 2026-09-03 14:53 +08:00
Parents7ba728bca5c7

Browse the files at this changeset

2 files changed

modified SECURITY.md +48 −2
@@ -1,5 +1,51 @@
11 # Security
22
3-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.
3+*[中文版](SECURITY.zh-CN.md)*
44
5-You will get an acknowledgement within a few days. Once a fix is released, the advisory names the reporter unless you ask otherwise.
5+Utopia is at v0.1. Below are the **known, unresolved** limits — not a vulnerability report,
6+but the places the design has not reached yet.
7+
8+## Before you put this on a public network
9+
10+**Credentials are stored in the clear.** LLM API keys and Ask-the-Data connection strings
11+are plain text in Postgres (`llm_settings.chat_api_key`, `data_sources.conn_string`). Anyone
12+who can read the database can read them. Encryption at rest is a 1.0 item; until then, keep
13+the system and its database inside a trusted network.
14+
15+**The default database password is `utopia`.** By default the port binds to loopback
16+(`127.0.0.1:1517`), so nothing outside the host can connect. If you change `UTOPIA_DB_BIND`
17+to expose it, change `UTOPIA_DB_PASSWORD` in `.env` first.
18+
19+**A data source is only as safe as its grants.** Registering one is a deployment-level
20+action, but the connection string reaches every workspace the source is granted to. Grant it
21+only where that database should be visible, and use a read-only database role in the string
22+itself — the SQL gate below is defence in depth, not a substitute for least privilege at the
23+source.
24+
25+## What is in place
26+
27+- **JWT signing key generated on first start** — 32 bytes from a CSPRNG, stored in the
28+ database. No deployment shares a default key.
29+- **`Secure` on session cookies behind TLS** — decided from `X-Forwarded-Proto`, so local
30+ HTTP development still works. Force it with `UTOPIA_COOKIE_SECURE=true` if your proxy
31+ omits the header.
32+- **Database port bound to loopback** — `127.0.0.1:1517`; the app reaches the database over
33+ the compose network.
34+- **Optional least-privilege runtime role** — set `UTOPIA_APP_DB_PASSWORD` and
35+ `UTOPIA_MIGRATION_URL`, and the app connects as a role that can only read and write
36+ business tables and append to the ledger, while migrations run as the owner.
37+- **Data sources reach only granted workspaces** — a registered database is mounted into a
38+ knowledge base only where an explicit grant exists. Before this, any base admin could
39+ mount any registered source, which crossed tenants.
40+- **Read-only gate on Ask-the-Data** — parser allowlist, read-only transaction, enforced row
41+ limit; three layers, so a statement past the parser still cannot write.
42+- **Accounts are deactivated, not deleted** — `users.deactivated_at` blocks sign-in while the
43+ ledger keeps that person's decisions attributable.
44+- **Passwords hashed with argon2.**
45+
46+## Reporting a vulnerability
47+
48+Email **security@deeplethe.com** rather than opening a public issue. Include the affected
49+version or commit, the endpoint or component, and steps to reproduce. You will get an
50+acknowledgement within a few days, and the release that carries the fix names you unless you
51+ask otherwise.
modified SECURITY.zh-CN.md +1 −1
@@ -25,4 +25,4 @@
2525
2626 ## 报告漏洞
2727
28-请开一个 issue。如果涉及可被利用的细节,先只写复现的最小信息,我们再私下沟通完整内容。
28+请发邮件到 **security@deeplethe.com**,不要开公开 issue。写明受影响的版本或提交、端点或组件、复现步骤。几天内会有回复;带修复的那个版本会在说明里致谢,除非你不希望。