From 0671a8b71ca79e02fd3e9d9a49740fb8cbd47830 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 13 Sep 2021 19:18:15 +0200 Subject: [PATCH] workflows: upload snyk report to GitHub Signed-off-by: Patrik Oldsberg --- .github/workflows/snyk-monitor.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/snyk-monitor.yml b/.github/workflows/snyk-monitor.yml index 89a32a4429..0adb6c5bcb 100644 --- a/.github/workflows/snyk-monitor.yml +++ b/.github/workflows/snyk-monitor.yml @@ -31,3 +31,21 @@ jobs: --remote-repo-url=https://github.com/backstage/backstage env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + + # Above we run the `monitor` command, this runs the `test` command which is + # the one that generates the SARIF report that we can upload to GitHub. + - name: Create Snyk report + uses: snyk/actions/node@master + continue-on-error: true # To make sure that SARIF upload gets called + with: + args: > + --yarn-workspaces + --org=backstage-dgh + --strict-out-of-sync=false + --sarif-file-output=snyk.sarif + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + - name: Upload Snyk report + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: snyk.sarif