File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,13 @@ jobs:
2323 id : govulncheck-scan
2424 run : |
2525 # Run with -json (which never fails) and save to a file
26- govulncheck -json ./... > results.json
26+ govulncheck -json ./... | jq 'select(.finding)' > results.json
2727 # Count the number of findings using jq.
2828 COUNT=$(jq -s 'length' results.json)
2929 echo "Found $COUNT vulnerabilities."
3030 # Set an output for the next steps to use
3131 echo "vuln_count=$COUNT" >> $GITHUB_OUTPUT
32- - name : Upload scan results artifact
33- if : steps.govulncheck-scan.outputs.vuln_count > 0
34- uses : actions/upload-artifact@v4
35- with :
36- name : govulncheck-results-json
37- path : results.json
38- retention-days : 7
32+ cat results.json
3933 - name : Create GitHub Issue (if vulns found)
4034 if : steps.govulncheck-scan.outputs.vuln_count > 0
4135 env :
You can’t perform that action at this time.
0 commit comments