github-advanced-security[bot] commented on code in PR #40654:
URL: https://github.com/apache/superset/pull/40654#discussion_r3343047135


##########
superset/utils/encrypt.py:
##########
@@ -65,6 +78,19 @@
         **kwargs: Optional[dict[str, Any]],
     ) -> TypeDecorator:
         if app_config:
+            # Select the encryption engine from config, defaulting to the
+            # historical AES-CBC engine for backward compatibility. An explicit
+            # ``engine`` kwarg (e.g. from the migrator) always takes 
precedence.
+            if "engine" not in kwargs:
+                engine_name = 
app_config.get("SQLALCHEMY_ENCRYPTED_FIELD_ENGINE", "aes")
+                if engine_name not in ENCRYPTION_ENGINES:
+                    logger.warning(
+                        "Unrecognized SQLALCHEMY_ENCRYPTED_FIELD_ENGINE %r;"
+                        " falling back to AES-CBC. Valid engines: %s",
+                        engine_name,

Review Comment:
   ## CodeQL / Clear-text logging of sensitive information
   
   This expression logs [sensitive data (secret)](1) as clear text.
   
   [Show more 
details](https://github.com/apache/superset/security/code-scanning/2464)



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