You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SECURITY.md
+44-5Lines changed: 44 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,55 @@ Security patches go into `main` and the latest release. If you're running someth
4
4
5
5
## Reporting vulnerabilities
6
6
7
-
Found a security issue? Don't open a public GitHub issue - email [max.azatian@gmail.com](mailto:max.azatian@gmail.com) instead.
7
+
Found a security issue? Don't open a public GitHub issue - email [max.azatian@gmail.com](mailto:max.azatian@gmail.com)
8
+
instead.
8
9
9
-
Include what you can: vulnerability type, where it occurs, reproduction steps, PoC if you have one. You'll get an acknowledgment within 48 hours. If confirmed, we'll patch it and credit you in the disclosure (unless you prefer to stay anonymous).
10
+
Include what you can: vulnerability type, where it occurs, reproduction steps, PoC if you have one. You'll get an
11
+
acknowledgment within 48 hours. If confirmed, we'll patch it and credit you in the disclosure (unless you prefer to stay
12
+
anonymous).
10
13
11
14
## Automated scanning
12
15
13
-
The CI pipeline runs [Bandit](https://bandit.readthedocs.io/) on the Python backend for static analysis, and [Dependabot](https://docs.github.com/en/code-security/dependabot) keeps dependencies patched across Python, npm, and Docker. For SBOM generation and vulnerability scanning, see [Supply Chain Security](security/supply-chain.md).
16
+
The CI pipeline runs [Bandit](https://bandit.readthedocs.io/) on the Python backend for static analysis,
17
+
and [Dependabot](https://docs.github.com/en/code-security/dependabot) keeps dependencies patched across Python, npm, and
18
+
Docker. For SBOM generation and vulnerability scanning, see [Supply Chain Security](security/supply-chain.md).
19
+
20
+
## Frontend hardening
21
+
22
+
The frontend uses a nonce-based Content Security Policy:
23
+
24
+
-**`script-src 'nonce-...'`** — blocks injected `<script>` tags (XSS). Nonce is per-request, generated by nginx.
-**`style-src-attr 'unsafe-inline'`** — allows `style=""` attributes (required by Svelte transitions and CodeMirror).
27
+
28
+
Nonce injection is handled by nginx's `sub_filter` directive.
29
+
See [Nginx Configuration](operations/nginx-configuration.md#nonce-injection) for the full mechanism.
14
30
15
31
## Runtime hardening
16
32
17
-
Executor pods run user code with non-root users, read-only filesystems, dropped capabilities, and no service account tokens. Network policies deny all traffic by default. Details in [Network Isolation](security/policies.md).
33
+
Executor pods run user code with non-root users, read-only filesystems, dropped capabilities, user namespace isolation (
34
+
`host_users: false`), and no service account tokens. An optional sandboxed runtime (e.g., gVisor) can be configured via
35
+
`K8S_POD_RUNTIME_CLASS_NAME`.
36
+
37
+
At the namespace level, the k8s_worker automatically applies:
38
+
39
+
-**NetworkPolicy** — default-deny ingress + egress for executor pods (blocks lateral movement and exfiltration)
40
+
-**ResourceQuota** — caps aggregate pod, CPU, and memory consumption
41
+
-**Pod Security Admission** — `restricted` profile enforced via namespace labels
42
+
43
+
Details in [Pod & Namespace Security](security/policies.md).
44
+
45
+
## Authentication
46
+
47
+
Password hashing uses `pwdlib` with `BcryptHasher` (configurable rounds). Authentication is cookie-based JWT with CSRF
48
+
protection via the double-submit pattern. See [Authentication](architecture/authentication.md).
0 commit comments