From 41f98657ee35882cd6f78bec551ef546280479c0 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:25:00 +0545 Subject: [PATCH 1/9] Update node-ci-workflow.yml - Add SNYK workflow in the CI pipeline --- .github/workflows/node-ci-workflow.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 0be74d6..52e06c0 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -38,4 +38,10 @@ jobs: with: report_paths: '**/junit.xml' detailed_summary: true - include_passed: true \ No newline at end of file + include_passed: true + + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/maven@master + continue-on-error: true + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From e19a9850018de72f2f7210ec125e1f91f1d261d4 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:51:53 +0545 Subject: [PATCH 2/9] Update node-ci-workflow.yml - Remove lint step (temporarily) --- .github/workflows/node-ci-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 52e06c0..b12e3b9 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -26,8 +26,8 @@ jobs: working-directory: . run: find ./* -maxdepth 1 -name package.json -execdir npm ci \; - - name: Lint with ESLint - run: DEBUG=eslint:cli-engine npx eslint . + # - name: Lint with ESLint + # run: DEBUG=eslint:cli-engine npx eslint . - name: Test with Jest run: npx jest -c ./src/jest.config.js --ci --coverage --reporters=default --reporters=jest-junit From eef8f5300a58e1b57a4cc5e1df256f97bf37d8d3 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:57:22 +0545 Subject: [PATCH 3/9] Update node-ci-workflow.yml - Comment out unit test case and reporting (temp) --- .github/workflows/node-ci-workflow.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index b12e3b9..fd2a73b 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -29,16 +29,16 @@ jobs: # - name: Lint with ESLint # run: DEBUG=eslint:cli-engine npx eslint . - - name: Test with Jest - run: npx jest -c ./src/jest.config.js --ci --coverage --reporters=default --reporters=jest-junit - - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 - if: success() || failure() - with: - report_paths: '**/junit.xml' - detailed_summary: true - include_passed: true + # - name: Test with Jest + # run: npx jest -c ./src/jest.config.js --ci --coverage --reporters=default --reporters=jest-junit + + # - name: Publish Test Report + # uses: mikepenz/action-junit-report@v3 + # if: success() || failure() + # with: + # report_paths: '**/junit.xml' + # detailed_summary: true + # include_passed: true - name: Run Snyk to check for vulnerabilities uses: snyk/actions/maven@master From fa0192f187a8891bb6a5c10cd25e4c5c60a67c83 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:03:22 +0545 Subject: [PATCH 4/9] Update node-ci-workflow.yml - Update snyk step to use node action --- .github/workflows/node-ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index fd2a73b..23062ee 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -41,7 +41,7 @@ jobs: # include_passed: true - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/maven@master + uses: snyk/actions/node@master continue-on-error: true env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From 13271995d497117aaebc154a80d4daa3a0ea6e12 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:31:28 +0545 Subject: [PATCH 5/9] Update node-ci-workflow.yml Addj parameter in snyk step --- .github/workflows/node-ci-workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 23062ee..1162012 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -43,5 +43,7 @@ jobs: - name: Run Snyk to check for vulnerabilities uses: snyk/actions/node@master continue-on-error: true + with: + args: '--all-projects' env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From c22bdd669b23ac45eab2e3c26d10cf8a5bfb30ad Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:56:10 +0545 Subject: [PATCH 6/9] Update node-ci-workflow.yml - Update the Snyk step to include report generation and upload --- .github/workflows/node-ci-workflow.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 1162012..2a248c5 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -44,6 +44,11 @@ jobs: uses: snyk/actions/node@master continue-on-error: true with: - args: '--all-projects' + args: '--all-projects --sarif-file-output=snyk.sarif' env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + + - name: Upload snyk result to GitHub Code Scanning + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: snyk.sarif From 70d3f5b596ea2c4cf85bec3e11aa0179ca875cb9 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:58:55 +0545 Subject: [PATCH 7/9] Update node-ci-workflow.yml - Add missing permission for codeql action --- .github/workflows/node-ci-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 2a248c5..c38efb1 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -13,6 +13,8 @@ jobs: permissions: checks: write + security-events: write + contents: read steps: - uses: actions/checkout@v4 @@ -49,6 +51,6 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - name: Upload snyk result to GitHub Code Scanning - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: snyk.sarif From a4af358353aca41404919137cc5737bfc896a38d Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:52:55 +0545 Subject: [PATCH 8/9] Update node-ci-workflow.yml test changes --- .github/workflows/node-ci-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index c38efb1..94f4411 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -1,4 +1,5 @@ # This workflow will build and test a Node.js project + name: Deploy to Firebase Functions via github action on: @@ -49,8 +50,9 @@ jobs: args: '--all-projects --sarif-file-output=snyk.sarif' env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - + - name: Upload snyk result to GitHub Code Scanning uses: github/codeql-action/upload-sarif@v3 with: sarif_file: snyk.sarif + From 425277fa662cd3efc2ccd34f646c605e720b3236 Mon Sep 17 00:00:00 2001 From: sirishgf <133086123+sirishgf@users.noreply.github.com> Date: Mon, 1 Apr 2024 09:33:58 +0545 Subject: [PATCH 9/9] Update node-ci-workflow.yml --- .github/workflows/node-ci-workflow.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/node-ci-workflow.yml b/.github/workflows/node-ci-workflow.yml index 94f4411..d893708 100644 --- a/.github/workflows/node-ci-workflow.yml +++ b/.github/workflows/node-ci-workflow.yml @@ -29,20 +29,6 @@ jobs: working-directory: . run: find ./* -maxdepth 1 -name package.json -execdir npm ci \; - # - name: Lint with ESLint - # run: DEBUG=eslint:cli-engine npx eslint . - - # - name: Test with Jest - # run: npx jest -c ./src/jest.config.js --ci --coverage --reporters=default --reporters=jest-junit - - # - name: Publish Test Report - # uses: mikepenz/action-junit-report@v3 - # if: success() || failure() - # with: - # report_paths: '**/junit.xml' - # detailed_summary: true - # include_passed: true - - name: Run Snyk to check for vulnerabilities uses: snyk/actions/node@master continue-on-error: true