From 5137d023957ce334b8105f2a8b08b0864cc9ca5e Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 30 Aug 2023 22:31:46 +0000 Subject: [PATCH] fix: functions/package.json & functions/.snyk to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-DATEANDTIME-1054430 - https://snyk.io/vuln/SNYK-JS-JSONBIGINT-608659 - https://snyk.io/vuln/SNYK-JS-NODEFORGE-2330875 - https://snyk.io/vuln/SNYK-JS-NODEFORGE-2331908 - https://snyk.io/vuln/SNYK-JS-NODEFORGE-2430337 - https://snyk.io/vuln/SNYK-JS-NODEFORGE-2430339 - https://snyk.io/vuln/SNYK-JS-NODEFORGE-2430341 The following vulnerabilities are fixed with a Snyk patch: - https://snyk.io/vuln/SNYK-JS-HTTPSPROXYAGENT-469131 --- functions/.snyk | 18 ++++++++++++++++++ functions/package.json | 12 ++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 functions/.snyk diff --git a/functions/.snyk b/functions/.snyk new file mode 100644 index 0000000..c9060ab --- /dev/null +++ b/functions/.snyk @@ -0,0 +1,18 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.1 +ignore: {} +# patches apply the minimum changes required to fix a vulnerability +patch: + SNYK-JS-HTTPSPROXYAGENT-469131: + - firebase-admin > @google-cloud/storage > @google-cloud/common > teeny-request > https-proxy-agent: + patched: '2023-08-30T22:31:44.053Z' + id: SNYK-JS-HTTPSPROXYAGENT-469131 + path: >- + firebase-admin > @google-cloud/storage > @google-cloud/common > + teeny-request > https-proxy-agent + - firebase-admin > @google-cloud/firestore > google-gax > google-auth-library > gaxios > https-proxy-agent: + patched: '2023-08-30T22:31:44.053Z' + id: SNYK-JS-HTTPSPROXYAGENT-469131 + path: >- + firebase-admin > @google-cloud/firestore > google-gax > + google-auth-library > gaxios > https-proxy-agent diff --git a/functions/package.json b/functions/package.json index 199dd6d..20d70ad 100644 --- a/functions/package.json +++ b/functions/package.json @@ -8,7 +8,9 @@ "shell": "yarn build && firebase functions:shell", "start": "yarn shell", "test": "jest", - "test:coverage": "jest --silent --coverage --collect-coverage-from=src/**/* --collect-coverage-from=!**/__snapshots__/**" + "test:coverage": "jest --silent --coverage --collect-coverage-from=src/**/* --collect-coverage-from=!**/__snapshots__/**", + "prepublish": "npm run snyk-protect", + "snyk-protect": "snyk-protect" }, "main": "lib/index.js", "engines": { @@ -26,9 +28,10 @@ "@octokit/rest": "^16.28.7", "algoliasearch": "^3.33.0", "core-js": "^3.1.4", - "firebase-admin": "^8.3.0", + "firebase-admin": "^9.0.0", "firebase-functions": "^3.2.0", - "luxon": "^1.17.2" + "luxon": "^1.17.2", + "@snyk/protect": "latest" }, "devDependencies": { "@types/algoliasearch": "^3.30.16", @@ -49,5 +52,6 @@ "tslint-sonarts": "^1.9.0", "typescript": "^3.5.3" }, - "private": true + "private": true, + "snyk": true }