Skip to content

Commit 63ea2f5

Browse files
Add secret scanning to trivy-fs and trivy-image scanners (#213)
2 parents d860ed3 + ed66953 commit 63ea2f5

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

scanners/boostsecurityio/trivy-fs/module.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ id: boostsecurityio/trivy-fs
44
name: Trivy (Filesystem scanning)
55
namespace: boostsecurityio/trivy-fs
66
scan_types:
7+
- secrets
78
- sca
89

910
config:
@@ -106,18 +107,19 @@ steps:
106107
TRIVY_ADDITIONAL_ARGS: ${TRIVY_ADDITIONAL_ARGS---ignore-unfixed}
107108
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2
108109
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1
110+
TRIVY_SCANNERS: vuln,secret
109111
run: >
110112
$SETUP_PATH/trivy fs
111113
${TRIVY_ADDITIONAL_ARGS}
112114
--format json
113115
--no-progress
114-
--scanners vuln
116+
--scanners ${TRIVY_SCANNERS}
115117
--skip-version-check
116118
. 2>&1
117119
format: sarif
118120
post-processor:
119121
docker:
120-
image: public.ecr.aws/boostsecurityio/boost-scanner-trivy:fba2c2b@sha256:42514869cb1ad36e13bd51e55523de6a767104094ec9e99391de89835a388dfd
122+
image: public.ecr.aws/boostsecurityio/boost-scanner-trivy:b990ceb@sha256:d4871661744790add629604c85b396458e54cec780ac881a5c3e4fa9fd1dde22
121123
command: process
122124
environment:
123125
PYTHONIOENCODING: utf-8
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
import:
22
- boostsecurityio/sca-cve
3+
- boostsecurityio/stored-secrets

scanners/boostsecurityio/trivy-image/module.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ id: boostsecurityio/trivy-image
44
name: Trivy (Image scanning)
55
namespace: boostsecurityio/trivy-image
66
scan_types:
7+
- secrets
78
- sca_container
89

910
config:
@@ -60,18 +61,19 @@ steps:
6061
TRIVY_ADDITIONAL_ARGS: ${TRIVY_ADDITIONAL_ARGS---ignore-unfixed}
6162
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2,ghcr.io/aquasecurity/trivy-db:2
6263
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1,ghcr.io/aquasecurity/trivy-java-db:1
64+
TRIVY_SCANNERS: vuln,secret
6365
run: >
6466
$SETUP_PATH/trivy image
6567
${TRIVY_ADDITIONAL_ARGS}
6668
--format json
67-
--scanners vuln
69+
--scanners ${TRIVY_SCANNERS}
6870
--skip-version-check
6971
--quiet
7072
${BOOST_IMAGE_NAME}
7173
format: sarif
7274
post-processor:
7375
docker:
74-
image: public.ecr.aws/boostsecurityio/boost-scanner-trivy:fba2c2b@sha256:42514869cb1ad36e13bd51e55523de6a767104094ec9e99391de89835a388dfd
76+
image: public.ecr.aws/boostsecurityio/boost-scanner-trivy:b990ceb@sha256:d4871661744790add629604c85b396458e54cec780ac881a5c3e4fa9fd1dde22
7577
command: process
7678
workdir: /code
7779
environment:

scanners/boostsecurityio/trivy-image/rules.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import:
2+
- boostsecurityio/stored-secrets
13
rules:
24
cve-unknown:
35
categories:

0 commit comments

Comments
 (0)