Skip to content

Commit 110b9c7

Browse files
committed
update trivy action
1 parent 780aab6 commit 110b9c7

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/trivy-dependency-scan.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,23 @@ jobs:
1919

2020
- name: Download Kafka Clients JAR
2121
run: |
22-
mkdir -p artifacts
23-
curl -o artifacts/kafka-clients-7.9.5-ccs.jar \
22+
mkdir -p scan-context
23+
curl -o scan-context/kafka-clients-7.9.5-ccs.jar \
2424
https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/7.9.5-ccs/kafka-clients-7.9.5-ccs.jar
2525
26+
- name: Create Dockerfile for scanning
27+
run: |
28+
cat > scan-context/Dockerfile <<EOF
29+
FROM scratch
30+
COPY kafka-clients-7.9.5-ccs.jar /
31+
EOF
32+
33+
- name: Build Docker image
34+
run: |
35+
docker build -t kafka-clients-scan:7.9.5-ccs scan-context
36+
2637
- name: Run Trivy vulnerability scanner
2738
uses: hypertrace/github-actions/trivy-image-scan@main
2839
with:
29-
image: artifacts/kafka-clients-7.9.5-ccs.jar
40+
image: kafka-clients-scan:7.9.5-ccs
3041
output-mode: github

0 commit comments

Comments
 (0)