github-actions[bot] opened a new pull request, #76990:
URL: https://github.com/apache/airflow/pull/76990

   * Mask multi-line secrets when logged through pprint-style formatting
   
   Secrets such as private keys were left readable in task logs when
   a Kubernetes pod spec was formatted into an exception message,
   because pprint splits a multi-line string into separate literals and
   the masker only looked for the secret as one contiguous string.
   
   * Make the multi-line secret masking test independent of pprint
   
   The regression test built its input with pprint.pformat, so a change in
   how pprint wraps strings could make the test pass without exercising
   the masker. Spell out the formatted text and the expected result in the
   test instead, and use raw strings for the expected regex patterns.
   
   * Re-trigger CI after a runner failure
   
   One MySQL test job on the previous commit failed with "The hosted
   runner lost communication with the server". It passed on the commit
   before and the other database jobs passed, but contributors cannot
   re-run individual jobs, so push an empty commit to start a new run.
   
   * Mask secrets that end with a line break
   
   A value read from a file usually ends with a newline, and pprint prints
   it with the newline escaped, so the registered secret never matched and
   stayed readable in logs. Register the stripped value of any secret that
   contains a line break, not only of secrets with several lines.
   
   * Document per-line masking of multi-line values
   
   Multi-line secrets are now also masked line by line, which can replace
   ordinary text when a pretty-printed connection extra is registered.
   Describe both effects so readers who find *** in place of plain text
   know where it comes from.
   (cherry picked from commit c6a4acf8cde88ee11a805435c1de3f3fb707e909)
   
   Co-authored-by: juan-pablo-guereca <[email protected]>


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