Solved

How to use a secret variable passed from another task

  • 4 October 2023
  • 2 replies
  • 37 views

Hi

In task 1 I'm setting a variable with print(“test,secret=john”)

How can I use the content of test variable (John) in task 2?

Trying to use @@{test}@@ as a string will only return xxxx (the mask but not the content)

Thanks,

Avi

icon

Best answer by JoseNutanix 9 October 2023, 11:25

View original

This topic has been closed for comments

2 replies

Userlevel 4
Badge +5

Hi Avico,

This is expected. You are setting the attribute secret, it means the outputs in the audit tab will get obfuscated. If on the second script where you are using the macro you do something like echo @@{test}@@ > output.txt you’ll see the word john.

Thank you Jose!

Got it.

I thought that once it’s passed to the next task it’s being unmasked. apparently it stays masked but you can evaluate its content.

Great help!

Have a great day

Avico