Bitbucket has unexpected behaviour with masked variables

Kimberling Yarihuaman January 31, 2025

Hi!

Bitbucket has unexpected behaviour when I use masked variables. The pipeline logs show the variable names. I attached some screenshots.

 

- Pipeline logs with masked variable

Captura de pantalla 2025-02-01 001634.png

 

- Masked variable into Repository Variables. The variable value is 1

Captura de pantalla 2025-02-01 001919.png

 

Can you help me with this issue?

Thans in advance.

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2025

Hi @Kimberling Yarihuaman 

This is by design. Secure variables are supposed to be secret and not exposed (for example: tokens/app passwords/ssh keys/passwords).

If you wish to see the value of that variable exposed in your build logs, you'll need to add it as a non-secured variable.

Cheers!

- Ben (Bitbucket Cloud Support)

Kimberling Yarihuaman February 7, 2025

Hi Ben!

I understand you, but my doubt is why the variable name is shown in logs if those datas shouldn´t be replaced by variables. For example, the following texts should only show the quantity failed and passed tests, not the variable name, because they are not related to that.

Captura de pantalla 2025-02-07 230427.png

If you need more information, please let me know.

Cheers!

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2025

Hi Kimberling,

Pipelines has no way of knowing if the data in your secured variable is related to the values in your tests.

It simply checks to see if any values in the output match secured variables and masks them to prevent exposure of these secured variables in the build logs.

If you store "1" as an unsecured variable - you won't see this problem anymore.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Kimberling Yarihuaman February 12, 2025

Hi Ben!

Thanks so much.

Cheers!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events