|
1 | 1 | # Security Policy |
2 | 2 |
|
| 3 | +NodeDB is a **pre-1.0 public beta**. It is not yet recommended for production use, and interfaces, defaults, and on-disk formats may change between releases. We still take security seriously and investigate every good-faith report — this policy explains what qualifies, how to report it, and how we respond. |
| 4 | + |
| 5 | +Security is a shared responsibility. This policy covers vulnerabilities in NodeDB itself. The security of a deployment also depends on its environment — the host, operating system, network boundary, and the application and client libraries built on top of NodeDB. See the operator guide for how to configure and run NodeDB securely. |
| 6 | + |
3 | 7 | ## Supported Versions |
4 | 8 |
|
5 | | -NodeDB is in pre-1.0 development. Security fixes are issued only against the |
6 | | -latest released minor version. Once 1.0 ships, this policy will be updated to |
7 | | -cover an LTS window. |
| 9 | +While NodeDB is pre-1.0, security fixes are issued **only against the latest released minor version**. Once 1.0 ships, this policy will be updated to define an LTS window. |
| 10 | + |
| 11 | +| Version | Supported | |
| 12 | +| -------- | ------------------ | |
| 13 | +| 0.4.x | :white_check_mark: | |
| 14 | +| <= 0.3.x | :x: | |
| 15 | + |
| 16 | +Always run the latest release; it contains every prior security fix along with other bug fixes. |
| 17 | + |
| 18 | +## What Qualifies as a Security Vulnerability |
8 | 19 |
|
9 | | -| Version | Supported | |
10 | | -| ------- | ------------------ | |
11 | | -| 0.1.x | :white_check_mark: | |
12 | | -| < 0.1 | :x: | |
| 20 | +A security vulnerability in NodeDB is an issue that lets a user reach privileges or data they were not granted, or execute arbitrary code through a NodeDB process. Concretely, in scope as vulnerabilities: |
| 21 | + |
| 22 | +- Authentication bypass, or privilege escalation to superuser by an unprivileged user. |
| 23 | +- Cross-tenant or cross-database access beyond what a principal was granted. |
| 24 | +- Bypass of a documented authorization gate (`GRANT`, row-level security, `_system` catalog restriction) on **any** transport (pgwire, HTTP, WebSocket RPC, native, ILP, CRDT sync). |
| 25 | +- Reading or writing data as an identity you do not control (e.g. trusting a client-supplied claim, header, or token field for a security decision). |
| 26 | +- Memory-safety issues or arbitrary code execution reachable from the wire. |
| 27 | + |
| 28 | +Generally **not** treated as vulnerabilities (report these as ordinary bugs instead — they are still worth fixing): |
| 29 | + |
| 30 | +- Actions a legitimately-granted **superuser** can take. Superuser is all-powerful by design. |
| 31 | +- Denial-of-service caused by an authenticated principal issuing an expensive but valid query on a deployment without configured limits. Configure memory governors, query timeouts, and per-tenant budgets per the operator guide. (A wire-reachable panic or crash from _malformed_ input, by contrast, is in scope.) |
| 32 | +- Vulnerabilities in third-party dependencies that are already tracked by their own advisory. Please still tell us so we can upgrade. |
| 33 | +- Issues that require physical access to an already-compromised host, or issues in development tooling (`scripts/`, benchmarks, examples) that do not affect the shipped binary. |
| 34 | + |
| 35 | +If you are unsure whether something qualifies, err on the side of reporting it privately. |
13 | 36 |
|
14 | 37 | ## Reporting a Vulnerability |
15 | 38 |
|
16 | 39 | **Do not open a public GitHub issue for security reports.** |
17 | 40 |
|
18 | | -Report vulnerabilities privately via GitHub's **Security Advisories** workflow: |
| 41 | +Report privately via GitHub's **Security Advisories** workflow: |
19 | 42 |
|
20 | 43 | > [Report a vulnerability](https://github.com/NodeDB-Lab/nodedb/security/advisories/new) |
21 | 44 |
|
22 | | -Or navigate to the repository's **Security** tab → **Advisories** → |
23 | | -**Report a vulnerability**. This opens a private channel between you and the |
24 | | -maintainers; the report is not visible to the public until an advisory is |
25 | | -published. |
| 45 | +Or go to the repository's **Security** tab → **Advisories** → **Report a vulnerability**. This opens a private channel between you and the maintainers; nothing is public until an advisory is published. |
26 | 46 |
|
27 | 47 | Please include: |
28 | 48 |
|
29 | | -- A description of the vulnerability and its impact. |
30 | | -- Reproduction steps, including affected version (`nodedb --version`) and |
31 | | - configuration (deployment mode: Origin cloud, Origin local, or Lite). |
32 | | -- Any proof-of-concept code, log excerpts, or stack traces. |
33 | | -- Whether the issue is already public or under coordinated disclosure |
34 | | - elsewhere (e.g. RustSec, a GitHub Security Advisory on a dependency). |
| 49 | +- **Overview** — a clear description of the issue and its security impact. |
| 50 | +- **Affected component and version** — the output of `nodedb --version`, the deployment mode (Origin cloud, Origin local, or Lite), and the affected component (engine, transport, WAL/segment format, cluster, sync). |
| 51 | +- **Reproduction** — step-by-step instructions or a minimal proof-of-concept. |
| 52 | +- **Environment** — OS, and any relevant configuration. |
| 53 | +- **Evidence** — proof-of-concept code, log excerpts, stack traces, or a patch if you have one. |
| 54 | +- Whether the issue is already public or under coordinated disclosure elsewhere (e.g. a RustSec advisory on a dependency). |
| 55 | + |
| 56 | +## Our Response |
35 | 57 |
|
36 | | -You should receive an acknowledgement within **3 business days**. We aim to |
37 | | -provide an initial assessment (severity, scope, mitigation timeline) within |
38 | | -**10 business days**. |
| 58 | +When you report an issue we will: |
39 | 59 |
|
40 | | -## Disclosure Policy |
| 60 | +1. **Acknowledge** receipt within **3 business days**. |
| 61 | +2. Provide an **initial assessment** (confirmed / needs more info / not a vulnerability, with severity and scope) within **10 business days**. |
| 62 | +3. Keep you **updated at least every 14 days** while we work on a fix. |
| 63 | +4. Prepare and review the fix, cut a release on the latest minor line, and **publish a GitHub Security Advisory once the fixed release is available** — unless the issue is already public. |
41 | 64 |
|
42 | | -We follow coordinated disclosure: |
| 65 | +We coordinate disclosure: the reporter and maintainers agree on an embargo (typically up to 90 days, shorter for actively-exploited issues), and we ask that the vulnerability not be disclosed publicly until a fixed release is out. |
43 | 66 |
|
44 | | -1. The reporter and the NodeDB maintainers agree on an embargo window |
45 | | - (typically 90 days, shorter for actively-exploited issues). |
46 | | -2. A fix is prepared on a private branch, reviewed, and merged. |
47 | | -3. A patch release is cut and announced via: |
48 | | - - GitHub release notes on the affected tag |
49 | | - - A RustSec advisory, once the affected NodeDB crates are published to |
50 | | - crates.io |
51 | | -4. The reporter is credited in the advisory unless they prefer to remain |
52 | | - anonymous. |
| 67 | +## CVEs |
| 68 | + |
| 69 | +Advisories are published through GitHub Security Advisories. GitHub acts as the CVE Numbering Authority; we request a CVE when an issue warrants one. While NodeDB is a pre-1.0 beta, many advisories are published with a GHSA identifier only. Please **do not register a CVE independently** — coordinate it with us through the advisory so the record stays accurate. |
| 70 | + |
| 71 | +The published advisories, with affected and fixed versions, CVSS scores, and whether a valid login is required, are listed on the repository's [Security Advisories](https://github.com/NodeDB-Lab/nodedb/security/advisories) page. |
| 72 | + |
| 73 | +We do not currently offer a bug bounty. |
| 74 | + |
| 75 | +## Credit and Safe Harbor |
| 76 | + |
| 77 | +We credit reporters in the published advisory and release notes by default. If you prefer to remain anonymous or to use a specific handle, say so in your report. |
| 78 | + |
| 79 | +We consider security research conducted in good faith under this policy to be authorized, and we will not pursue legal action against you for it. In return, we ask that you: |
| 80 | + |
| 81 | +- Give us reasonable time to fix the issue before any public disclosure. |
| 82 | +- Do not access, modify, or exfiltrate data that is not yours; use only the minimum access needed to demonstrate the issue. |
| 83 | +- Do not run denial-of-service tests or automated scanners against infrastructure you do not own without explicit permission. |
53 | 84 |
|
54 | 85 | ## Scope |
55 | 86 |
|
56 | | -In-scope components: |
| 87 | +In scope: |
57 | 88 |
|
58 | | -- The `nodedb` server binary and all crates under this repository. |
| 89 | +- The `nodedb` server binary and all crates in this repository. |
59 | 90 | - The published `nodedb-*` crates on crates.io. |
| 91 | +- The pgwire, HTTP (JSON and NDJSON), WebSocket RPC, native MessagePack, and ILP protocols. |
| 92 | +- The CRDT sync protocol between Origin and Lite. |
60 | 93 | - The on-disk WAL, segment, and snapshot formats. |
61 | | -- The pgwire, HTTP, and native MessagePack protocols. |
62 | | -- The CRDT sync protocol used between Origin and Lite. |
63 | 94 |
|
64 | | -Out of scope: |
| 95 | +Out of scope (report to the relevant project or as a normal bug): |
| 96 | + |
| 97 | +- The separate `nodedb-lite`, `nodedb-cli`, and `nodedb-studio` repositories — report there, or here if you are unsure. |
| 98 | +- Third-party dependencies already tracked by their own advisory (tell us so we can upgrade). |
| 99 | +- The non-vulnerability categories listed under _What Qualifies_ above. |
| 100 | + |
| 101 | +## Security Automation |
65 | 102 |
|
66 | | -- Third-party dependencies — please report upstream and link the advisory. |
67 | | -- Denial-of-service via expected resource exhaustion (e.g. issuing very |
68 | | - large queries on an unconfigured deployment). Configure memory governors, |
69 | | - query timeouts, and per-tenant budgets per the operator guide. |
70 | | -- Issues in development tooling (`scripts/`, benchmarks, examples) unless |
71 | | - they affect the shipped binary. |
| 103 | +- Dependencies are checked for known advisories in CI with **`cargo deny check`** (RustSec advisory database, license, and source-ban policy). Vulnerable dependencies must be upgraded, replaced, or explicitly acknowledged during review. |
| 104 | +- Clippy runs workspace-wide with warnings denied. |
72 | 105 |
|
73 | 106 | ## Hardening Defaults |
74 | 107 |
|
75 | | -Production deployments should: |
| 108 | +Deployments handling real data should: |
76 | 109 |
|
77 | 110 | - Enable TLS on the pgwire listener (`pgwire.tls.cert` / `pgwire.tls.key`). |
78 | | -- Set a non-trust authentication method (`pgwire.auth = "scram-sha-256"`). |
79 | | -- Enable WAL encryption (`wal.encryption = "aes-256-gcm"`) on untrusted |
80 | | - storage. |
81 | | -- Configure per-tenant memory and IO budgets via `nodedb-mem` governors. |
| 111 | +- Use a non-trust authentication method (`pgwire.auth = "scram-sha-256"`). |
| 112 | +- Enable WAL encryption (`wal.encryption = "aes-256-gcm"`) on untrusted storage. |
| 113 | +- Configure per-tenant memory and IO budgets via the `nodedb-mem` governors. |
82 | 114 | - Restrict the cluster QUIC listener to a private network. |
| 115 | +- Never expose an unauthenticated ILP listener; bind it to an authenticated principal or a trusted network only. |
0 commit comments