Spaces:
Build error
Build error
Commit ·
643ecb7
1
Parent(s): b358392
docs(SECURITY): document the desktop application threat model
Browse filesThe single-user, localhost-only desktop build changes several security
assumptions from the multi-tenant web deployment: 127.0.0.1-only
binding, per-install random ADMIN_SECRET in the OS keychain (no
DEBUG_MODE bypass path at all, unlike the web deployment), OS-keychain
credential storage instead of .env, restricted CORS, validated dataset
imports, and signature-verified updates.
Existing web-deployment security policy is unchanged.
- SECURITY.md +29 -0
SECURITY.md
CHANGED
|
@@ -59,6 +59,35 @@ secrets in workflow logs.
|
|
| 59 |
|
| 60 |
---
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
## Supported Versions
|
| 63 |
|
| 64 |
Security fixes are applied to the current state of the `main` branch.
|
|
|
|
| 59 |
|
| 60 |
---
|
| 61 |
|
| 62 |
+
## Desktop Application Threat Model
|
| 63 |
+
|
| 64 |
+
The desktop build (in development -- see PHASE_ROADMAP.md) is single-user
|
| 65 |
+
and localhost-only, which changes several assumptions from the web
|
| 66 |
+
deployment above:
|
| 67 |
+
|
| 68 |
+
- **Backend binds to `127.0.0.1` only**, never `0.0.0.0` -- the local API is
|
| 69 |
+
not reachable from the LAN or any other device, unlike the web deployment's
|
| 70 |
+
Docker container (which correctly binds `0.0.0.0` for its context).
|
| 71 |
+
- **`ADMIN_SECRET` is generated randomly per install** and stored in the OS
|
| 72 |
+
credential store (Windows Credential Manager), not left unset. The web
|
| 73 |
+
deployment's `DEBUG_MODE` auth-bypass path for `admin.py` (documented
|
| 74 |
+
behavior: unauthenticated `POST /admin/pipeline` when `ADMIN_SECRET` is
|
| 75 |
+
unset and `DEBUG_MODE=true`) is not present in desktop builds at all --
|
| 76 |
+
there is no bypass path to accidentally leave enabled.
|
| 77 |
+
- **API keys and Neo4j credentials (when using Online mode) are stored in the
|
| 78 |
+
OS keychain**, not a plaintext `.env` file -- never written by the Python
|
| 79 |
+
backend process itself.
|
| 80 |
+
- **CORS is restricted to the desktop app's own origin**, not the GitHub
|
| 81 |
+
Pages origin used by the web deployment.
|
| 82 |
+
- **Dataset imports are validated before touching the graph** -- file
|
| 83 |
+
type/size checks, no arbitrary code execution from imported data (no
|
| 84 |
+
`eval`/`pickle` anywhere in the import path), path-traversal checks on any
|
| 85 |
+
user-supplied file path.
|
| 86 |
+
- **Update packages are signature-verified** (Ed25519) before being applied
|
| 87 |
+
-- a corrupted or tampered download will not install.
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
## Supported Versions
|
| 92 |
|
| 93 |
Security fixes are applied to the current state of the `main` branch.
|