Skip to content

Try to fix transitive dependency conflict issue introduced at bom consumers. #6

Try to fix transitive dependency conflict issue introduced at bom consumers.

Try to fix transitive dependency conflict issue introduced at bom consumers. #6

name: Trivy Dependency Scan
on:
workflow_dispatch:
pull_request:
paths:
- 'kafka-bom/build.gradle.kts'
- '.github/workflows/trivy-dependency-scan.yml'
jobs:
scan-kafka-clients:
runs-on: ubuntu-22.04
permissions:
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Kafka Clients JAR
run: |
mkdir -p scan-context
curl -o scan-context/kafka-clients-7.9.5-ccs.jar \
https://packages.confluent.io/maven/org/apache/kafka/kafka-clients/7.9.5-ccs/kafka-clients-7.9.5-ccs.jar
- name: Create Dockerfile for scanning
run: |
cat > scan-context/Dockerfile <<EOF
FROM scratch
COPY kafka-clients-7.9.5-ccs.jar /
EOF
- name: Build Docker image
run: |
docker build -t kafka-clients-scan scan-context
- name: Run Trivy vulnerability scanner
uses: hypertrace/github-actions/trivy-image-scan@main
with:
image: kafka-clients-scan
output-mode: github