File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,3 +148,41 @@ jobs:
148148 with :
149149 go-version-file : go.mod
150150 go-package : ./...
151+
152+ checkDockerImage :
153+ runs-on : ubuntu-latest
154+ name : scan Docker Image with Trivy
155+ steps :
156+ - name : Checkout code
157+ uses : actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # 2.0.0
158+
159+
160+ - name : Set up Docker
161+ uses : docker/setup-buildx-action@cf09c5c41b299b55c366aff30022701412eb6ab0 # v1.0.0
162+
163+ - name : Log in to Docker Hub
164+ uses : docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2
165+ with :
166+ username : ${{ secrets.DOCKER_USERNAME }}
167+ password : ${{ secrets.DOCKER_PASSWORD }}
168+ - name : Build the project
169+ run : go build -o ./cx ./cmd
170+ - name : Build Docker image
171+ run : docker build -t ast-cli:${{ github.sha }} .
172+ - name : Run Trivy scanner without downloading DBs
173+ uses : aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2
174+ with :
175+ scan-type : ' image'
176+ image-ref : ast-cli:${{ github.sha }}
177+ format : ' table'
178+ exit-code : ' 1'
179+ ignore-unfixed : true
180+ vuln-type : ' os,library'
181+ output : ' ./trivy-image-results.txt'
182+ env :
183+ TRIVY_SKIP_JAVA_DB_UPDATE : true
184+
185+ - name : Inspect action report
186+ if : always()
187+ shell : bash
188+ run : cat ./trivy-image-results.txt
Original file line number Diff line number Diff line change 1- FROM checkmarx/bash:5.2.37-r33-812e1f54f671f5 @sha256:812e1f54f671f5678f647d7762f61521a967ff1f8d376d9f38a9838e0a3659a3
1+ FROM checkmarx/bash:5.3-r5-98621acba7807a @sha256:98621acba7807a4e128f3e00aba3987e4f659ff352191f79cdbaa7f8a32cfb58
22USER nonroot
33
44COPY cx /app/bin/cx
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ require (
114114 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
115115 github.com/deitch/magic v0.0.0-20240306090643-c67ab88f10cb // indirect
116116 github.com/distribution/reference v0.6.0 // indirect
117- github.com/docker/cli v29.0.3 +incompatible // indirect
117+ github.com/docker/cli v29.2.0 +incompatible // indirect
118118 github.com/docker/distribution v2.8.3+incompatible // indirect
119119 github.com/docker/docker v28.5.2+incompatible // indirect
120120 github.com/docker/docker-credential-helpers v0.9.3 // indirect
Original file line number Diff line number Diff line change @@ -299,6 +299,8 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK
299299github.com/dlclark/regexp2 v1.11.0 /go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8 =
300300github.com/docker/cli v29.0.3+incompatible h1:8J+PZIcF2xLd6h5sHPsp5pvvJA+Sr2wGQxHkRl53a1E =
301301github.com/docker/cli v29.0.3+incompatible /go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8 =
302+ github.com/docker/cli v29.2.0+incompatible h1:9oBd9+YM7rxjZLfyMGxjraKBKE4/nVyvVfN4qNl9XRM =
303+ github.com/docker/cli v29.2.0+incompatible /go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8 =
302304github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk =
303305github.com/docker/distribution v2.8.3+incompatible /go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w =
304306github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM =
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ const (
6464 containerVolumeFlag = "-v"
6565 containerNameFlag = "--name"
6666 containerRemove = "--rm"
67- containerImage = "checkmarx/kics:v2.1.19 "
67+ containerImage = "checkmarx/kics:v2.1.20 "
6868 containerScan = "scan"
6969 containerScanPathFlag = "-p"
7070 containerScanPath = "/path"
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const (
2727 filesContainerVolume = ":/files"
2828 resultsContainerLocation = "/kics/"
2929 containerRemove = "--rm"
30- ContainerImage = "checkmarx/kics:v2.1.19 "
30+ ContainerImage = "checkmarx/kics:v2.1.20 "
3131 containerNameFlag = "--name"
3232 remediateCommand = "remediate"
3333 resultsFlag = "--results"
You can’t perform that action at this time.
0 commit comments