Skip to content

Commit 8f298e5

Browse files
committed
docs(security): expand vulnerability disclosure policy
Clarify what counts as a security vulnerability versus an ordinary bug, detail the response and disclosure timeline, add CVE handling and a credit/safe-harbor section, and broaden reporting/scope guidance to cover all supported transports and the CRDT sync protocol. Bump the supported-versions table to 0.4.x.
1 parent dac29be commit 8f298e5

1 file changed

Lines changed: 81 additions & 48 deletions

File tree

SECURITY.md

Lines changed: 81 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,115 @@
11
# Security Policy
22

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+
37
## Supported Versions
48

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
819

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.
1336

1437
## Reporting a Vulnerability
1538

1639
**Do not open a public GitHub issue for security reports.**
1740

18-
Report vulnerabilities privately via GitHub's **Security Advisories** workflow:
41+
Report privately via GitHub's **Security Advisories** workflow:
1942

2043
> [Report a vulnerability](https://github.com/NodeDB-Lab/nodedb/security/advisories/new)
2144
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.
2646

2747
Please include:
2848

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
3557

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:
3959

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.
4164

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.
4366

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.
5384

5485
## Scope
5586

56-
In-scope components:
87+
In scope:
5788

58-
- The `nodedb` server binary and all crates under this repository.
89+
- The `nodedb` server binary and all crates in this repository.
5990
- 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.
6093
- 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.
6394

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
65102

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.
72105

73106
## Hardening Defaults
74107

75-
Production deployments should:
108+
Deployments handling real data should:
76109

77110
- 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.
82114
- 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

Comments
 (0)