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 }