ci(govulncheck): workaround duplicate SARIF tags error

Use `jq` to deduplicate tags in the SARIF file
generated by `govulncheck` before uploading,
preventing validation failures in GitHub Actions.

Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
Dwi Siswanto
2026-01-06 06:29:51 +07:00
parent 915e9dc03f
commit c5365a82f8

View File

@@ -19,7 +19,9 @@ jobs:
- uses: actions/checkout@v6
- uses: projectdiscovery/actions/setup/go@v1
- run: go install golang.org/x/vuln/cmd/govulncheck@latest
- run: govulncheck -scan package -format sarif ./... > $OUTPUT
- run: |
govulncheck -scan package -format sarif ./... | \
jq '(.runs[].tool.driver.rules[]?.properties.tags)? |= unique' > $OUTPUT
- uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: "${{ env.OUTPUT }}"