ColtenOuO opened a new pull request, #73381: URL: https://github.com/apache/airflow/pull/73381
### Summary `SQLToolset(allowed_tables=[])` silently exposed every table in the schema to the agent. The constructor used `frozenset(allowed_tables) if allowed_tables else None`, so an empty list collapsed to `None`, which means "no restriction". An allow-list that resolves to nothing, for example from a template or configuration, therefore disabled the guardrail entirely: `list_tables` returned every table, `get_schema` accepted any table, and `query` / `check_query` skipped `allowed_tables` enforcement. The toolset now fails fast with a clear `ValueError` instead. `None` keeps its documented meaning of "allow every table". ### Changes - `SQLToolset.__init__` raises `ValueError` when `allowed_tables` is an empty list. - Document the empty-list behaviour in the `allowed_tables` docstring. - Add a unit test covering the new `ValueError`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
