mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Update hack/verify-govulncheck.sh
Co-authored-by: LX <hwdefcom@outlook.com> Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
# Copyright 2022 The Kubernetes Authors.
 | 
			
		||||
# Copyright 2023 The Kubernetes Authors.
 | 
			
		||||
#
 | 
			
		||||
# Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
# you may not use this file except in compliance with the License.
 | 
			
		||||
@@ -18,12 +18,12 @@ set -euo pipefail
 | 
			
		||||
export WORKDIR=${ARTIFACTS:-$TMPDIR}
 | 
			
		||||
export PATH=$PATH:$GOPATH/bin
 | 
			
		||||
mkdir -p "${WORKDIR}"
 | 
			
		||||
pushd "$WORKDIR"
 | 
			
		||||
go install golang.org/x/vuln/cmd/govulncheck@v1.0.1
 | 
			
		||||
popd
 | 
			
		||||
 | 
			
		||||
govulncheck -scan module ./... > "${WORKDIR}/head.txt"
 | 
			
		||||
 | 
			
		||||
git reset --hard HEAD
 | 
			
		||||
git checkout -b base "${PULL_BASE_SHA}"
 | 
			
		||||
govulncheck -scan module ./... > "${WORKDIR}/pr-base.txt"
 | 
			
		||||
 | 
			
		||||
diff -s -u --ignore-all-space "${WORKDIR}"/pr-base.txt "${WORKDIR}"/head.txt || true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user