Skip to content

Add draft threat model + SECURITY.md + AGENTS.md for security-model discoverability#397

Open
potiuk wants to merge 1 commit into
apache:unstablefrom
potiuk:asf-security/threat-model-2026-05-31
Open

Add draft threat model + SECURITY.md + AGENTS.md for security-model discoverability#397
potiuk wants to merge 1 commit into
apache:unstablefrom
potiuk:asf-security/threat-model-2026-05-31

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 31, 2026

This is a draft proposal for the Kvrocks PMC to review — please correct, reject, or discuss as needed. Nothing here is a requirement; the maintainers are the decision-makers.

This is the companion to the apache/kvrocks threat-model PR, covering the control plane (its trust surface differs from the data node). It adds THREAT_MODEL.md + SECURITY.md + AGENTS.md so a scan agent can follow AGENTS.md → SECURITY.md → THREAT_MODEL.md.

Draft-first, mostly inferred (~12 documented / 0 maintainer / ~40 inferred); every *(inferred)* claim routes to a numbered §14 question.

The wave-1 question is the whole ballgame for a control plane:

  • Does the controller API/UI have any built-in authentication/authorization, or is it network-trust only (the config.yaml shows no API-auth knob and default addr is 127.0.0.1:9379)? If network-trust-only, is fronting it with an operator auth proxy the supported posture — so an "unauthenticated admin API" report is BY-DESIGN rather than VALID?

Also flagged: TLS posture, SSRF via node registration, and how managed-node admin credentials are stored.

Context: the ASF Security team is preparing the project for an automated agentic security scan we're piloting; a discoverable threat model keeps that scan's output signal-rich. Drafted via the threat-model-producer rubric. If you'd rather author it yourselves, close this PR and we'll regroup.

…l discoverability

Adds a draft (v0) threat model for the control plane plus the SECURITY.md and
AGENTS.md scaffold so an automated scan agent can mechanically discover the model
via AGENTS.md -> SECURITY.md -> THREAT_MODEL.md. The model is a proposal for the
PMC to review; most claims are (inferred) and route to open questions in section 14.

Generated-by: Claude Code (Claude Opus 4.8)
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.69%. Comparing base (6c56470) to head (d37cce6).
⚠️ Report is 107 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #397      +/-   ##
============================================
+ Coverage     43.38%   49.69%   +6.30%     
============================================
  Files            37       45       +8     
  Lines          2971     4103    +1132     
============================================
+ Hits           1289     2039     +750     
- Misses         1544     1838     +294     
- Partials        138      226      +88     
Flag Coverage Δ
unittests 49.69% <ø> (+6.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PragmaTwice PragmaTwice requested a review from git-hulk May 31, 2026 03:53
Comment thread THREAT_MODEL.md
Comment on lines +243 to +268
**Wave 1 — the central auth question (§2/§5a/§8/§9):**
1. Does the controller API have **any built-in authentication/authorization** (token, mTLS, basic-auth), or
is it **network-trust only**? If the latter, is exposing it behind an operator's own auth proxy the
*supported* posture, so an "unauthenticated API" report is `BY-DESIGN`? *Proposed:* network-trust only
today; operator fronts it; unauth-on-trusted-network is by design, unauth-on-untrusted-network is misuse.
2. Does the **web UI** authenticate, and does it have **CSRF** protection on state-changing calls?
*Proposed:* same as the API; CSRF is a hardening item.
3. Is **TLS** supported/expected for the API and managed-node connections? *Proposed:* operator-configurable;
plaintext acceptable only on trusted networks.

**Wave 2 — store, nodes, SSRF (§4/§6/§9):**
4. How are **managed-node admin credentials** stored and used (in the store? in config?), and what protects
them at rest? *Proposed:* operator-supplied; stored in the metadata store; protected at the store layer.
5. Are **node addresses** registered via the API validated/allow-listed, or will the controller connect to
any host:port given (SSRF)? *Proposed:* currently connects as given; allow-listing is a hardening item.
6. Does the controller **trust the metadata store and peer controllers** as honest (out of §7), or should a
tampered store / Byzantine peer be modelled? *Proposed:* trusted; out of scope.

**Wave 3 — properties & §11a (§8/§11a):**
7. What **failover-correctness / split-brain** guarantees does the controller make, and under what store/peer
assumptions? *Proposed:* correct given a healthy store and a quorum of honest peers.
8. What do scanners/researchers most often report here that the PMC considers a **non-finding**? (Seeds §11a.)

**Meta:**
9. Confirm this model lives as root `THREAT_MODEL.md` referenced from a new `SECURITY.md`, separate from the
`apache/kvrocks` model. *Proposed:* yes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @git-hulk Could you confirm and answer these questions when you have time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants