Skip to content

Commit 23acb55

Browse files
authored
Merge pull request #199 from sir-gon/develop
Develop
2 parents b1695d5 + 8dd6016 commit 23acb55

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
with:
158158
sarif_file: 'snyk.sarif'
159159
scan:
160-
name: "Trivy"
160+
name: "Trivy (sarif)"
161161
runs-on: ubuntu-latest
162162
needs: build
163163
permissions:
@@ -187,3 +187,25 @@ jobs:
187187
uses: github/codeql-action/upload-sarif@v3
188188
with:
189189
sarif_file: 'trivy-results.sarif'
190+
191+
report:
192+
name: "Trivy (report)"
193+
runs-on: ubuntu-latest
194+
needs: build
195+
steps:
196+
- name: Download artifact
197+
uses: actions/download-artifact@v4
198+
with:
199+
name: ${{ env.ARTIFACT_NAME }}_prod
200+
path: /tmp/
201+
202+
- name: Load image
203+
run: |
204+
docker load --input /tmp/${{ env.ARTIFACT_NAME }}_prod.tar
205+
docker image ls -a
206+
207+
- name: Run Trivy vulnerability scanner
208+
uses: aquasecurity/[email protected]
209+
with:
210+
image-ref: ${{ env.IMAGE_NAME }}:${{ github.sha }}
211+
format: 'table'

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ENV WORKDIR=/app
55
WORKDIR ${WORKDIR}
66

77
RUN apk add --update --no-cache make
8+
RUN apk upgrade --update --no-cache openssl libcrypto3 libssl3 # FIX CVE-2024-5535
9+
RUN apk upgrade --update --no-cache --available # FIX CVE-2024-5535 CVE-2024-4741
810

911
###############################################################################
1012
FROM base AS lint
@@ -92,6 +94,8 @@ CMD ["make", "test"]
9294
## WORKDIR and USER are maintained
9395
##
9496
FROM eclipse-temurin:22.0.1_8-jre-alpine AS production
97+
RUN apk upgrade --update --no-cache openssl libcrypto3 libssl3 # FIX CVE-2024-5535
98+
RUN apk upgrade --update --no-cache --available # FIX CVE-2024-5535 CVE-2024-4741
9599

96100
ENV LOG_LEVEL=INFO
97101
ENV BRUTEFORCE=false

0 commit comments

Comments
 (0)