Skip to content

Commit

Permalink
Update govulncheck cmd args
Browse files Browse the repository at this point in the history
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
  • Loading branch information
ArkaSaha30 committed May 10, 2024
1 parent 05f6c5a commit 3d8db78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hack/verify-govulncheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ kube::util::ensure_clean_working_dir

# This sets up the environment, like GOCACHE, which keeps the worktree cleaner.
kube::golang::setup_env
# Opt into using go modules
export GO111MODULE=on

go install golang.org/x/vuln/cmd/govulncheck@v1.1.0

Expand All @@ -40,9 +42,9 @@ git worktree add -f "${WORKTREE}" "${BRANCH}"
# Clean up the copy on exit
kube::util::trap_add "git worktree remove -f ${WORKTREE}" EXIT

govulncheck -scan module ./... > "${KUBE_TEMP}/head.txt"
govulncheck -scan package ./... > "${KUBE_TEMP}/head.txt"
pushd "${WORKTREE}" >/dev/null
govulncheck -scan module ./... > "${KUBE_TEMP}/pr-base.txt"
govulncheck -scan package ./... > "${KUBE_TEMP}/pr-base.txt"
popd >/dev/null

echo -e "\n HEAD: $(cat "${KUBE_TEMP}"/head.txt)"
Expand Down

0 comments on commit 3d8db78

Please sign in to comment.