From c9a8e7ed227ca3f5f6ba321b55ded31b1bbf4ecf Mon Sep 17 00:00:00 2001 From: cwong-scw <53287328+cwong-scw@users.noreply.github.com> Date: Tue, 22 Dec 2020 16:03:09 +1100 Subject: [PATCH] Update shiftleft-analysis.yml --- .github/workflows/shiftleft-analysis.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/shiftleft-analysis.yml b/.github/workflows/shiftleft-analysis.yml index 1ce689f..92aad29 100644 --- a/.github/workflows/shiftleft-analysis.yml +++ b/.github/workflows/shiftleft-analysis.yml @@ -4,7 +4,13 @@ name: SL Scan # This section configures the trigger for the workflow. Feel free to customize depending on your convention -on: push +on: + push: + branches: + - pr_test + pull_request: + branches: + - pr_test jobs: Scan-Build: @@ -46,3 +52,9 @@ jobs: uses: github/codeql-action/upload-sarif@v1 with: sarif_file: processed-sarifs + + - name: Create status check + run: | + URL="https://www.shiftleft.io/violationlist/ShiftLeftJS?apps=ShiftLeftJS&isApp=1" + GH_CHECK_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/check-runs" + curl -XPOST $GH_CHECK_URL -H "Authorization: Token ${GITHUB_TOKEN}" -H "accept: application/vnd.github.antiope-preview+json" -H "Content-Type: application/json" -d "{\"name\": \"ShiftLeft NG SAST\", \"head_sha\": \"${GITHUB_REF}\", \"external_id\": \"ShiftLeftJS\", \"details_url\": \"${URL}\", \"status\": \"completed\", \"conclusion\": \"action_required\", \"output\": {\"title\": \"ShiftLeft NG SAST Findings\", \"summary\": \"Visit ${URL} for the findings\"}}"