Skip to content

Commit 4b12763

Browse files
Masking secrets in common npm get accesstoken (#324)
* masking secrets in npm get accesstoken * Update package json
1 parent 5862fd6 commit 4b12763

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

common-npm-packages/utility-common/accesstoken.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export function getSystemAccessToken(): string {
44
tl.debug('Getting credentials for account feeds');
55
let auth = tl.getEndpointAuthorization('SYSTEMVSSCONNECTION', false);
66
if (auth && auth.scheme === 'OAuth') {
7-
tl.debug('Got auth token');
7+
tl.debug('Got auth token, setting it as secret so it does not print in console log');
8+
tl.setSecret(auth.parameters['AccessToken']);
89
return auth.parameters['AccessToken'];
910
}
1011
tl.warning(tl.loc('FeedTokenUnavailable'));

common-npm-packages/utility-common/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common-npm-packages/utility-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azure-pipelines-tasks-utility-common",
3-
"version": "3.238.0",
3+
"version": "3.241.0",
44
"description": "Common Library for Azure Rest Calls",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)