ashb commented on code in PR #48791:
URL: https://github.com/apache/airflow/pull/48791#discussion_r2029165500


##########
task-sdk/src/airflow/sdk/execution_time/secrets_masker.py:
##########
@@ -346,12 +356,32 @@
             for k, v in secret.items():
                 self.add_mask(v, k)
         elif isinstance(secret, str):
-            if not secret or (self._test_mode and secret in 
SECRETS_TO_SKIP_MASKING_FOR_TESTS):
+            if not secret:
+                return
+
+            if secret.lower() in SECRETS_TO_SKIP_MASKING:
+                return
+
+            min_length = get_min_secret_length()
+            if len(secret) < min_length:
+                if not SecretsMasker._has_warned_short_secret:
+                    log.warning(
+                        "Skipping masking for a secret as it's too short (<%d 
chars)",
+                        min_length,

Review Comment:
   We can just ignore it, it's clearly not actually logging anything sensitive.



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