From bc0582f06f6cfba864c4aafbe17d26d50e3b0b1d Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 6 Oct 2022 22:26:32 +0000 Subject: [PATCH] fix: tests/cases/user/npm/package.json & tests/cases/user/npm/.snyk to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908 - https://snyk.io/vuln/SNYK-JS-GOT-2932019 - https://snyk.io/vuln/SNYK-JS-NPM-537603 - https://snyk.io/vuln/SNYK-JS-NPM-537604 - https://snyk.io/vuln/SNYK-JS-NPM-537606 - https://snyk.io/vuln/SNYK-JS-NPM-575435 - https://snyk.io/vuln/SNYK-JS-NPMREGISTRYFETCH-575432 - https://snyk.io/vuln/SNYK-JS-SSRI-1246392 - https://snyk.io/vuln/SNYK-JS-TAR-1536528 - https://snyk.io/vuln/SNYK-JS-TAR-1536531 - https://snyk.io/vuln/SNYK-JS-TAR-1536758 - https://snyk.io/vuln/SNYK-JS-TAR-1579147 - https://snyk.io/vuln/SNYK-JS-TAR-1579152 - https://snyk.io/vuln/SNYK-JS-TAR-1579155 - https://snyk.io/vuln/npm:chownr:20180731 The following vulnerabilities are fixed with a Snyk patch: - https://snyk.io/vuln/npm:lodash:20180130 --- tests/cases/user/npm/.snyk | 8 ++++++++ tests/cases/user/npm/package.json | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tests/cases/user/npm/.snyk diff --git a/tests/cases/user/npm/.snyk b/tests/cases/user/npm/.snyk new file mode 100644 index 0000000000000..61366937f60cb --- /dev/null +++ b/tests/cases/user/npm/.snyk @@ -0,0 +1,8 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +ignore: {} +# patches apply the minimum changes required to fix a vulnerability +patch: + 'npm:lodash:20180130': + - npm > cli-table2 > lodash: + patched: '2022-10-06T22:26:18.561Z' diff --git a/tests/cases/user/npm/package.json b/tests/cases/user/npm/package.json index 4dd45107f1b86..d9e1dd247c3eb 100644 --- a/tests/cases/user/npm/package.json +++ b/tests/cases/user/npm/package.json @@ -6,9 +6,15 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "npm": "^5.7.1" + "npm": "^7.21.0", + "@snyk/protect": "latest" }, "devDependencies": { "@types/node": "latest" - } + }, + "scripts": { + "prepublish": "npm run snyk-protect", + "snyk-protect": "snyk-protect" + }, + "snyk": true }