File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,29 @@ go-test:
149149 reports :
150150 junit : ' *.junit.xml'
151151
152+ # https://go.dev/blog/govulncheck
153+ govulncheck :
154+ stage : test
155+ needs : []
156+ rules :
157+ # Run this job during scheduled pipelines and merge requests that change dependencies.
158+ - changes : ['go.mod']
159+
160+ tags : ['image=container','cpu=${TARGET_ARCHITECTURE}']
161+ image : ' ${CI_REGISTRY}/containers/gitlab/go-toolset-ubi8'
162+ parallel :
163+ matrix :
164+ - TARGET_ARCHITECTURE : $[[ inputs.architectures ]]
165+ script :
166+ # Download govulncheck and log its version.
167+ - |-
168+ TOOL='golang.org/x/vuln/cmd/govulncheck@latest'
169+ go run "${TOOL}" --version
170+
171+ # Print any detected vulnerabilities to the log.
172+ # This fails the job when it detects a vulnerability in called code.
173+ - go run "${TOOL}" --format text --show verbose ./...
174+
152175# See: [.github/workflows/trivy.yaml]
153176trivy :
154177 stage : test
You can’t perform that action at this time.
0 commit comments