You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e49398f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: scanners/trivy/.helm-docs.gotmpl
+23-30Lines changed: 23 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -37,21 +37,23 @@ To learn more about the Trivy scanner itself visit [Trivy's GitHub Repository](h
37
37
38
38
The following security scan configuration example are based on the [Trivy Documentation](https://aquasecurity.github.io/trivy/), please take a look at the original documentation for more configuration examples.
39
39
40
-
- Filter the vulnerabilities by severities `trivy image --severity HIGH,CRITICAL ruby:2.4.0`
41
-
- Filter the vulnerabilities by type (`os`or`library`) `trivy image --vuln-type os ruby:2.4.0`
42
-
- Skip update of vulnerability DB: `trivy image --skip-update python:3.4-alpine3.9`
43
-
- Ignore unfixed vulnerabilities:`trivy image --ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
44
-
45
-
:::caution
46
-
Due to [limitations in the trivy argument parser](https://github.com/secureCodeBox/secureCodeBox/issues/796), scanning anything other than docker images (e.g., Git repositories) requires some extra parameters.
47
-
Please append the following extra arguments **after** specifying the mode (e.g., `repo`) but **before** specifying the target for the scan:
48
-
```yaml
49
-
- "--no-progress"
50
-
- "--format"
51
-
- "json"
52
-
- "--output"
53
-
- "/home/securecodebox/trivy-results.json"
54
-
```
40
+
### Trivy Container Image Scan
41
+
42
+
Currently we support the follwing 3 scanTypes, corresponding to the trivy scanning modes:
43
+
- scanType: "trivy-image"
44
+
- parameters: `[YOUR_IMAGE_NAME]`
45
+
- scanType: "trivy-filesystem"
46
+
- parameters: `[YOUR_PATH_TO_FILES]`
47
+
- scanType: "trivy-repo"
48
+
- parameters: `[YOUR_GITHUB_REPO]`
49
+
50
+
A complete example of each scanType are listed below in our [example docs section](https://www.securecodebox.io/docs/scanners/trivy/#examples).
51
+
52
+
Simply specify an image name (and a tag) when you use the scanType `trivy-image`. But there are also some additional configuration options e.g:
53
+
- Filter the vulnerabilities by severities `--severity HIGH,CRITICAL ruby:2.4.0`
54
+
- Filter the vulnerabilities by type (`os`or`library`) `--vuln-type os ruby:2.4.0`
55
+
- Skip update of vulnerability DB: `--skip-update python:3.4-alpine3.9`
56
+
- Ignore unfixed vulnerabilities:`--ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
55
57
56
58
A complete scan definition for the secureCodeBox repository may look something like this:
By default, the docker container of trivy will download new rulesets when starting the process.
77
72
As this download is performed directly from GitHub, you will run into API rate limiting issues after roughly 50 requests.
78
-
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/v0.20.2/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
73
+
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/latest/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
79
74
Due to [limitations in trivy](https://github.com/aquasecurity/trivy/issues/634), this mode currently only supports scanning container images.
80
75
If this fits your use case, you can deploy a rule service with the following template:
81
76
```yaml
@@ -140,7 +135,7 @@ metadata:
140
135
# Don't forget to update the namespace if necessary
141
136
namespace: default
142
137
spec:
143
-
scanType: "trivy"
138
+
scanType: "trivy-image"
144
139
parameters:
145
140
- "client"
146
141
# Again, add the extra parameters here (required to make the parser work)
@@ -158,12 +153,10 @@ spec:
158
153
```
159
154
160
155
If you want to scan anything other than docker images, you currently [cannot use the client-server mode](https://github.com/aquasecurity/trivy/issues/634) described above.
161
-
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/).
156
+
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/).
162
157
In practice, this is a difficult problem because the most natural method for providing these files in kubernetes, ConfigMaps, has a size limit of 1 MB, while the vulnerability database is over 200 MB in size (28 MB after compression).
163
158
Your best bet would thus be to serve the files from your own servers and load them into the scanner [using an initContainer](https://docs.securecodebox.io/docs/api/crds/scan#initcontainers-optional), taking care to keep the databases on your server up to date.
164
-
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/) for additional details on the required steps.
165
-
166
-
159
+
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/) for additional details on the required steps.
The following security scan configuration example are based on the [Trivy Documentation](https://aquasecurity.github.io/trivy/), please take a look at the original documentation for more configuration examples.
56
56
57
-
- Filter the vulnerabilities by severities `trivy image --severity HIGH,CRITICAL ruby:2.4.0`
58
-
- Filter the vulnerabilities by type (`os` or `library`) `trivy image --vuln-type os ruby:2.4.0`
59
-
- Skip update of vulnerability DB: `trivy image --skip-update python:3.4-alpine3.9`
60
-
- Ignore unfixed vulnerabilities:`trivy image --ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
57
+
### Trivy Container Image Scan
61
58
62
-
:::caution
63
-
Due to [limitations in the trivy argument parser](https://github.com/secureCodeBox/secureCodeBox/issues/796), scanning anything other than docker images (e.g., Git repositories) requires some extra parameters.
64
-
Please append the following extra arguments **after** specifying the mode (e.g., `repo`) but **before** specifying the target for the scan:
65
-
```yaml
66
-
- "--no-progress"
67
-
- "--format"
68
-
- "json"
69
-
- "--output"
70
-
- "/home/securecodebox/trivy-results.json"
71
-
```
59
+
Currently we support the follwing 3 scanTypes, corresponding to the trivy scanning modes:
60
+
- scanType: "trivy-image"
61
+
- parameters: `[YOUR_IMAGE_NAME]`
62
+
- scanType: "trivy-filesystem"
63
+
- parameters: `[YOUR_PATH_TO_FILES]`
64
+
- scanType: "trivy-repo"
65
+
- parameters: `[YOUR_GITHUB_REPO]`
66
+
67
+
A complete example of each scanType are listed below in our [example docs section](https://www.securecodebox.io/docs/scanners/trivy/#examples).
68
+
69
+
Simply specify an image name (and a tag) when you use the scanType `trivy-image`. But there are also some additional configuration options e.g:
70
+
- Filter the vulnerabilities by severities `--severity HIGH,CRITICAL ruby:2.4.0`
71
+
- Filter the vulnerabilities by type (`os` or `library`) `--vuln-type os ruby:2.4.0`
72
+
- Skip update of vulnerability DB: `--skip-update python:3.4-alpine3.9`
73
+
- Ignore unfixed vulnerabilities:`--ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
72
74
73
75
A complete scan definition for the secureCodeBox repository may look something like this:
By default, the docker container of trivy will download new rulesets when starting the process.
94
89
As this download is performed directly from GitHub, you will run into API rate limiting issues after roughly 50 requests.
95
-
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/v0.20.2/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
90
+
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/latest/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
96
91
Due to [limitations in trivy](https://github.com/aquasecurity/trivy/issues/634), this mode currently only supports scanning container images.
97
92
If this fits your use case, you can deploy a rule service with the following template:
98
93
```yaml
@@ -157,7 +152,7 @@ metadata:
157
152
# Don't forget to update the namespace if necessary
158
153
namespace: default
159
154
spec:
160
-
scanType: "trivy"
155
+
scanType: "trivy-image"
161
156
parameters:
162
157
- "client"
163
158
# Again, add the extra parameters here (required to make the parser work)
@@ -175,10 +170,10 @@ spec:
175
170
```
176
171
177
172
If you want to scan anything other than docker images, you currently [cannot use the client-server mode](https://github.com/aquasecurity/trivy/issues/634) described above.
178
-
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/).
173
+
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/).
179
174
In practice, this is a difficult problem because the most natural method for providing these files in kubernetes, ConfigMaps, has a size limit of 1 MB, while the vulnerability database is over 200 MB in size (28 MB after compression).
180
175
Your best bet would thus be to serve the files from your own servers and load them into the scanner [using an initContainer](https://docs.securecodebox.io/docs/api/crds/scan#initcontainers-optional), taking care to keep the databases on your server up to date.
181
-
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/) for additional details on the required steps.
176
+
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/) for additional details on the required steps.
The following security scan configuration example are based on the [Trivy Documentation](https://aquasecurity.github.io/trivy/), please take a look at the original documentation for more configuration examples.
63
63
64
-
- Filter the vulnerabilities by severities `trivy image --severity HIGH,CRITICAL ruby:2.4.0`
65
-
- Filter the vulnerabilities by type (`os` or `library`) `trivy image --vuln-type os ruby:2.4.0`
66
-
- Skip update of vulnerability DB: `trivy image --skip-update python:3.4-alpine3.9`
67
-
- Ignore unfixed vulnerabilities:`trivy image --ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
68
-
69
-
:::caution
70
-
Due to [limitations in the trivy argument parser](https://github.com/secureCodeBox/secureCodeBox/issues/796), scanning anything other than docker images (e.g., Git repositories) requires some extra parameters.
71
-
Please append the following extra arguments **after** specifying the mode (e.g., `repo`) but **before** specifying the target for the scan:
72
-
```yaml
73
-
- "--no-progress"
74
-
- "--format"
75
-
- "json"
76
-
- "--output"
77
-
- "/home/securecodebox/trivy-results.json"
78
-
```
64
+
### Trivy Container Image Scan
65
+
66
+
Currently we support the follwing 3 scanTypes, corresponding to the trivy scanning modes:
67
+
- scanType: "trivy-image"
68
+
- parameters: `[YOUR_IMAGE_NAME]`
69
+
- scanType: "trivy-filesystem"
70
+
- parameters: `[YOUR_PATH_TO_FILES]`
71
+
- scanType: "trivy-repo"
72
+
- parameters: `[YOUR_GITHUB_REPO]`
73
+
74
+
A complete example of each scanType are listed below in our [example docs section](https://www.securecodebox.io/docs/scanners/trivy/#examples).
75
+
76
+
Simply specify an image name (and a tag) when you use the scanType `trivy-image`. But there are also some additional configuration options e.g:
77
+
- Filter the vulnerabilities by severities `--severity HIGH,CRITICAL ruby:2.4.0`
78
+
- Filter the vulnerabilities by type (`os` or `library`) `--vuln-type os ruby:2.4.0`
79
+
- Skip update of vulnerability DB: `--skip-update python:3.4-alpine3.9`
80
+
- Ignore unfixed vulnerabilities:`--ignore-unfixed ruby:2.4.0` By default, Trivy also detects unpatched/unfixed vulnerabilities. This means you can't fix these vulnerabilities even if you update all packages. If you would like to ignore them, use the `--ignore-unfixed` option.
79
81
80
82
A complete scan definition for the secureCodeBox repository may look something like this:
By default, the docker container of trivy will download new rulesets when starting the process.
101
96
As this download is performed directly from GitHub, you will run into API rate limiting issues after roughly 50 requests.
102
-
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/v0.20.2/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
97
+
Trivy [supports a client-server mode](https://aquasecurity.github.io/trivy/latest/advanced/modes/client-server/) where one process downloads a copy of the rule database and provides it to the others.
103
98
Due to [limitations in trivy](https://github.com/aquasecurity/trivy/issues/634), this mode currently only supports scanning container images.
104
99
If this fits your use case, you can deploy a rule service with the following template:
105
100
```yaml
@@ -164,7 +159,7 @@ metadata:
164
159
# Don't forget to update the namespace if necessary
165
160
namespace: default
166
161
spec:
167
-
scanType: "trivy"
162
+
scanType: "trivy-image"
168
163
parameters:
169
164
- "client"
170
165
# Again, add the extra parameters here (required to make the parser work)
@@ -182,10 +177,10 @@ spec:
182
177
```
183
178
184
179
If you want to scan anything other than docker images, you currently [cannot use the client-server mode](https://github.com/aquasecurity/trivy/issues/634) described above.
185
-
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/).
180
+
Instead, you have to [manually download the ruleset and provide it to trivy](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/).
186
181
In practice, this is a difficult problem because the most natural method for providing these files in kubernetes, ConfigMaps, has a size limit of 1 MB, while the vulnerability database is over 200 MB in size (28 MB after compression).
187
182
Your best bet would thus be to serve the files from your own servers and load them into the scanner [using an initContainer](https://docs.securecodebox.io/docs/api/crds/scan#initcontainers-optional), taking care to keep the databases on your server up to date.
188
-
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/v0.20.2/advanced/air-gap/) for additional details on the required steps.
183
+
Consult the [trivy documentation](https://aquasecurity.github.io/trivy/latest/advanced/air-gap/) for additional details on the required steps.
This example shows how to use the `trivy filesystem` scan with the secureCodeBox. You can use a `ìnitContainer` and also `volumeMounts` to point to the filesystem you want to scan.
0 commit comments