Skip to content

Commit 458fc17

Browse files
authored
Merge pull request #752 from aws/add-suppression-files
Add Trivy and DependencyCheck suppression files
2 parents 84bda2b + c1474fd commit 458fc17

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
3+
</suppressions>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Trivy ignore file for daily scans.
5+
# This file is intentionally empty. Daily scans should flag all CVEs.
6+
# See: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/
7+
8+
# Format:
9+
# - id: <CVE-###>
10+
# statement: "<Why are we excluding?> <link to CVE where we can track status>"
11+
# expired_at: <required - YYYY-MM-DD>
12+
13+
vulnerabilities: []

.github/workflows/daily-scan.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
curl -Ls "https://github.com/dependency-check/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip.asc" --output dependency-check.zip.asc
7272
gpg --verify dependency-check.zip.asc
7373
unzip dependency-check.zip
74-
./dependency-check/bin/dependency-check.sh --failOnCVSS 0 --nvdApiKey ${{ env.NVD_API_KEY_NVD_API_KEY }} --ossIndexUsername ${{ env.OSS_INDEX_USERNAME }} --ossIndexPassword ${{ env.OSS_INDEX_PASSWORD }} -s "scan-target/"
74+
./dependency-check/bin/dependency-check.sh --failOnCVSS 0 --nvdApiKey ${{ env.NVD_API_KEY_NVD_API_KEY }} --ossIndexUsername ${{ env.OSS_INDEX_USERNAME }} --ossIndexPassword ${{ env.OSS_INDEX_PASSWORD }} --suppression .github/dependency-check-suppressions.xml -s "scan-target/"
7575
7676
- name: Print dependency scan results on failure
7777
if: ${{ steps.dep_scan.outcome != 'success' }}
@@ -86,6 +86,8 @@ jobs:
8686
scan-ref: 'scan-target/'
8787
severity: 'CRITICAL,HIGH'
8888
exit-code: '1'
89+
env:
90+
TRIVY_IGNOREFILE: .github/trivy/daily-scan.trivyignore.yaml
8991

9092
- name: Perform low severity scan on published artifact dependencies
9193
if: always()
@@ -96,6 +98,8 @@ jobs:
9698
scan-ref: 'scan-target/'
9799
severity: 'MEDIUM,LOW,UNKNOWN'
98100
exit-code: '1'
101+
env:
102+
TRIVY_IGNOREFILE: .github/trivy/daily-scan.trivyignore.yaml
99103

100104
- name: Configure AWS Credentials for emitting metrics
101105
if: always()

0 commit comments

Comments
 (0)