From 226630a3eadee56ee4e966e4efc71878bd99cc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20J=C3=B8rgensen?= Date: Wed, 18 Sep 2024 21:58:23 +0200 Subject: [PATCH] Fix Sarif format of gosec output --- .github/workflows/security.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 0efa021..6cf6d20 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -25,6 +25,8 @@ jobs: uses: securego/gosec@v2.21.3 with: args: '-no-fail -fmt sarif -out results.sarif -tests ./...' + - name: Fix SARIF format + run: yq --inplace --output-format json '.runs |= map ({"results":[]} + .)' results.sarif - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v3 with: