diff --git a/functions/helloworld/.snyk b/functions/helloworld/.snyk new file mode 100644 index 0000000000..fa60cbdb4c --- /dev/null +++ b/functions/helloworld/.snyk @@ -0,0 +1,12 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.14.1 +ignore: {} +# patches apply the minimum changes required to fix a vulnerability +patch: + SNYK-JS-LODASH-567746: + - pug > pug-code-gen > constantinople > babel-types > lodash: + patched: '2020-04-30T21:06:32.124Z' + - pug > pug-filters > constantinople > babel-types > lodash: + patched: '2020-04-30T21:06:32.124Z' + - pug > pug-code-gen > pug-attrs > constantinople > babel-types > lodash: + patched: '2020-04-30T21:06:32.124Z' diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index 4d82d52f16..50eb524416 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -14,13 +14,16 @@ "scripts": { "e2e-test": "export FUNCTIONS_CMD='gcloud functions' && sh test/updateFunctions.sh && BASE_URL=\"https://$GCP_REGION-$GCLOUD_PROJECT.cloudfunctions.net/\" ava -T 20s --verbose test/*.test.js", "test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose -c 1 test/index.test.js", - "system-test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose test/*.test.js" + "system-test": "export FUNCTIONS_CMD='functions-emulator' && sh test/updateFunctions.sh && export BASE_URL=\"http://localhost:8010/$GCLOUD_PROJECT/$GCF_REGION\" && ava -T 20s --verbose test/*.test.js", + "snyk-protect": "snyk protect", + "prepublish": "npm run snyk-protect" }, "dependencies": { "@google-cloud/debug-agent": "^3.0.0", "escape-html": "^1.0.3", "pug": "^2.0.3", - "safe-buffer": "^5.1.2" + "safe-buffer": "^5.1.2", + "snyk": "^1.316.1" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.0.0", @@ -45,5 +48,6 @@ "FUNCTIONS_BUCKET", "FUNCTIONS_CMD" ] - } + }, + "snyk": true }