divyanshus2404 commented on PR #71711:
URL: https://github.com/apache/airflow/pull/71711#issuecomment-5773827188

   Thanks for the detailed review @potiuk! I've implemented all your feedback 
in the latest commit:
   
   1. **Tokenised approach**: Rewrote `_mask_cmd` to split on whitespace, run a 
cheap keyword pre-check, and then run an unanchored regex inside the token. It 
handles multiple secrets per token and safely detects multi-token quoted 
strings.
   2. **New tests added**: Added the failing 
`Config(secret="x",password=hunter2)` and `--conf 
spark.a.secret='x',spark.b.password=hunter2` payloads to `test_masks_passwords` 
(they now pass).
   3. **Nitpicks addressed**: Fixed the type annotation (`re.Match[str]`) and 
added an `isinstance` guard to fix the string-mangling bug in `_mask_cmd`.
   
   Let me know if there's anything else needed!


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