Skip to content

Commit 88bc648

Browse files
committed
run trivy scan on org.apache.kafka:kafka-clients:7.9.5-ccs
1 parent cbe5b34 commit 88bc648

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Trivy Dependency Scan
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch:
8+
pull_request:
9+
paths:
10+
- 'kafka-bom/build.gradle.kts'
11+
- '.github/workflows/trivy-dependency-scan.yml'
12+
13+
jobs:
14+
scan-kafka-clients:
15+
runs-on: ubuntu-22.04
16+
permissions:
17+
contents: read
18+
security-events: write
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Download Kafka Clients JAR
24+
run: |
25+
mkdir -p artifacts
26+
curl -o artifacts/kafka-clients-7.9.5-ccs.jar \
27+
https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/7.9.5-ccs/kafka-clients-7.9.5-ccs.jar
28+
29+
- name: Run Trivy vulnerability scanner
30+
uses: aquasecurity/trivy-action@master
31+
with:
32+
scan-type: 'fs'
33+
scan-ref: 'artifacts/kafka-clients-7.9.5-ccs.jar'
34+
format: 'sarif'
35+
output: 'trivy-results.sarif'
36+
severity: 'CRITICAL,HIGH'
37+
38+
- name: Upload Trivy results to GitHub Security tab
39+
uses: github/codeql-action/upload-sarif@v3
40+
if: always()
41+
with:
42+
sarif_file: 'trivy-results.sarif'
43+
44+
- name: Run Trivy vulnerability scanner (table output)
45+
uses: aquasecurity/trivy-action@master
46+
with:
47+
scan-type: 'fs'
48+
scan-ref: 'artifacts/kafka-clients-7.9.5-ccs.jar'
49+
format: 'table'
50+
severity: 'CRITICAL,HIGH'

0 commit comments

Comments
 (0)