Another solution would be to not display the secret as it is but to display it slightly modified.
For example you could create a script at the start of your Bamboo task (or wherever you want it doesn't matter) and to split the secret value and then display it on 2 different lines.
This way Bamboo would not replace the printed secret by the infamous *******
echo ----------------------------
secret=${bamboo.blabla.secret}
middle=$(echo $secret | awk '{print length($0)/2}')
echo $secret | cut -c1-$middle
echo $secret | cut -c$(($middle+1))-$(echo $secret | awk '{print length}')
echo ----------------------------
(I'm not a bash expert, so there is probably a better way to write this script).
And the output should look like this:
build 28-May-2024 21:35:42 ----------------------------
build 28-May-2024 21:35:42 my-secre
build 28-May-2024 21:35:42 t-value
build 28-May-2024 21:35:42 ----------------------------
You can then concatenate the 2 lines to get your secret value.
Here it would be: my-secret-value
A little bit hacky/dirty but it works 😊