Skip to content

Commit 4f87803

Browse files
tintse-thxsky-MSFTDmitrii Bobreshev (Akvelon INC)
and
Dmitrii Bobreshev (Akvelon INC)
authored
Mask NpmAuth Task Secret (#19995)
* mask npm registry auth * update loc * Mask NpmAuth Task Secret - restored package-lock.json file * Mask NpmAuth Task Secret - restored package-lock.json file --------- Co-authored-by: Dmitrii Bobreshev (Akvelon INC) <[email protected]>
1 parent 111fe5c commit 4f87803

File tree

17 files changed

+2813
-1445
lines changed

17 files changed

+2813
-1445
lines changed

Tasks/NpmAuthenticateV0/_buildConfigs/Node20/Tests/package-lock.json

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/NpmAuthenticateV0/_buildConfigs/Node20/package-lock.json

+317-183
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/NpmAuthenticateV0/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ async function main(): Promise<void> {
8989
let serviceURL = URL.parse(serviceEndpoint.url);
9090
console.log(tl.loc("AddingEndpointCredentials", registryURL.host));
9191
registry = serviceEndpoint;
92+
tl.setSecret(registry.auth);
9293
addedRegistry.push(serviceURL);
9394
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, serviceURL, addedRegistry);
9495
break;
@@ -101,6 +102,7 @@ async function main(): Promise<void> {
101102
let localURL = URL.parse(localRegistry.url);
102103
console.log(tl.loc("AddingLocalCredentials"));
103104
registry = localRegistry;
105+
tl.setSecret(registry.auth);
104106
addedRegistry.push(localURL);
105107
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, localURL, addedRegistry);
106108
break;

Tasks/NpmAuthenticateV0/package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/NpmAuthenticateV0/task.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 238,
13-
"Patch": 2
12+
"Minor": 241,
13+
"Patch": 0
1414
},
1515
"runsOn": [
1616
"Agent",

Tasks/NpmAuthenticateV0/task.loc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 238,
13-
"Patch": 2
12+
"Minor": 241,
13+
"Patch": 0
1414
},
1515
"runsOn": [
1616
"Agent",
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|0.238.2
2-
Node20_229_1|0.238.3
1+
Default|0.241.0
2+
Node20_229_1|0.241.1

_generated/NpmAuthenticateV0/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ async function main(): Promise<void> {
8989
let serviceURL = URL.parse(serviceEndpoint.url);
9090
console.log(tl.loc("AddingEndpointCredentials", registryURL.host));
9191
registry = serviceEndpoint;
92+
tl.setSecret(registry.auth);
9293
addedRegistry.push(serviceURL);
9394
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, serviceURL, addedRegistry);
9495
break;
@@ -101,6 +102,7 @@ async function main(): Promise<void> {
101102
let localURL = URL.parse(localRegistry.url);
102103
console.log(tl.loc("AddingLocalCredentials"));
103104
registry = localRegistry;
105+
tl.setSecret(registry.auth);
104106
addedRegistry.push(localURL);
105107
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, localURL, addedRegistry);
106108
break;

_generated/NpmAuthenticateV0/package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_generated/NpmAuthenticateV0/task.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 238,
13-
"Patch": 2
12+
"Minor": 241,
13+
"Patch": 0
1414
},
1515
"runsOn": [
1616
"Agent",
@@ -77,7 +77,7 @@
7777
"SuccessfulAppend": "Successfully appended .npmrc"
7878
},
7979
"_buildConfigMapping": {
80-
"Default": "0.238.2",
81-
"Node20_229_1": "0.238.3"
80+
"Default": "0.241.0",
81+
"Node20_229_1": "0.241.1"
8282
}
8383
}

_generated/NpmAuthenticateV0/task.loc.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"author": "Microsoft Corporation",
1010
"version": {
1111
"Major": 0,
12-
"Minor": 238,
13-
"Patch": 2
12+
"Minor": 241,
13+
"Patch": 0
1414
},
1515
"runsOn": [
1616
"Agent",
@@ -77,7 +77,7 @@
7777
"SuccessfulAppend": "ms-resource:loc.messages.SuccessfulAppend"
7878
},
7979
"_buildConfigMapping": {
80-
"Default": "0.238.2",
81-
"Node20_229_1": "0.238.3"
80+
"Default": "0.241.0",
81+
"Node20_229_1": "0.241.1"
8282
}
8383
}

_generated/NpmAuthenticateV0_Node20/Tests/package-lock.json

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_generated/NpmAuthenticateV0_Node20/npmauth.ts

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ async function main(): Promise<void> {
8989
let serviceURL = URL.parse(serviceEndpoint.url);
9090
console.log(tl.loc("AddingEndpointCredentials", registryURL.host));
9191
registry = serviceEndpoint;
92+
tl.setSecret(registry.auth);
9293
addedRegistry.push(serviceURL);
9394
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, serviceURL, addedRegistry);
9495
break;
@@ -101,6 +102,7 @@ async function main(): Promise<void> {
101102
let localURL = URL.parse(localRegistry.url);
102103
console.log(tl.loc("AddingLocalCredentials"));
103104
registry = localRegistry;
105+
tl.setSecret(registry.auth);
104106
addedRegistry.push(localURL);
105107
npmrcFile = clearFileOfReferences(npmrc, npmrcFile, localURL, addedRegistry);
106108
break;

0 commit comments

Comments
 (0)