-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation about vulnerability database persistence (#267)
* fix: avoid applying trivy Job if vulnerability scan is disabled * fix: avoid applying trivy PVC if vulnerability scan is disabled * update descriptions of some persistence variables * add documentation about vulnerability database persistence * update trivy page * link trivy page
- Loading branch information
Showing
7 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Vulnerability Database Persistence | ||
|
||
[Trivy](../plugins/trivy.md) utilizes a database containing vulnerability information in its scan. | ||
[This database is updated every **6 hours**](https://aquasecurity.github.io/trivy/v0.50/docs/scanner/vulnerability/#database). | ||
|
||
When scanning JAR files, Trivy downloads a specific database for Java every **3 days**. | ||
|
||
Both databases are distributed via [GitHub Container registry (GHCR)](https://ghcr.io/aquasecurity/trivy-db) and cached | ||
by Trivy in local file system. | ||
|
||
Starting with version 0.8.4, Zora persists Trivy databases by default, caching them between the scheduled scans. | ||
This means that scheduled scans may not need to download the databases, saving compute resources, time, and networking. | ||
|
||
It's done by applying a [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) during | ||
a Zora installation/upgrade through Helm. A Job is also applied, which just downloads the vulnerability database to be | ||
ready for the first scheduled scan. | ||
|
||
This persistence can be disabled or configured with the following Helm parameters: | ||
|
||
| Key | Type | Default | Description | | ||
|-----------------------------------------------|--------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------| | ||
| scan.plugins.trivy.persistence.enabled | bool | `true` | Specifies whether Trivy vulnerabilities database should be persisted between the scans, using PersistentVolumeClaim | | ||
| scan.plugins.trivy.persistence.accessMode | string | `"ReadWriteOnce"` | [Persistence access mode](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | | ||
| scan.plugins.trivy.persistence.storageClass | string | `""` | [Persistence storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/). Set to empty for default storage class | | ||
| scan.plugins.trivy.persistence.storageRequest | string | `"1Gi"` | Persistence storage size | | ||
| scan.plugins.trivy.persistence.downloadJavaDB | bool | `false` | Specifies whether Java vulnerability database should be downloaded on helm install/upgrade | | ||
|
||
These parameters can be specified using the `--set key=value` argument in `helm upgrade --install` command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters