Repository navigation
Confine SQL execution to registered snapshots and correct its security contract - #5
Merged
Merged
Conversation
added 5 commits
October 14, 2026 10:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated, rewritten and direct SQL could read unregistered local files or URLs, and the direct SQL handlers did not consult registered table metadata before admission. This change confines execution to supplied registered snapshots and applies the same admission policy to initial SQL, Critic rewrites, and synchronous/SSE direct SQL.
Validation: 386 unit tests passed with zero failures/errors/skips at both DuckDB 1.3.2 and 1.5.6. The root freshly reran 386 after integration onto canonical main. Independent native review passed 30 adversarial probes plus the derived-map mismatch check, including parser-omission tests, zero loopback HTTP requests, locked configuration and unchanged original snapshot bytes. Ruff and format passed; configured Pyright has 0 errors and 9 existing semantic warnings. All 21 lockstep files match pins. Documentation checks verified 237 local links,20 canonical boundary links, DTO examples and excerpt syntax; the resolver follow-up changes only docstrings with an identical executable AST.
Scope: registered local Parquet queries. Actor/token/workspace authorization and PostgreSQL RLS remain upstream; controlled direct-handler metadata tests do not establish RLS acceptance. Effective statement timeout, remote object-store query staging and an operating-system SQL sandbox remain separate work. Framework identity, canonical source URLs, existing SDK contracts and the pinned native MinIO prerequisite are preserved. No paid providers or cloud deployment were used.