Job preparation parameters displays sensitive information from previous stage passed values
See original GitHub issueNote
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:
- Created 10 months ago
- Comments:5
I don’t have any more questions and sorry for the late response.
Once again, thank you for your time and the example solution.
@bluedog13 do you have additional questions? Can I close the issue?