Skip to content

Commit

Permalink
Adds .trivyignore and use it in the scan (#1520)
Browse files Browse the repository at this point in the history
Signed-off-by: Marinov Avgustin <[email protected]>
  • Loading branch information
avgustinmm authored Dec 15, 2023
1 parent ba648ca commit afd9f24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/.trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# org.springframework:spring-web:5.3.31.RELEASE, ineffective vulnerability - hawkBit doesn't use beans of type HttpInvokerServiceExporter in applications
CVE-2016-1000027

# org.yaml:snakeyaml:1.33, ineffective vulnerability - Not applicable. Applications does not consume user-provided YAML data
CVE-2022-1471
5 changes: 3 additions & 2 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
mvn clean install -DskipTests && \
cd hawkbit-runtime/docker/docker_build && \
chmod +x build_all_dev.sh && \
./build_all_dev.sh
./build_all_dev.sh && \
cd ../../..
- name: Determine most recent Trivy version
run: |
Expand All @@ -48,7 +49,7 @@ jobs:
mkdir -p scans/eclipse/hawkbit
for IMAGE in $(docker image ls --format "{{.Repository}}:{{.Tag}}" "hawkbit/hawkbit-*:latest"); do
echo "Scanning image ${IMAGE} ..."
./trivy image "${IMAGE}" --ignore-unfixed --severity HIGH,CRITICAL --vuln-type library --output "scans/eclipse/$IMAGE.sarif" --format sarif
./trivy image "${IMAGE}" --ignore-unfixed --ignorefile .github/workflows/.trivyignore --severity HIGH,CRITICAL --vuln-type library --output "scans/eclipse/$IMAGE.sarif" --format sarif
done
- name: Upload Docker image scan results to GitHub Security tab
Expand Down

0 comments on commit afd9f24

Please sign in to comment.