Scan only latest image. Do only scan library vulnerabilities. (#1339)
This commit is contained in:
4
.github/workflows/trivy-scan.yml
vendored
4
.github/workflows/trivy-scan.yml
vendored
@@ -43,9 +43,9 @@ jobs:
|
|||||||
- name: Scan Docker images
|
- name: Scan Docker images
|
||||||
run: |
|
run: |
|
||||||
mkdir -p scans/eclipse/hawkbit
|
mkdir -p scans/eclipse/hawkbit
|
||||||
for IMAGE in $(docker image ls --format "{{.Repository}}:{{.Tag}}" "hawkbit-*"); do
|
for IMAGE in $(docker image ls --format "{{.Repository}}:{{.Tag}}" "hawkbit-*:latest"); do
|
||||||
echo "Scanning image ${IMAGE} ..."
|
echo "Scanning image ${IMAGE} ..."
|
||||||
./trivy image "${IMAGE}" --ignore-unfixed --severity HIGH,CRITICAL --output "scans/eclipse/hawkbit/$IMAGE.sarif" --format sarif
|
./trivy image "${IMAGE}" --ignore-unfixed --severity HIGH,CRITICAL --vuln-type library --output "scans/eclipse/hawkbit/$IMAGE.sarif" --format sarif
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Upload Docker image scan results to GitHub Security tab
|
- name: Upload Docker image scan results to GitHub Security tab
|
||||||
|
|||||||
Reference in New Issue
Block a user