potiuk commented on issue #38745:
URL: https://github.com/apache/airflow/issues/38745#issuecomment-2039774537

   > In my opinion, the main problem with having templates being rendered in 
this case is that now we need to sanitize user data when processing it in 
expanded tasks (I didn't think of that at the beginning, but it is probably 
also a security issue in this case). When using plain tasks you generally don't 
need to be concerned whether the data you are processing can be harmful outside 
of the user code inside decorated python function context. Personally I think 
that would be unfortunate if this becomes a default behaviour for expand as well
   
   I don't think there are any significant security implications here. 
   
   The only code that can really get executed and templates that are coming in 
the DAGs come from DAG Authors. There is no code that can be executed that can 
be supplied (as far as I know) by someone else (i.e. UI users - except those 
users that have "Connection Editing" capabilities. And this is all within 
Airflow Security Model: 
https://airflow.apache.org/docs/apache-airflow/stable/security/security_model.html
  - DAG authors already have capabilties  to execute anything they want and 
there is no way nor intention to block them from doing so (this can be 
controlled and verified at code review / static checks on DAGs outside of 
Airflow).
   
   Unless there is a scenario that other airflow users can provide a code that 
can be executed in the context of workers, I do not see how template expansion 
could go outside of the security model we already have and know.


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to