Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask base64 values of secrets in pipeline logs #5030

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MantavyaDh
Copy link

@MantavyaDh MantavyaDh commented Nov 4, 2024

Purpose of this Change

This PR enables masking of base64 encoding of secret in the pipeline logs.

What Changed

Added the base64 encoded secret to the existing secret masker along with possible escape sequence characters.

Testing

  • Ensured that the new changes are used for Secret masking using the help of debugger.
  • Verified that the secret and its base64 encoded value is properly masked for corner cases such as:
    • Strings containing special characters such as *, & , ! , @ , # , $ , % , ^ , & , ( , ) etc.
    • Empty secret
    • Strings containing escape sequences such as \r, \n, etc.
    • Strings which are percent (%) encoded, eg: %AZP25, %0D etc.
    • Strings which leading or tailing whitespaces.

@MantavyaDh MantavyaDh marked this pull request as ready for review November 12, 2024 20:31
@MantavyaDh MantavyaDh requested review from a team as code owners November 12, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants