Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dianashevchenko committed Dec 1, 2022
1 parent 2070ce7 commit 5f288ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/govulncheck.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
found=0
function check_results {
results=$(echo $content | grep -Eo '\w+-\d+-\d+' | uniq)
results=$(govulncheck $path | grep -Eo '\w+-\d+-\d+' | uniq)
if [ $(echo $results | wc -l) -gt 0 ]; then
echo "Found these vulnerabilities in $path:"
echo $results
exit 1
found=$(($found || 1))
fi
}
content=$(govulncheck ./ddtrace/...) path=./ddtrace/... check_results
path=./ddtrace/... check_results
path=./appsec/... check_results
path=./internal/... check_results
path=./contrib/... check_results
path=./profiler/... check_results


8 changes: 5 additions & 3 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ jobs:
go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck in packages
run: |
found=0
function check_results {
results=$(govulncheck $path | grep -Eo '\w+-\d+-\d+' | uniq)
if [ $(echo $results | wc -l) -gt 0 ]; then
echo "Found these vulnerabilities in $path:"
echo $results
exit 1
echo "Found these vulnerabilities in $path:"
echo $results
found=$(($found || 1))
fi
}
path=./ddtrace/... check_results
Expand All @@ -39,3 +40,4 @@ jobs:
path=./contrib/... check_results
path=./profiler/... check_results

0 comments on commit 5f288ba

Please sign in to comment.