sha174n opened a new pull request, #40402:
URL: https://github.com/apache/superset/pull/40402

   ### SUMMARY
   
   Adds the `duckdb` driver name to the `BLOCKLIST` in 
`superset/security/analytics_db_safety.py`. The DuckDB SQLAlchemy dialect ships 
with filesystem table-valued functions (`read_csv_auto`, `read_text`, 
`read_parquet`, `glob`, …) that resolve local paths during query execution — 
the same property that has `sqlite` and `shillelagh` on the list today.
   
   Follows the precedent of #39995 (shillelagh variants) and uses the same 
`duckdb(?:\+[^\s]*)?$` shape so any `duckdb+<sub-driver>` URI is covered.
   
   #### Note on MotherDuck
   
   MotherDuck connections use a `duckdb:///md:<db>?motherduck_token=...` URI 
and therefore go through the same dialect; they are caught by this regex. 
Operators that want to enable DuckDB / MotherDuck connections in a deployment 
can subclass `BLOCKLIST` and drop the entry, the same way they can override the 
existing `sqlite` and `shillelagh` entries.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — server-side URI validation, no UI surface.
   
   ### TESTING INSTRUCTIONS
   
   Unit coverage extended in 
`tests/integration_tests/security/analytics_db_safety_tests.py` (in-memory, 
file-path, `duckdb+<driver>`, and `md:` variants).
   
   ```
   pytest tests/integration_tests/security/analytics_db_safety_tests.py
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to