From 16ea338f2a3f14f58188c8a968effcd5b954543f Mon Sep 17 00:00:00 2001 From: Philip Hayton Date: Wed, 22 Nov 2023 22:01:57 +0000 Subject: [PATCH] fix: bearer does not upload sarif report (#2178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: bearer does not upload sarif report When issues are found the exit code is non zero and so the github action aborts before uploading the sarif report. This change fixes that issues. * chore: update bearer.yml following review --------- Co-authored-by: Cédric Fabianski Co-authored-by: Cédric Fabianski --- code-scanning/bearer.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code-scanning/bearer.yml b/code-scanning/bearer.yml index a62494a..7e66e57 100644 --- a/code-scanning/bearer.yml +++ b/code-scanning/bearer.yml @@ -1,7 +1,10 @@ -# This workflow file requires a free account on Bearer.com to manage findings, notifications and more. +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. # +# This workflow file requires a free account on Bearer.com to manage findings, notifications and more. # See https://docs.bearer.com/guides/bearer-cloud/ - name: Bearer on: @@ -27,11 +30,12 @@ jobs: # Scan code using Bearer CLI - name: Run Report id: report - uses: bearer/bearer-action@v2 + uses: bearer/bearer-action@828eeb928ce2f4a7ca5ed57fb8b59508cb8c79bc with: api-key: ${{ secrets.BEARER_TOKEN }} format: sarif output: results.sarif + exit-code: 0 # Upload SARIF file generated in previous step - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v2