Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude finding from govulncheck check #1886

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,24 @@ 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

# Exclude GO-2024-3166 since we do not believe it applies to go-tuf before v2, and additionally
# because we do not believe it applies to our usage since we do not use delegates.
- name: Evaluate govulncheck results
shell: bash
run: |
findingCount=$(jq -r '.finding | select ( . != null ) | .osv | select ( . != "GO-2024-3166")' 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
Loading