@@ -27,63 +27,64 @@ trivy kubernetes [flags] { cluster | all | specific resources like kubectl. eg:
27
27
### Options
28
28
29
29
```
30
- -A, --all-namespaces fetch resources from all cluster namespaces
31
- --cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
32
- --cache-ttl duration cache TTL when using redis as cache backend
33
- --clear-cache clear image caches without scanning
34
- --compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
35
- --components strings specify which components to scan (default [workload,infra])
36
- --config-data strings specify paths from which data for the Rego policies will be recursively loaded
37
- --config-policy strings specify paths to the Rego policy files directory, applying config files
38
- --context string specify a context to scan
39
- --db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
40
- --dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
41
- --download-db-only download/update vulnerability database but don't run a scan
42
- --download-java-db-only download/update Java index database but don't run a scan
43
- --exit-code int specify exit code when any security issues are found
44
- --file-patterns strings specify config file patterns
45
- -f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
46
- --helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
47
- --helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
48
- --helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
49
- --helm-values strings specify paths to override the Helm values.yaml files
50
- -h, --help help for kubernetes
51
- --ignore-policy string specify the Rego file path to evaluate each vulnerability
52
- --ignore-unfixed display only fixed vulnerabilities
53
- --ignorefile string specify .trivyignore file (default ".trivyignore")
54
- --include-non-failures include successes and exceptions, available with '--scanners config'
55
- --java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
56
- --k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
57
- --kubeconfig string specify the kubeconfig file path to use
58
- --list-all-pkgs enabling the option will output all packages regardless of vulnerability
59
- -n, --namespace string specify a namespace to scan
60
- --no-progress suppress progress bar
61
- --offline-scan do not issue API requests to identify dependencies
62
- -o, --output string output file name
63
- --parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
64
- --policy-namespaces strings Rego namespaces
65
- --redis-ca string redis ca file location, if using redis as cache backend
66
- --redis-cert string redis certificate file location, if using redis as cache backend
67
- --redis-key string redis key file location, if using redis as cache backend
68
- --redis-tls enable redis TLS with public certificates, if using redis as cache backend
69
- --rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
70
- --report string specify a report format for the output. (all,summary) (default "all")
71
- --reset remove all caches and database
72
- --sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
73
- --scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
74
- --secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
75
- -s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
76
- --skip-db-update skip updating vulnerability database
77
- --skip-dirs strings specify the directories where the traversal is skipped
78
- --skip-files strings specify the file paths to skip traversal
79
- --skip-java-db-update skip updating Java index database
80
- --skip-policy-update skip fetching rego policy updates
81
- --slow scan over time with lower CPU and memory utilization
82
- -t, --template string output template
83
- --tf-vars strings specify paths to override the Terraform tfvars files
84
- --tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
85
- --trace enable more verbose trace output for custom queries
86
- --vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
30
+ -A, --all-namespaces fetch resources from all cluster namespaces
31
+ --cache-backend string cache backend (e.g. redis://localhost:6379) (default "fs")
32
+ --cache-ttl duration cache TTL when using redis as cache backend
33
+ --clear-cache clear image caches without scanning
34
+ --compliance string compliance report to generate (k8s-nsa,k8s-cis, k8s-pss-baseline, k8s-pss-restricted)
35
+ --components strings specify which components to scan (default [workload,infra])
36
+ --config-data strings specify paths from which data for the Rego policies will be recursively loaded
37
+ --config-policy strings specify paths to the Rego policy files directory, applying config files
38
+ --context string specify a context to scan
39
+ --db-repository string OCI repository to retrieve trivy-db from (default "ghcr.io/aquasecurity/trivy-db")
40
+ --dependency-tree [EXPERIMENTAL] show dependency origin tree of vulnerable packages
41
+ --download-db-only download/update vulnerability database but don't run a scan
42
+ --download-java-db-only download/update Java index database but don't run a scan
43
+ --exit-code int specify exit code when any security issues are found
44
+ --file-patterns strings specify config file patterns
45
+ -f, --format string format (table, json, template, sarif, cyclonedx, spdx, spdx-json, github, cosign-vuln) (default "table")
46
+ --helm-set strings specify Helm values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
47
+ --helm-set-file strings specify Helm values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
48
+ --helm-set-string strings specify Helm string values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
49
+ --helm-values strings specify paths to override the Helm values.yaml files
50
+ -h, --help help for kubernetes
51
+ --ignore-policy string specify the Rego file path to evaluate each vulnerability
52
+ --ignore-unfixed display only fixed vulnerabilities
53
+ --ignorefile string specify .trivyignore file (default ".trivyignore")
54
+ --include-non-failures include successes and exceptions, available with '--scanners config'
55
+ --java-db-repository string OCI repository to retrieve trivy-java-db from (default "ghcr.io/aquasecurity/trivy-java-db")
56
+ --k8s-version string specify k8s version to validate outdated api by it (example: 1.21.0)
57
+ --kubeconfig string specify the kubeconfig file path to use
58
+ --list-all-pkgs enabling the option will output all packages regardless of vulnerability
59
+ -n, --namespace string specify a namespace to scan
60
+ --no-progress suppress progress bar
61
+ --node-collector-namespace string specify the namespace in which the node-collector job should be deployed (default "trivy-temp")
62
+ --offline-scan do not issue API requests to identify dependencies
63
+ -o, --output string output file name
64
+ --parallel int number (between 1-20) of goroutines enabled for parallel scanning (default 5)
65
+ --policy-namespaces strings Rego namespaces
66
+ --redis-ca string redis ca file location, if using redis as cache backend
67
+ --redis-cert string redis certificate file location, if using redis as cache backend
68
+ --redis-key string redis key file location, if using redis as cache backend
69
+ --redis-tls enable redis TLS with public certificates, if using redis as cache backend
70
+ --rekor-url string [EXPERIMENTAL] address of rekor STL server (default "https://rekor.sigstore.dev")
71
+ --report string specify a report format for the output. (all,summary) (default "all")
72
+ --reset remove all caches and database
73
+ --sbom-sources strings [EXPERIMENTAL] try to retrieve SBOM from the specified sources (oci,rekor)
74
+ --scanners string comma-separated list of what security issues to detect (vuln,config,secret,license) (default "vuln,config,secret,rbac")
75
+ --secret-config string specify a path to config file for secret scanning (default "trivy-secret.yaml")
76
+ -s, --severity string severities of security issues to be displayed (comma separated) (default "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL")
77
+ --skip-db-update skip updating vulnerability database
78
+ --skip-dirs strings specify the directories where the traversal is skipped
79
+ --skip-files strings specify the file paths to skip traversal
80
+ --skip-java-db-update skip updating Java index database
81
+ --skip-policy-update skip fetching rego policy updates
82
+ --slow scan over time with lower CPU and memory utilization
83
+ -t, --template string output template
84
+ --tf-vars strings specify paths to override the Terraform tfvars files
85
+ --tolerations strings specify node-collector job tolerations (example: key1=value1:NoExecute,key2=value2:NoSchedule)
86
+ --trace enable more verbose trace output for custom queries
87
+ --vuln-type strings comma-separated list of vulnerability types (os,library) (default [os,library])
87
88
```
88
89
89
90
### Options inherited from parent commands
0 commit comments