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


##########
superset/commands/importers/v1/utils.py:
##########
@@ -230,7 +231,21 @@
                     prefix,
                     exc.messages,
                 )
-                logger.debug("Config content that failed validation: %s", 
config)
+                # Mask sensitive data before logging out for debug
+                if config:
+                    redacted_config = json.redact_sensitive(
+                        config,
+                        {
+                            "$.password",
+                            "$.ssh_tunnel.password",
+                            "$.ssh_tunnel.private_key",
+                            "$.ssh_tunnel.private_key_password",
+                            "$.masked_encrypted_extra",
+                        },
+                    )
+                    logger.debug(
+                        "Config content that failed validation: %s.", 
redacted_config

Review Comment:
   ## CodeQL / Clear-text logging of sensitive information
   
   This expression logs [sensitive data (password)](1) as clear text.
   This expression logs [sensitive data (password)](2) as clear text.
   This expression logs [sensitive data (password)](3) as clear text.
   This expression logs [sensitive data (password)](4) as clear text.
   This expression logs [sensitive data (password)](5) as clear text.
   This expression logs [sensitive data (password)](6) as clear text.
   This expression logs [sensitive data (password)](7) as clear text.
   This expression logs [sensitive data (password)](8) as clear text.
   This expression logs [sensitive data (password)](9) as clear text.
   This expression logs [sensitive data (password)](10) as clear text.
   This expression logs [sensitive data (password)](11) as clear text.
   This expression logs [sensitive data (password)](12) as clear text.
   This expression logs [sensitive data (password)](13) as clear text.
   This expression logs [sensitive data (password)](14) as clear text.
   This expression logs [sensitive data (password)](15) as clear text.
   This expression logs [sensitive data (password)](16) as clear text.
   This expression logs [sensitive data (password)](17) as clear text.
   This expression logs [sensitive data (password)](18) as clear text.
   This expression logs [sensitive data (password)](19) as clear text.
   This expression logs [sensitive data (password)](20) as clear text.
   This expression logs [sensitive data (password)](21) as clear text.
   This expression logs [sensitive data (password)](22) as clear text.
   This expression logs [sensitive data (password)](23) as clear text.
   
   [Show more 
details](https://github.com/apache/superset/security/code-scanning/2567)



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