Skip to content

Add AGENTS.md so the threat model is discoverable by agents - #5126

Merged
rubenada merged 1 commit into
apache:mainfrom
potiuk:add-agents-md-discoverability
Jul 29, 2026
Merged

Add AGENTS.md so the threat model is discoverable by agents#5126
rubenada merged 1 commit into
apache:mainfrom
potiuk:add-agents-md-discoverability

Conversation

@potiuk

@potiuk potiuk commented Jul 27, 2026

Copy link
Copy Markdown
Member

What

Adds an AGENTS.md at the repository root pointing at SECURITY.md, and adds it to .ratignore alongside SECURITY.md.

Why

CALCITE-7605 landed the threat model at site/_docs/security_threat_model.md together with a SECURITY.md that links to it. That part is complete and reads well.

What is missing is the entry point. Automated agents — security scanners, code analyzers, coding assistants — locate a project's security model by following a fixed chain:

AGENTS.md  ->  SECURITY.md  ->  the threat model

apache/calcite has the second and third hops but not the first, so the chain cannot be walked mechanically and an agent starting from a clone has no way to find the model on its own.

This matters concretely for the ASF Security team's scanning programme: we refuse to run a scan against a project whose model is not mechanically discoverable, because without the model in context the false-positive rate is more than a PMC can reasonably triage. This PR closes that gap for Calcite.

What is in the file

No new claims — everything restates the merged model:

  • A pointer to SECURITY.md and onward to site/_docs/security_threat_model.md.
  • The framing that Calcite is embedded, opens no socket, and has no authentication or authorization of its own.
  • The two rules that carry most of the triage weight: the surprising vs unsurprising class loading gate (only SPI implementations are instantiated by name, via Class.forName(name, false, loader) plus isAssignableFrom, across the enumerated SPI positions), and the pushed-down SQL split (generated SQL reaching a configured backend is not a vulnerability; a pushdown bug reading beyond the configured schemas is P4 and is one).
  • Signposts to the model's "Not a vulnerability" and "Downstream responsibilities" sections.

Notes for reviewers

  • Docs only. No production code is touched.
  • .ratignore: AGENTS.md carries no license header, so it is excluded exactly as CALCITE-7605 excluded SECURITY.md. Happy to add a header and drop the .ratignore line instead if the PMC prefers that direction.
  • No JIRA reference in the title. CALCITE-7605 is resolved, and I did not want to reopen it or file a ticket on the project's behalf unprompted. If Calcite would like a JIRA for this, say the word and I will file one and retitle the PR to match the [CALCITE-NNNN] convention.
  • I deliberately did not link the rendered site URL for the threat model, since it does not resolve yet — the in-repo path is what an agent follows anyway.

Opened by the ASF Security team as part of the Frontier Model Preparation scan pre-flight for Calcite, following the request on the PMC's [GLASSWING] thread. Review, change, or close as the PMC sees fit — the document is the project's.

🤖 Generated with Claude Code

CALCITE-7605 landed the threat model at site/_docs/security_threat_model.md
and a SECURITY.md that links to it. The remaining gap is the entry point:
automated agents locate a project's security model by following
AGENTS.md -> SECURITY.md -> the model, and this repository has no
AGENTS.md, so the first hop is missing and the chain cannot be walked
mechanically.

This adds one, pointing at SECURITY.md and summarising the two rules that
carry most of the triage weight — the surprising-vs-unsurprising
class-loading gate over the SPI positions, and the pushed-down-SQL split
(generated SQL reaching a configured backend is not a vulnerability; a
pushdown bug reading beyond the configured schemas is P4 and is one) —
plus the "Not a vulnerability" and "Downstream responsibilities" lists.
No new claims: everything here restates the merged model.

AGENTS.md is added to .ratignore alongside SECURITY.md, matching what
CALCITE-7605 did for that file, since it carries no license header.

Docs only; no production code touched.

Generated-by: Claude Opus 5 (1M context)
@sonarqubecloud

Copy link
Copy Markdown

@rubenada rubenada added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jul 28, 2026
@rubenada
rubenada merged commit 871e863 into apache:main Jul 29, 2026
35 checks passed
@rubenada

Copy link
Copy Markdown
Contributor

Thanks @potiuk for the patch!

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

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants