You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org> on 2026/02/12 00:48:45 UTC

Re: [PR] [v2-11-test] Fix recursion depth error in _redact_exception_with_context [airflow]

github-advanced-security[bot] commented on code in PR #61797:
URL: https://github.com/apache/airflow/pull/61797#discussion_r2796242115


##########
tests/utils/log/test_secrets_masker.py:
##########
@@ -415,24 +753,24 @@
     def reset_secrets_masker(self):
         self.secrets_masker = SecretsMasker()
         with patch("airflow.utils.log.secrets_masker._secrets_masker", return_value=self.secrets_masker):
-            mask_secret(p)
+            mask_secret(PASSWORD)
             yield
 
     def test_redacts_from_print(self, capsys):
         # Without redacting, password is printed.
-        print(p)
+        print(PASSWORD)
         stdout = capsys.readouterr().out
-        assert stdout == f"{p}\n"
+        assert stdout == f"{PASSWORD}\n"
         assert "***" not in stdout
 
         # With context manager, password is redacted.
         with contextlib.redirect_stdout(RedactedIO()):
-            print(p)
+            print(PASSWORD)

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



##########
tests/utils/log/test_secrets_masker.py:
##########
@@ -415,24 +753,24 @@
     def reset_secrets_masker(self):
         self.secrets_masker = SecretsMasker()
         with patch("airflow.utils.log.secrets_masker._secrets_masker", return_value=self.secrets_masker):
-            mask_secret(p)
+            mask_secret(PASSWORD)
             yield
 
     def test_redacts_from_print(self, capsys):
         # Without redacting, password is printed.
-        print(p)
+        print(PASSWORD)

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



-- 
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-unsubscribe@airflow.apache.org

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