This is an automated email from the ASF dual-hosted git repository.

ash pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 93ba1c5db63 Make log redaction safer in edge case when redaction has 
an error (#54046)
93ba1c5db63 is described below

commit 93ba1c5db63579c787498e40e87f2cde10143632
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Sat Aug 2 09:51:46 2025 +0100

    Make log redaction safer in edge case when redaction has an error (#54046)
---
 task-sdk/src/airflow/sdk/execution_time/secrets_masker.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/task-sdk/src/airflow/sdk/execution_time/secrets_masker.py 
b/task-sdk/src/airflow/sdk/execution_time/secrets_masker.py
index 1080d2f2d5d..ae8c8e617ae 100644
--- a/task-sdk/src/airflow/sdk/execution_time/secrets_masker.py
+++ b/task-sdk/src/airflow/sdk/execution_time/secrets_masker.py
@@ -306,12 +306,13 @@ class SecretsMasker(logging.Filter):
             log.warning(
                 "Unable to redact value of type %s, please report this via "
                 "<https://github.com/apache/airflow/issues>. Error was: %s: 
%s",
-                item,
+                type(item),
                 type(exc).__name__,
                 exc,
                 extra={self.ALREADY_FILTERED_FLAG: True},
             )
-            return item
+            # Rather than expose sensitive info, lets play it safe
+            return "<redaction-failed>"
 
     def _merge(
         self,

Reply via email to