Skip to content

Commit

Permalink
Manually inspect govulncheck output
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Oct 11, 2024
1 parent 100a084 commit 2b7e768
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,22 @@ jobs:
- id: govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-file: './go.mod'
check-latest: true
go-package: ./...
go-version-file: './go.mod'
check-latest: true
go-package: ./...
output-format: json
output-file: govulncheck.json

- name: Evaluate govulncheck results
shell: bash
run: |

Check failure on line 62 in .github/workflows/lint.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1009:info:5:3: The mentioned syntax error was in this simple command

Check failure on line 62 in .github/workflows/lint.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1073:error:5:9: Couldn't parse this single quoted string. Fix to allow more checks

Check failure on line 62 in .github/workflows/lint.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1072:error:9:1: Expected end of single quoted string. Fix any mentioned problems and try again
findingCount=$(jq -r '.finding | select ( . != null ) | .osv' govulncheck.json | wc -l)
findingCount=$(($findingCount + 0))
if [[ $findingCount -ne 0 ]]; then
printf "govulncheck reports %d findings" "$findingCount"
jq -r '.finding | select ( . != null ) govulncheck.json
exit 1
fi
# This job is here as a github status check -- it allows us to move
# the merge dependency from being on all the jobs to this single
Expand Down

0 comments on commit 2b7e768

Please sign in to comment.