potiuk opened a new pull request, #68511:
URL: https://github.com/apache/airflow/pull/68511

   Stacked on #67926 — applies the same pre-import class-path validation to the 
`AIRFLOW_EXC_SER` / `BASE_EXC_SER` exception branches that #67926 adds for 
`BASE_TRIGGER`, reusing the shared `_safe_import_for_deserialize` helper. 
Review the top commit; the first commit belongs to #67926 and drops out once it 
merges.
   
   Exception classes are now resolved through the trusted-namespace allowlist 
(validated before `import_string`), then verified as `BaseException` 
subclasses. Builtins stay allowed for standard exceptions; the subclass check 
rejects non-exception builtins.
   
   ### Tests
   - [X] `AIRFLOW_EXC_SER` path outside trusted namespaces rejected before 
import
   - [X] `BASE_EXC_SER` non-exception builtin (e.g. `eval`) rejected
   - [X] genuine builtin exception still round-trips
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Opus 4.8 (1M context)
   
   Generated-by: Claude Opus 4.8 (1M context) following the guidelines at
   
https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions
   


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

Reply via email to