[CALCITE-7605] Add threat model#5115
Conversation
Document what Calcite treats as a security vulnerability: the attacker model, the properties it provides and disclaims (P1-P4), the surprising-vs-unsurprising class-loading rule, and denial of service as a hardening goal. Add SECURITY.md with the private-reporting channel. Keep the concrete class-loading sinks in a separate living document so a new CVE updates that inventory, not the ratified model. This is an alternative draft for the same Jira as apache#5020, reorganizing the same normative content into a structure that is easier to read and to maintain per-CVE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
| as sinks are found and fixed; a sink dropping off this list never narrows the | ||
| rule. Add a `Last reviewed` date whenever you touch an entry. | ||
|
|
||
| **Last reviewed:** June 2026 |
There was a problem hiding this comment.
Could be updated to "July 2026" before final merge.
… Triage dispositions Fold in the three additive sections proposed in #3, corrected against the code: - Inputs: map every attacker-controlled input to its governing rule. Add the metaTableFactory/metaColumnFactory PLUGIN properties, place operator under the RelJson row (SqlOperator loads only via RelJson), and note that fun selects built-in libraries rather than loading a class. - Downstream responsibilities: collect the host/operator duties in one place and drop the now-duplicated transport paragraph from the attacker section. - Triage dispositions: a closed outcome set a human or agent can route against. - Not a vulnerability: state that pushed-down SQL is by design, while a pushdown bug that reads beyond the configured schemas is P4. Also record the ModelHandler.addFunctions raw Class.forName sink in the living inventory. Co-authored-by: Jarek Potiuk <jarek@potiuk.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9f00475 to
57a0bd9
Compare
|
Thanks for moving this forward @vlsi , IMO looks good. |
|
Regular flow could work. As this is a documentation page on a website, a brief review of a native speaker would be great as well. |
zabetak
left a comment
There was a problem hiding this comment.
The thread model LGTM, I am find merging it as is and fine-tune later once new vulnerabilities are reported.
On the other hand I have some reservations for security_known_class_loading_sinks.md thus I would leave it aside for now.
| --- | ||
| layout: docs | ||
| title: Known class-loading sinks | ||
| permalink: /docs/security_known_class_loading_sinks.html | ||
| --- |
There was a problem hiding this comment.
I would remove this section and the references to it. I don't think we should list publicly security sinks that we are in the process of fixing.
| contradicts this model is a feature request or a documentation gap, not a | ||
| vulnerability. | ||
|
|
||
| **Status:** draft for PMC discussion; not yet ratified. |
There was a problem hiding this comment.
Since we are about to merge this PR the Draft status should be removed. Anyways the model will necessarily evolve as more vulnerabilities are reported in the future.
|
Process wise I don't think we need a vote. It's nothing more than a documentation improvement that can be enhanced incrementally if needed. There are already 3 PMC that reviewed the documentation here so we can conclude this rather fast if we agree among us. Feedback from others is of course much appreciated but if this lands before then we can review the suggestions in future PRs. |



Jira Link
[CALCITE-7605] Add threat model
Why
Calcite has no written statement of what it treats as a security vulnerability, so reporters and committers triage each report from scratch. This PR adds one: an attacker model, the properties Calcite promises and disclaims (P1–P4), and a triage rule for the class-loading sinks behind most of the recent CVEs.
This builds directly on the draft in #5020 by @rubenada, which in turn started from an earlier draft of mine. The normative content here (P1–P4, "always / not a vulnerability", the surprising-vs-unsurprising class-loading rule, the DoS goals) is the same material, reorganized. Credit for getting this moving goes to that PR.
Why a separate PR instead of comments on #5020
The changes I'm proposing are structural — drop two sections, split one out into its own file, restore some content — and that reads much better as a diff you can view whole than as a long review thread reconstructing the same edits in prose. Treat this as an alternative draft for the same Jira, not a competing effort: the PMC can merge whichever framing it prefers, or cherry-pick between them. I'm happy to fold this into #5020 instead if that's easier for the reviewers.
What
site/_docs/security_threat_model.md— the normative model: attacker and trust boundary, assets, P1–P4, "always / not a vulnerability", surprising-vs-unsurprising class loading with the triage rule, and denial of service as a hardening goal. Stable content; it should not need editing per CVE.site/_docs/security_known_class_loading_sinks.md— a living, non-normative inventory of the concrete sinks the triage rule currently applies to (AvaticaUtils.instantiatePlugin,RelJson.typeNameToClass,JdbcSchema.create, theClassNameFilterdenylist, paths to audit), carrying aLast revieweddate. Keeping the class names out of the policy document means a new CVE updates this page, not the ratified model.site/_data/docs.yml— a "Security" menu group so both pages appear in the sidebar.SECURITY.mdandAGENTS.mdare carried over from [CALCITE-7605] Add threat model #5020; they add the private-reporting channel and are worth keeping regardless of which draft wins.What I dropped from #5020, and why
How to verify
cd site && bundle exec jekyll build(or the project's usual site build) renders both pages, and the "Security" group appears in the sidebar.🤖 Generated with Claude Code