Comments (2)
Just realized that I should have used BackTick as the escape character for the PowerShell script. It masked the secret properly when the secret value in KV was changed from \"SHOULDBEHIDDEN\" to `"SHOULDBEHIDDEN`".
However, since we are using non PowerShell script as well in our pipeline, adding the escape character within the secret text opens up problems in other scripts where it is not treated as escape character. It there a better way to mask the secrets in PowerShell tasks?
from azure-pipelines-task-lib.
Closing the issue because I think I found the solution.
Setting new task variable and then assigning it the secret.
Write-Host "##vso[task.setvariable variable=secretwithdoublequotes;issecret=true]$(secretwithdoublequotes)"
Thereafter, using the variable in this format {$(secretwithdoublequotes)}
to avoid the leak.
from azure-pipelines-task-lib.
Related Issues (20)
- Invalid download directory for MockTestRunner (EPERM) HOT 2
- environment variables are not picked up by task. HOT 2
- visibleRule validation failing for custom extension HOT 3
- ToolRunner is leaking the command line HOT 2
- How to authenticate using AccessToken to call DevOps API from custom PowerShell task HOT 4
- ToolRunner does not properly buffer the `stdline` and `errline`. HOT 1
- CVE-2022-37614: Critical Vulnerability in mockery module HOT 16
- Version of VstsTaskSdk packages in PSGallery module stop at 0.11.0 and does not contain fixes from 0.12.0 thru 0.14.0. Please publish newer versions referenced in release notes. HOT 2
- FR - Provide a way to get Task/Extension information HOT 4
- azure-pipelines-task-lib/node/docs /proxy.md contains a minor mistake on one of the samples HOT 4
- Build issues with deasync HOT 6
- Node version discrepancy between task library docs, tutorial docs, build, and mock task runner HOT 3
- `azure-pipelines-task-lib/task`'s `execAsync` fails on `this.tool(...)` HOT 2
- azure-pipelines-task-lib/task's _argStringToArray strips double quotes HOT 2
- It is not clear which version of the node is supported by the version of the azure-pipelines-task-lib HOT 3
- Implementing custom pipeline task to execute multiple tasks in parallel HOT 1
- Implement log grouping commands HOT 4
- Find-Match crashes if Onedrive synced file is missing on harddisk - Find-Match : Cannot convert value "4199968" to type "VstsTaskSdk.FS.Attributes" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. HOT 1
- clarify *wrapper task* and *task variable* HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-task-lib.