question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Job preparation parameters displays sensitive information from previous stage passed values

See original GitHub issue

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: task.setvariable

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines or TFS on-premises?

    • If using TFS on-premises, provide the version:

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

  • Agent - Hosted or Private:

    • If using Hosted agent, provide agent queue name:

    • If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description

I have a secret variable in stage A that gets passed to stage B

Stage A

echo "##vso[task.setvariable variable=SECRET;isOutput=true;issecret=false]$_API_SECRET"

Stage B

variables:
      CLOUD_API_KEY: $[stageDependencies.stageValidatePlan.TerraformJobs.outputs['setvar.API_SECRET']]

But this displays in the Job preparation parameters for Stage B

Job preparation parameters
Variables:
  API_SECRET:
    Parsing expression: <stageDependencies.stageValidatePlan.TerraformJobs.outputs['API_SECRET']>
    Evaluating: stageDependencies['stageValidatePlan']['TerraformJobs']['outputs']['setvar.API_SECRET']
    Result: '[redacted]'

if I pass it from Stage A as secret, the value being read is **** in stage B and not the actual value

echo "##vso[task.setvariable variable=SECRET;isOutput=true;issecret=true]$_API_SECRET"

How do I pass the value form Stage A to Stage B and the value not be displayed in the Job preparation parameters deails?

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

[Insert error from the logs here for a quick overview]

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bluedog13commented, Dec 20, 2022

I don’t have any more questions and sorry for the late response.

Once again, thank you for your time and the example solution.

0reactions
sergey-koryshevcommented, Dec 20, 2022

@bluedog13 do you have additional questions? Can I close the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recommendations to secure variables and parameters in a ...
Variables can be a convenient way to collect information from the user up front. You can also use variables to pass data from...
Read more >
Job preparation parameters show secure properties
I've now noticed that when a job starts it outputs all stage variables that the job has access to in 'Job preparation parameters',...
Read more >
AWS Glue job parameters
For more information about the AWS Glue API, see Jobs. For example, the following is the syntax for running a job using --arguments...
Read more >
Passing Information via Query Strings
The FieldName is the name of your data field while FieldValue is the specific data value of your field. Let's take a look...
Read more >
Job artifacts - GitLab Docs
For administrator information about job artifact storage, see administering ... By default, jobs fetch all artifacts from previous stages, but jobs using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found