pulaksaha143 opened a new pull request, #71685: URL: https://github.com/apache/airflow/pull/71685
Fixes #71275 **Description** The `SecretsMasker` previously only redacted `str` scalar values. This meant that non-string scalars like `int`, `float`, `bool`, and `None` passed through in cleartext via the REST API even when their keys matched sensitive keywords (e.g. `test-password`). This PR updates `_redact_all` to invert the type check: it now masks any value that is not explicitly traversed as a collection (`dict`, `tuple`, `set`, `list`), ensuring that numeric API keys and PINs are securely masked. Note that `merge()` seamlessly restores the original non-string scalar without issues because it only checks if the incoming payload contains the string `"***"` before discarding it in favor of the original value. **Testing** * Added assertions for numeric and boolean redaction to `test_redact_all_directly`. All `airflow_shared/secrets_masker` tests pass successfully. -- 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]
