diff --git a/common-npm-packages/packaging-common/Tests/npm/npmL0.ts b/common-npm-packages/packaging-common/Tests/npm/npmL0.ts index 8552c119..9c84d63b 100644 --- a/common-npm-packages/packaging-common/Tests/npm/npmL0.ts +++ b/common-npm-packages/packaging-common/Tests/npm/npmL0.ts @@ -248,7 +248,8 @@ export function npmcommon() { }, getEndpointAuthorization: (id, optional) => { return { scheme: 'OAuth', parameters: { 'AccessToken': authToken } }; - } + }, + setSecret : msg => null }; const mockParser = { GetRegistries: (npmrc: string) => [registry] diff --git a/common-npm-packages/packaging-common/locationUtilities.ts b/common-npm-packages/packaging-common/locationUtilities.ts index 627abbcf..55e9b983 100644 --- a/common-npm-packages/packaging-common/locationUtilities.ts +++ b/common-npm-packages/packaging-common/locationUtilities.ts @@ -116,7 +116,8 @@ export function getSystemAccessToken(): string { tl.debug('Getting credentials for local feeds'); const auth = tl.getEndpointAuthorization('SYSTEMVSSCONNECTION', false); if (auth.scheme === 'OAuth') { - tl.debug('Got auth token'); + tl.debug(tl.loc("Info_GotAndMaskAuth")); + tl.setSecret(auth.parameters['AccessToken']); return auth.parameters['AccessToken']; } else { tl.warning('Could not determine credentials to use'); diff --git a/common-npm-packages/packaging-common/module.json b/common-npm-packages/packaging-common/module.json index 72d19e64..478ceaf3 100644 --- a/common-npm-packages/packaging-common/module.json +++ b/common-npm-packages/packaging-common/module.json @@ -14,6 +14,7 @@ "Info_UsingToolPath": "Using tool path: %s", "Info_UsingVersion": "Using version: %s", "Info_BasicCredRestriction": "This task now configures NuGet to send these credentials using the Basic scheme\nonly. Most users will be unaffected by this change. If these are Windows domain\ncredentials and they have recently stopped working, try setting the build\nvariable %s to the value '%s' (without quotes).", + "Info_GotAndMaskAuth":"Got auth token, setting it as secret so it does not print in console log", "NGCommon_AddingSources": "Setting credentials in NuGet.config", "NGCommon_AreaNotFoundInSps": "Unable to locate the '%s' [%s] area. The service containing that area may not be available in your region.", "NGCommon_DetectedNuGetExtensionsPath": "Detected NuGet extensions loader path (NUGET_EXTENSIONS_PATH environment variable): %s", @@ -27,6 +28,5 @@ "NGCommon_UnabletoDetectNuGetVersion": "Unknown NuGet version selected.", "NGCommon_UnableToFindTool": "Unable to find tool %s", "Warning_SessionCreationFailed": "Could not create provenance session.", - "Warning_UpdatingNuGetVersion": "Updating version of NuGet.exe to %s from %s. Behavior changes or breaking changes might occur as NuGet updates to a new version. If this is not desired, uncheck the 'Check for Latest Version' option in the task." - } + "Warning_UpdatingNuGetVersion": "Updating version of NuGet.exe to %s from %s. Behavior changes or breaking changes might occur as NuGet updates to a new version. If this is not desired, uncheck the 'Check for Latest Version' option in the task." } } \ No newline at end of file diff --git a/common-npm-packages/packaging-common/package-lock.json b/common-npm-packages/packaging-common/package-lock.json index 6703b56a..c0047d96 100644 --- a/common-npm-packages/packaging-common/package-lock.json +++ b/common-npm-packages/packaging-common/package-lock.json @@ -1,6 +1,6 @@ { "name": "azure-pipelines-tasks-packaging-common", - "version": "3.239.0", + "version": "3.241.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -177,11 +177,21 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" + }, + "dependencies": { + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } + } } }, "browser-stdout": { @@ -349,14 +359,6 @@ "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -372,9 +374,9 @@ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "fs.realpath": { "version": "1.0.0", @@ -584,7 +586,7 @@ "jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, "locate-path": { "version": "6.0.0", @@ -774,7 +776,7 @@ "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" }, "qs": { "version": "6.11.0", @@ -837,14 +839,14 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, "serialize-javascript": { "version": "5.0.1", diff --git a/common-npm-packages/packaging-common/package.json b/common-npm-packages/packaging-common/package.json index 12efbad5..b4bf2b6f 100644 --- a/common-npm-packages/packaging-common/package.json +++ b/common-npm-packages/packaging-common/package.json @@ -1,6 +1,6 @@ { "name": "azure-pipelines-tasks-packaging-common", - "version": "3.239.0", + "version": "3.241.0", "description": "Azure Pipelines Packaging Tasks Common", "scripts": { "test": "mocha _build/Tests/L0.js", @@ -9,7 +9,7 @@ "author": "Microsoft Corporation", "repository": { "type": "git", - "url": "https://github.com/Microsoft/azure-pipelines-tasks" + "url": "https://github.com/microsoft/azure-pipelines-tasks-common-packages/tree/main/common-npm-packages/packaging-common" }, "license": "MIT", "dependencies": { @@ -27,7 +27,7 @@ "ltx": "^2.6.2", "mocha": "^8.4.0", "q": "^1.5.0", - "semver": "^5.5.0", + "semver": "^5.7.2", "typed-rest-client": "1.8.4" }, "devDependencies": {