You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second-round review follow-ups (#3–#10):
- #4 Encode the trust boundary in the type. Ad-hoc /query now validates
against a dedicated AdhocSqlPolicy (access modes + denied schemas);
the trusted pipeline path keeps a bare SqlValidatorConfig. Reaching for
validate_sql on untrusted input can no longer silently skip the
allowlist + schema denial.
- #5 Add coverage proving the schema denial descends into indirect
relations (set ops, scalar/IN/EXISTS subqueries) via visit_relations;
document the residual (operator-defined views/federated aliases, which
ad-hoc SQL cannot create) and its structural fix. See follow-up issue.
- #6 Parse via datafusion::sql::sqlparser (DataFusion enables the visitor
feature); drop the standalone sqlparser dep entirely so validator and
engine share one parser by construction — a DF bump is now a compile
break, not silent parse divergence.
- #8 Single AUTH_SCHEMA const used at both the register and deny sites.
- #9 check_denied_schemas reports the table via extract_table_name
(quote-stripped), matching WriteNotAllowed.
- #10 statement_keyword maps the AST variant to a &'static str instead of
Display-rendering the whole statement on each rejection.
- #7 AppState::new derives the policy once; removes the copy-pasted
Arc::new(validator_config_from_sources(..)) across ~9 sites.
- #3 Document the startup-snapshot invariant (no runtime access_mode
writer) on the field and the builder.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments