diff --git a/lib/extractor/index.ts b/lib/extractor/index.ts index 031c2fe6..4a453f90 100644 --- a/lib/extractor/index.ts +++ b/lib/extractor/index.ts @@ -228,7 +228,7 @@ function layersWithLatestFileModifications( // if finding a deleted file - trimming to its original file name for excluding it from extractedLayers // + not adding this file if (isWhitedOutFile(filename)) { - removedFilesToIgnore.add(filename.replace(/.wh./, "")); + removedFilesToIgnore.add(removeWhiteoutPrefix(filename)); continue; } // not adding previously found to be whited out files to extractedLayers @@ -248,8 +248,32 @@ function layersWithLatestFileModifications( return extractedLayers; } +/** + * check if a file is 'whited out', which is shown by + * prefixing the filename with a .wh. + * https://www.madebymikal.com/interpreting-whiteout-files-in-docker-image-layers + * https://github.com/opencontainers/image-spec/blob/main/layer.md#whiteouts + */ export function isWhitedOutFile(filename: string) { - return filename.match(/.wh./gm); + const lastSlashIndex = filename.lastIndexOf("/"); + + if (lastSlashIndex === -1) { + // it's a file name, not a path + return filename.startsWith(".wh."); + } else { + // it's a path, so check the last part + const filenameToCheck = filename.substring(lastSlashIndex + 1); + return filenameToCheck.startsWith(".wh."); + } +} + +/** + * Remove the .wh. prefix from a whiteout file to get the original filename + */ +export function removeWhiteoutPrefix(filename: string): string { + // Replace .wh. that appears at the start or after the last slash, + // and ensure no slashes come after .wh. + return filename.replace(/^(.*\/)?\.wh\.([^\/]*)$/, "$1$2"); } function isBufferType(type: FileContent): type is Buffer { diff --git a/test/lib/extractor/index.spec.ts b/test/lib/extractor/index.spec.ts index ad9ed146..82612489 100644 --- a/test/lib/extractor/index.spec.ts +++ b/test/lib/extractor/index.spec.ts @@ -1,4 +1,8 @@ -import { getContentAsString } from "../../../lib/extractor"; +import { + getContentAsString, + isWhitedOutFile, + removeWhiteoutPrefix, +} from "../../../lib/extractor"; import { ExtractAction, ExtractedLayers } from "../../../lib/extractor/types"; describe("index", () => { @@ -18,3 +22,89 @@ describe("index", () => { expect(result).toEqual("Hello, world!"); }); }); + +describe("isWhitedOutFile", () => { + test("should return true for files containing .wh. in their path", () => { + expect(isWhitedOutFile("/etc/.wh.hosts")).toBe(true); + expect(isWhitedOutFile("/var/lib/.wh.data")).toBe(true); + expect(isWhitedOutFile("/.wh.config")).toBe(true); + }); + + test("should return false for files not containing .wh.", () => { + expect(isWhitedOutFile("/etc/hosts")).toBe(false); + expect(isWhitedOutFile("")).toBe(false); + expect(isWhitedOutFile("/")).toBe(false); + }); + + test("should return false for similar but different patterns", () => { + // make sure the dots are literal and not match all + expect(isWhitedOutFile("/etc/wh.hosts")).toBe(false); + expect(isWhitedOutFile("/etc/.whosts")).toBe(false); + expect(isWhitedOutFile("/etc/whhosts")).toBe(false); + + // dots in wrong places + expect(isWhitedOutFile("/etc/.w.h.hosts")).toBe(false); + expect(isWhitedOutFile("/etc/..wh..hosts")).toBe(false); + + // case sensitive + expect(isWhitedOutFile("/etc/.WH.hosts")).toBe(false); + expect(isWhitedOutFile("/etc/.Wh.hosts")).toBe(false); + }); + + test("should handle .wh. at different positions", () => { + expect(isWhitedOutFile(".wh.start")).toBe(true); + expect(isWhitedOutFile("middle.wh.file")).toBe(false); + expect(isWhitedOutFile("end.wh.")).toBe(false); + expect(isWhitedOutFile("/deeply/nested/path/.wh.present")).toBe(true); + expect(isWhitedOutFile("/the/.wh./in/path/present")).toBe(false); + }); +}); + +describe("removeWhiteoutPrefix", () => { + test("should remove .wh. prefix from filenames without slashes", () => { + expect(removeWhiteoutPrefix(".wh.hosts")).toBe("hosts"); + expect(removeWhiteoutPrefix(".wh.data")).toBe("data"); + expect(removeWhiteoutPrefix(".wh.config")).toBe("config"); + expect(removeWhiteoutPrefix(".wh.")).toBe(""); + expect(removeWhiteoutPrefix(".wh.file.txt")).toBe("file.txt"); + }); + + test("should remove .wh. prefix after the last slash in paths", () => { + expect(removeWhiteoutPrefix("/etc/.wh.hosts")).toBe("/etc/hosts"); + expect(removeWhiteoutPrefix("/var/lib/.wh.data")).toBe("/var/lib/data"); + expect(removeWhiteoutPrefix("/.wh.config")).toBe("/config"); + expect(removeWhiteoutPrefix("/deeply/nested/path/.wh.present")).toBe( + "/deeply/nested/path/present", + ); + expect(removeWhiteoutPrefix("/path/to/.wh.")).toBe("/path/to/"); + }); + + test("should not modify files that don't have .wh. prefix in the correct position", () => { + expect(removeWhiteoutPrefix("normal.file")).toBe("normal.file"); + expect(removeWhiteoutPrefix("/etc/hosts")).toBe("/etc/hosts"); + expect(removeWhiteoutPrefix("middle.wh.file")).toBe("middle.wh.file"); + expect(removeWhiteoutPrefix("/path/middle.wh.file")).toBe( + "/path/middle.wh.file", + ); + expect(removeWhiteoutPrefix(".whfile")).toBe(".whfile"); + expect(removeWhiteoutPrefix("/path/.whfile")).toBe("/path/.whfile"); + expect(removeWhiteoutPrefix("/xwh.txt")).toBe("/xwh.txt"); + }); + + test("should handle edge cases", () => { + expect(removeWhiteoutPrefix("")).toBe(""); + expect(removeWhiteoutPrefix("/")).toBe("/"); + expect(removeWhiteoutPrefix("//")).toBe("//"); + expect(removeWhiteoutPrefix("/.wh.")).toBe("/"); + expect(removeWhiteoutPrefix("//.wh.test")).toBe("//test"); + }); + + test("should not remove .wh. that appears in the middle of paths", () => { + expect(removeWhiteoutPrefix("/the/.wh./in/path/file")).toBe( + "/the/.wh./in/path/file", + ); + expect(removeWhiteoutPrefix("/path/.wh.dir/.wh.file")).toBe( + "/path/.wh.dir/file", + ); + }); +}); diff --git a/test/system/application-scans/__snapshots__/node.spec.ts.snap b/test/system/application-scans/__snapshots__/node.spec.ts.snap index 38f05cb0..875e2be0 100644 --- a/test/system/application-scans/__snapshots__/node.spec.ts.snap +++ b/test/system/application-scans/__snapshots__/node.spec.ts.snap @@ -55967,11 +55967,6 @@ Array [ "nodeId": "is-cidr@3.0.0", "pkgId": "is-cidr@3.0.0", }, - Object { - "deps": Array [], - "nodeId": "isexe@2.0.0", - "pkgId": "isexe@2.0.0", - }, Object { "deps": Array [], "nodeId": "lazy-property@1.0.0", @@ -56605,6 +56600,20 @@ Array [ "nodeId": "tar@4.4.13", "pkgId": "tar@4.4.13", }, + Object { + "deps": Array [], + "nodeId": "isexe@2.0.0", + "pkgId": "isexe@2.0.0", + }, + Object { + "deps": Array [ + Object { + "nodeId": "isexe@2.0.0", + }, + ], + "nodeId": "which@1.3.1", + "pkgId": "which@1.3.1", + }, Object { "deps": Array [ Object { @@ -56637,6 +56646,9 @@ Array [ Object { "nodeId": "tar@4.4.13", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "node-gyp@5.1.0", "pkgId": "node-gyp@5.1.0", @@ -56679,6 +56691,9 @@ Array [ Object { "nodeId": "umask@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "npm-lifecycle@3.1.4", "pkgId": "npm-lifecycle@3.1.4", @@ -57106,6 +57121,9 @@ Array [ Object { "nodeId": "unique-filename@1.1.1", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "pacote@9.5.12", "pkgId": "pacote@9.5.12", @@ -57584,6 +57602,9 @@ Array [ Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@5.1.0", "pkgId": "cross-spawn@5.1.0", @@ -58137,6 +58158,9 @@ Array [ Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@6.0.5", "pkgId": "cross-spawn@6.0.5", @@ -58246,6 +58270,11 @@ Array [ "nodeId": "require-main-filename@1.0.1", "pkgId": "require-main-filename@1.0.1", }, + Object { + "deps": Array [], + "nodeId": "which-module@2.0.0", + "pkgId": "which-module@2.0.0", + }, Object { "deps": Array [], "nodeId": "y18n@3.2.1", @@ -58289,6 +58318,9 @@ Array [ Object { "nodeId": "string-width@2.1.1", }, + Object { + "nodeId": "which-module@2.0.0", + }, Object { "nodeId": "y18n@3.2.1", }, @@ -58316,6 +58348,9 @@ Array [ Object { "nodeId": "update-notifier@2.5.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "y18n@4.0.0", }, @@ -58913,9 +58948,6 @@ Array [ Object { "nodeId": "is-cidr@3.0.0", }, - Object { - "nodeId": "isexe@2.0.0", - }, Object { "nodeId": "json-parse-better-errors@1.0.2", }, @@ -59153,6 +59185,9 @@ Array [ Object { "nodeId": "validate-npm-package-name@3.0.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "worker-farm@1.7.0", }, @@ -60080,13 +60115,6 @@ Array [ "version": "3.0.0", }, }, - Object { - "id": "isexe@2.0.0", - "info": Object { - "name": "isexe", - "version": "2.0.0", - }, - }, Object { "id": "lazy-property@1.0.0", "info": Object { @@ -60542,6 +60570,20 @@ Array [ "version": "4.4.13", }, }, + Object { + "id": "isexe@2.0.0", + "info": Object { + "name": "isexe", + "version": "2.0.0", + }, + }, + Object { + "id": "which@1.3.1", + "info": Object { + "name": "which", + "version": "1.3.1", + }, + }, Object { "id": "node-gyp@5.1.0", "info": Object { @@ -61550,6 +61592,13 @@ Array [ "version": "1.0.1", }, }, + Object { + "id": "which-module@2.0.0", + "info": Object { + "name": "which-module", + "version": "2.0.0", + }, + }, Object { "id": "y18n@3.2.1", "info": Object { diff --git a/test/system/application-scans/node.spec.ts b/test/system/application-scans/node.spec.ts index a36682d0..10065cb6 100644 --- a/test/system/application-scans/node.spec.ts +++ b/test/system/application-scans/node.spec.ts @@ -234,7 +234,7 @@ describe("node application scans", () => { const result = await extractContent([getNodeAppFileContentAction], { path: imageNameAndTag, }); - expect(Object.keys(result.extractedLayers).length).toEqual(608); + expect(Object.keys(result.extractedLayers).length).toEqual(610); Object.keys(result.extractedLayers).forEach((fileName) => { expect( fileName.endsWith("/package.json") || diff --git a/test/system/operating-systems/__snapshots__/ubi8.spec.ts.snap b/test/system/operating-systems/__snapshots__/ubi8.spec.ts.snap index 8e5d371d..0f973fea 100644 --- a/test/system/operating-systems/__snapshots__/ubi8.spec.ts.snap +++ b/test/system/operating-systems/__snapshots__/ubi8.spec.ts.snap @@ -7375,11 +7375,6 @@ Object { "nodeId": "ignore-by-default@1.0.1", "pkgId": "ignore-by-default@1.0.1", }, - Object { - "deps": Array [], - "nodeId": "isexe@2.0.0", - "pkgId": "isexe@2.0.0", - }, Object { "deps": Array [], "nodeId": "duplexer@0.1.1", @@ -7666,6 +7661,20 @@ Object { "nodeId": "shebang-command@1.2.0", "pkgId": "shebang-command@1.2.0", }, + Object { + "deps": Array [], + "nodeId": "isexe@2.0.0", + "pkgId": "isexe@2.0.0", + }, + Object { + "deps": Array [ + Object { + "nodeId": "isexe@2.0.0", + }, + ], + "nodeId": "which@1.3.0", + "pkgId": "which@1.3.0", + }, Object { "deps": Array [ Object { @@ -7674,6 +7683,9 @@ Object { Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.0", + }, ], "nodeId": "cross-spawn@5.1.0|1", "pkgId": "cross-spawn@5.1.0", @@ -7686,6 +7698,9 @@ Object { Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@5.1.0|2", "pkgId": "cross-spawn@5.1.0", @@ -8320,9 +8335,6 @@ Object { Object { "nodeId": "ignore-by-default@1.0.1", }, - Object { - "nodeId": "isexe@2.0.0", - }, Object { "nodeId": "minimatch@3.0.4|1", }, @@ -10112,6 +10124,15 @@ Object { "nodeId": "tar@4.4.13", "pkgId": "tar@4.4.13", }, + Object { + "deps": Array [ + Object { + "nodeId": "isexe@2.0.0", + }, + ], + "nodeId": "which@1.3.1", + "pkgId": "which@1.3.1", + }, Object { "deps": Array [ Object { @@ -10144,6 +10165,9 @@ Object { Object { "nodeId": "tar@4.4.13", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "node-gyp@5.1.0", "pkgId": "node-gyp@5.1.0", @@ -10186,6 +10210,9 @@ Object { Object { "nodeId": "umask@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "npm-lifecycle@3.1.4", "pkgId": "npm-lifecycle@3.1.4", @@ -10599,6 +10626,9 @@ Object { Object { "nodeId": "unique-filename@1.1.1", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "pacote@9.5.12", "pkgId": "pacote@9.5.12", @@ -11239,6 +11269,9 @@ Object { Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@6.0.5", "pkgId": "cross-spawn@6.0.5", @@ -11348,6 +11381,11 @@ Object { "nodeId": "require-main-filename@1.0.1", "pkgId": "require-main-filename@1.0.1", }, + Object { + "deps": Array [], + "nodeId": "which-module@2.0.0", + "pkgId": "which-module@2.0.0", + }, Object { "deps": Array [], "nodeId": "y18n@3.2.1", @@ -11391,6 +11429,9 @@ Object { Object { "nodeId": "string-width@2.1.1", }, + Object { + "nodeId": "which-module@2.0.0", + }, Object { "nodeId": "y18n@3.2.1", }, @@ -11418,6 +11459,9 @@ Object { Object { "nodeId": "update-notifier@2.5.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "y18n@4.0.0", }, @@ -12010,9 +12054,6 @@ Object { Object { "nodeId": "is-cidr@3.0.0", }, - Object { - "nodeId": "isexe@2.0.0", - }, Object { "nodeId": "json-parse-better-errors@1.0.2", }, @@ -12250,6 +12291,9 @@ Object { Object { "nodeId": "validate-npm-package-name@3.0.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "worker-farm@1.7.0", }, @@ -13079,13 +13123,6 @@ Object { "version": "1.0.1", }, }, - Object { - "id": "isexe@2.0.0", - "info": Object { - "name": "isexe", - "version": "2.0.0", - }, - }, Object { "id": "duplexer@0.1.1", "info": Object { @@ -13338,6 +13375,20 @@ Object { "version": "1.2.0", }, }, + Object { + "id": "isexe@2.0.0", + "info": Object { + "name": "isexe", + "version": "2.0.0", + }, + }, + Object { + "id": "which@1.3.0", + "info": Object { + "name": "which", + "version": "1.3.0", + }, + }, Object { "id": "cross-spawn@5.1.0", "info": Object { @@ -14934,6 +14985,13 @@ Object { "version": "4.4.13", }, }, + Object { + "id": "which@1.3.1", + "info": Object { + "name": "which", + "version": "1.3.1", + }, + }, Object { "id": "node-gyp@5.1.0", "info": Object { @@ -15606,6 +15664,13 @@ Object { "version": "1.0.1", }, }, + Object { + "id": "which-module@2.0.0", + "info": Object { + "name": "which-module", + "version": "2.0.0", + }, + }, Object { "id": "y18n@3.2.1", "info": Object { diff --git a/test/system/registry-authentication/__snapshots__/username-password.spec.ts.snap b/test/system/registry-authentication/__snapshots__/username-password.spec.ts.snap index 12d558c9..f5d1810e 100644 --- a/test/system/registry-authentication/__snapshots__/username-password.spec.ts.snap +++ b/test/system/registry-authentication/__snapshots__/username-password.spec.ts.snap @@ -1740,11 +1740,6 @@ Object { "nodeId": "is-cidr@2.0.6", "pkgId": "is-cidr@2.0.6", }, - Object { - "deps": Array [], - "nodeId": "isexe@2.0.0", - "pkgId": "isexe@2.0.0", - }, Object { "deps": Array [], "nodeId": "lazy-property@1.0.0", @@ -2360,6 +2355,20 @@ Object { "nodeId": "tar@2.2.1", "pkgId": "tar@2.2.1", }, + Object { + "deps": Array [], + "nodeId": "isexe@2.0.0", + "pkgId": "isexe@2.0.0", + }, + Object { + "deps": Array [ + Object { + "nodeId": "isexe@2.0.0", + }, + ], + "nodeId": "which@1.3.1", + "pkgId": "which@1.3.1", + }, Object { "deps": Array [ Object { @@ -2395,6 +2404,9 @@ Object { Object { "nodeId": "tar@2.2.1", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "node-gyp@3.8.0", "pkgId": "node-gyp@3.8.0", @@ -2437,6 +2449,9 @@ Object { Object { "nodeId": "umask@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "npm-lifecycle@2.1.0", "pkgId": "npm-lifecycle@2.1.0", @@ -2878,6 +2893,9 @@ Object { Object { "nodeId": "unique-filename@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "pacote@8.1.6", "pkgId": "pacote@8.1.6", @@ -3089,6 +3107,9 @@ Object { Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@5.1.0", "pkgId": "cross-spawn@5.1.0", @@ -3676,6 +3697,11 @@ Object { "nodeId": "require-main-filename@1.0.1", "pkgId": "require-main-filename@1.0.1", }, + Object { + "deps": Array [], + "nodeId": "which-module@2.0.0", + "pkgId": "which-module@2.0.0", + }, Object { "deps": Array [], "nodeId": "y18n@3.2.1", @@ -3719,6 +3745,9 @@ Object { Object { "nodeId": "string-width@2.1.1", }, + Object { + "nodeId": "which-module@2.0.0", + }, Object { "nodeId": "y18n@3.2.1", }, @@ -3746,6 +3775,9 @@ Object { Object { "nodeId": "update-notifier@2.5.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "y18n@4.0.0", }, @@ -4462,9 +4494,6 @@ Object { Object { "nodeId": "is-cidr@2.0.6", }, - Object { - "nodeId": "isexe@2.0.0", - }, Object { "nodeId": "json-parse-better-errors@1.0.2", }, @@ -4687,6 +4716,9 @@ Object { Object { "nodeId": "validate-npm-package-name@3.0.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "worker-farm@1.6.0", }, @@ -5607,13 +5639,6 @@ Object { "version": "2.0.6", }, }, - Object { - "id": "isexe@2.0.0", - "info": Object { - "name": "isexe", - "version": "2.0.0", - }, - }, Object { "id": "lazy-property@1.0.0", "info": Object { @@ -6062,6 +6087,20 @@ Object { "version": "2.2.1", }, }, + Object { + "id": "isexe@2.0.0", + "info": Object { + "name": "isexe", + "version": "2.0.0", + }, + }, + Object { + "id": "which@1.3.1", + "info": Object { + "name": "which", + "version": "1.3.1", + }, + }, Object { "id": "node-gyp@3.8.0", "info": Object { @@ -6937,6 +6976,13 @@ Object { "version": "1.0.1", }, }, + Object { + "id": "which-module@2.0.0", + "info": Object { + "name": "which-module", + "version": "2.0.0", + }, + }, Object { "id": "y18n@3.2.1", "info": Object { @@ -9123,11 +9169,6 @@ Object { "nodeId": "is-cidr@2.0.6", "pkgId": "is-cidr@2.0.6", }, - Object { - "deps": Array [], - "nodeId": "isexe@2.0.0", - "pkgId": "isexe@2.0.0", - }, Object { "deps": Array [], "nodeId": "lazy-property@1.0.0", @@ -9743,6 +9784,20 @@ Object { "nodeId": "tar@2.2.1", "pkgId": "tar@2.2.1", }, + Object { + "deps": Array [], + "nodeId": "isexe@2.0.0", + "pkgId": "isexe@2.0.0", + }, + Object { + "deps": Array [ + Object { + "nodeId": "isexe@2.0.0", + }, + ], + "nodeId": "which@1.3.1", + "pkgId": "which@1.3.1", + }, Object { "deps": Array [ Object { @@ -9778,6 +9833,9 @@ Object { Object { "nodeId": "tar@2.2.1", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "node-gyp@3.8.0", "pkgId": "node-gyp@3.8.0", @@ -9820,6 +9878,9 @@ Object { Object { "nodeId": "umask@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "npm-lifecycle@2.1.0", "pkgId": "npm-lifecycle@2.1.0", @@ -10261,6 +10322,9 @@ Object { Object { "nodeId": "unique-filename@1.1.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "pacote@8.1.6", "pkgId": "pacote@8.1.6", @@ -10472,6 +10536,9 @@ Object { Object { "nodeId": "shebang-command@1.2.0", }, + Object { + "nodeId": "which@1.3.1", + }, ], "nodeId": "cross-spawn@5.1.0", "pkgId": "cross-spawn@5.1.0", @@ -11059,6 +11126,11 @@ Object { "nodeId": "require-main-filename@1.0.1", "pkgId": "require-main-filename@1.0.1", }, + Object { + "deps": Array [], + "nodeId": "which-module@2.0.0", + "pkgId": "which-module@2.0.0", + }, Object { "deps": Array [], "nodeId": "y18n@3.2.1", @@ -11102,6 +11174,9 @@ Object { Object { "nodeId": "string-width@2.1.1", }, + Object { + "nodeId": "which-module@2.0.0", + }, Object { "nodeId": "y18n@3.2.1", }, @@ -11129,6 +11204,9 @@ Object { Object { "nodeId": "update-notifier@2.5.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "y18n@4.0.0", }, @@ -11845,9 +11923,6 @@ Object { Object { "nodeId": "is-cidr@2.0.6", }, - Object { - "nodeId": "isexe@2.0.0", - }, Object { "nodeId": "json-parse-better-errors@1.0.2", }, @@ -12070,6 +12145,9 @@ Object { Object { "nodeId": "validate-npm-package-name@3.0.0", }, + Object { + "nodeId": "which@1.3.1", + }, Object { "nodeId": "worker-farm@1.6.0", }, @@ -12990,13 +13068,6 @@ Object { "version": "2.0.6", }, }, - Object { - "id": "isexe@2.0.0", - "info": Object { - "name": "isexe", - "version": "2.0.0", - }, - }, Object { "id": "lazy-property@1.0.0", "info": Object { @@ -13445,6 +13516,20 @@ Object { "version": "2.2.1", }, }, + Object { + "id": "isexe@2.0.0", + "info": Object { + "name": "isexe", + "version": "2.0.0", + }, + }, + Object { + "id": "which@1.3.1", + "info": Object { + "name": "which", + "version": "1.3.1", + }, + }, Object { "id": "node-gyp@3.8.0", "info": Object { @@ -14320,6 +14405,13 @@ Object { "version": "1.0.1", }, }, + Object { + "id": "which-module@2.0.0", + "info": Object { + "name": "which-module", + "version": "2.0.0", + }, + }, Object { "id": "y18n@3.2.1", "info": Object { diff --git a/test/system/registry-authentication/username-password.spec.ts b/test/system/registry-authentication/username-password.spec.ts index 348b58ea..5abd991f 100644 --- a/test/system/registry-authentication/username-password.spec.ts +++ b/test/system/registry-authentication/username-password.spec.ts @@ -10,7 +10,7 @@ describe("username and password authentication", () => { process.env.SNYK_REGISTRY_USERNAME = oldSnykRegistryUsernameEnvVar; } if (oldSnykRegistryPasswordEnvVar !== undefined) { - process.env.SNYK_REGISTRY_PASSWPRD = oldSnykRegistryPasswordEnvVar; + process.env.SNYK_REGISTRY_PASSWORD = oldSnykRegistryPasswordEnvVar; } });