Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump up trivy to v0.57.1 #2301

Merged
merged 28 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
71ca56f
chore: bump up trivy to v0.56.2
afdesk Oct 29, 2024
89f21cc
bump up trivy-check
afdesk Oct 30, 2024
3a815a2
fix dep conflicts
afdesk Nov 1, 2024
334751d
refactor: rebase go.mod
afdesk Nov 1, 2024
58e2136
chore: update static yaml files
afdesk Nov 1, 2024
1204a96
chore: rerun tests
afdesk Nov 1, 2024
a89494d
fix: incorrect check for duplicate controller names
afdesk Nov 1, 2024
b03908a
ci: bump timeouts up 10 minutes
afdesk Nov 1, 2024
d8de3e3
chore: bump Trivy up 0.57.0
afdesk Nov 5, 2024
6452f57
chore: install yamllint
afdesk Nov 5, 2024
5a0d452
chore: set up a specific ubuntu version for GH runners
afdesk Nov 5, 2024
87f353e
ci: bump up helm chart testing
afdesk Nov 5, 2024
f8575ea
ci: set up a specific version for helm chart testing
afdesk Nov 5, 2024
ebc006d
chore: increase a timeout for helm test
afdesk Nov 5, 2024
dcc5767
ci: bump up timeouts
afdesk Nov 5, 2024
ba9d2a2
chore: bump Trivy up in helm chart
afdesk Nov 6, 2024
4a729eb
docs: bump up Trivy version
afdesk Nov 6, 2024
04ef243
chore: update static yaml
afdesk Nov 6, 2024
b624330
chore: using docker.io as a registry
afdesk Nov 6, 2024
0d7cd94
chore: update docs and static yaml
afdesk Nov 6, 2024
8756ee4
chore: skip validation of controller name
afdesk Nov 12, 2024
abb6ac0
chore: revert registry from docker to ghcr
afdesk Nov 12, 2024
709ae3c
chore: remove timeouts for tests
afdesk Nov 12, 2024
dd6e583
chore: bump up trivy-check tag
afdesk Nov 13, 2024
0ed3a51
chore: using embedded rego policies
afdesk Nov 14, 2024
873864d
chore: show logs for failures
afdesk Nov 14, 2024
5fa71c0
chore: using mirror.gcr.io instead of ghcr.io
afdesk Nov 15, 2024
402357b
update to trivy v0.57.1
simar7 Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ jobs:
run: >
./bin/kuttl test --start-kind=false --config tests/e2e/config/cluster-scan.yaml

- name: The job has failed - print the logs
if: ${{ failure() }}
run: >
kubectl logs -n trivy-system deployment/trivy-operator

- name: Delete kind cluster
run: |
kind delete cluster
4 changes: 3 additions & 1 deletion .github/workflows/chart-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:
jobs:
chart-testing:
name: Run chart testing
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
Expand Down Expand Up @@ -82,6 +82,8 @@ jobs:
- name: Setup chart-testing
id: lint
uses: helm/[email protected]
- name: Install yamllint
run: pip install yamllint
- name: Run chart-testing
run: ct lint-and-install --validate-maintainers=false --charts deploy/helm
- name: Delete kind cluster
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/private-registries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ concurrency:
jobs:
private-registry-testing:
name: private registry testing
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
DOCKER_CLI_EXPERIMENTAL: enabled
steps:
Expand Down
16 changes: 8 additions & 8 deletions deploy/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Keeps security report resources updated
| policiesBundle.registryPassword | string | `nil` | registryPassword is the password for the registry |
| policiesBundle.registryUser | string | `nil` | registryUser is the user for the registry |
| policiesBundle.repository | string | `"aquasecurity/trivy-checks"` | repository of the policies bundle |
| policiesBundle.tag | int | `0` | tag version of the policies bundle |
| policiesBundle.tag | int | `1` | tag version of the policies bundle |
| priorityClassName | string | `""` | priorityClassName set the operator priorityClassName |
| rbac.create | bool | `true` | |
| resources | object | `{}` | |
Expand Down Expand Up @@ -128,8 +128,8 @@ Keeps security report resources updated
| trivy.clientServerSkipUpdate | bool | `false` | clientServerSkipUpdate is the flag to enable skip databases update for Trivy client. Only applicable in ClientServer mode. |
| trivy.command | string | `"image"` | command. One of `image`, `filesystem` or `rootfs` scanning, depending on the target type required for the scan. For 'filesystem' and `rootfs` scanning, ensure that the `trivyOperator.scanJobPodTemplateContainerSecurityContext` is configured to run as the root user (runAsUser = 0). |
| trivy.createConfig | bool | `true` | createConfig indicates whether to create config objects |
| trivy.dbRegistry | string | `"ghcr.io"` | |
| trivy.dbRepository | string | `"aquasecurity/trivy-db"` | |
| trivy.dbRegistry | string | `"mirror.gcr.io"` | |
| trivy.dbRepository | string | `"aquasec/trivy-db"` | |
| trivy.dbRepositoryInsecure | string | `"false"` | The Flag to enable insecure connection for downloading trivy-db via proxy (air-gaped env) |
| trivy.dbRepositoryPassword | string | `nil` | The password for dbRepository authentication |
| trivy.dbRepositoryUsername | string | `nil` | The username for dbRepository authentication |
Expand All @@ -145,12 +145,12 @@ Keeps security report resources updated
| trivy.image.pullPolicy | string | `"IfNotPresent"` | pullPolicy is the imge pull policy used for trivy image , valid values are (Always, Never, IfNotPresent) |
| trivy.image.registry | string | `"ghcr.io"` | registry of the Trivy image |
| trivy.image.repository | string | `"aquasecurity/trivy"` | repository of the Trivy image |
| trivy.image.tag | string | `"0.53.0"` | tag version of the Trivy image |
| trivy.image.tag | string | `"0.57.1"` | tag version of the Trivy image |
| trivy.imageScanCacheDir | string | `"/tmp/trivy/.cache"` | imageScanCacheDir the flag to set custom path for trivy image scan `cache-dir` parameter. Only applicable in image scan mode. |
| trivy.includeDevDeps | bool | `false` | includeDevDeps include development dependencies in the report (supported: npm, yarn) (default: false) note: this flag is only applicable when trivy.command is set to filesystem |
| trivy.insecureRegistries | object | `{}` | The registry to which insecure connections are allowed. There can be multiple registries with different keys. |
| trivy.javaDbRegistry | string | `"ghcr.io"` | javaDbRegistry is the registry for the Java vulnerability database. |
| trivy.javaDbRepository | string | `"aquasecurity/trivy-java-db"` | |
| trivy.javaDbRegistry | string | `"mirror.gcr.io"` | javaDbRegistry is the registry for the Java vulnerability database. |
| trivy.javaDbRepository | string | `"aquasec/trivy-java-db"` | |
| trivy.labels | object | `{}` | labels is the extra labels to be used for trivy server statefulset |
| trivy.mode | string | `"Standalone"` | mode is the Trivy client mode. Either Standalone or ClientServer. Depending on the active mode other settings might be applicable or required. |
| trivy.noProxy | string | `nil` | noProxy is a comma separated list of IPs and domain names that are not subject to proxy settings. |
Expand Down Expand Up @@ -183,8 +183,8 @@ Keeps security report resources updated
| trivy.storageSize | string | `"5Gi"` | storageSize is the size of the trivy server PVC |
| trivy.supportedConfigAuditKinds | string | `"Workload,Service,Role,ClusterRole,NetworkPolicy,Ingress,LimitRange,ResourceQuota"` | The Flag is the list of supported kinds separated by comma delimiter to be scanned by the config audit scanner |
| trivy.timeout | string | `"5m0s"` | timeout is the duration to wait for scan completion. |
| trivy.useBuiltinRegoPolicies | string | `"true"` | The Flag to enable the usage of builtin rego policies by default, these policies are downloaded by default from ghcr.io/aquasecurity/trivy-checks |
| trivy.useEmbeddedRegoPolicies | string | `"false"` | To enable the usage of embedded rego policies, set the flag useEmbeddedRegoPolicies. This should serve as a fallback for air-gapped environments. When useEmbeddedRegoPolicies is set to true, useBuiltinRegoPolicies should be set to false. |
| trivy.useBuiltinRegoPolicies | string | `"false"` | The Flag to enable the usage of builtin rego policies by default, these policies are downloaded by default from ghcr.io/aquasecurity/trivy-checks |
| trivy.useEmbeddedRegoPolicies | string | `"true"` | To enable the usage of embedded rego policies, set the flag useEmbeddedRegoPolicies. This should serve as a fallback for air-gapped environments. When useEmbeddedRegoPolicies is set to true, useBuiltinRegoPolicies should be set to false. |
| trivy.valuesFromConfigMap | string | `""` | vaulesFromConfigMap name of a ConfigMap to apply TRIVY_* environment variables. Will override Helm values. |
| trivy.valuesFromSecret | string | `""` | valuesFromSecret name of a Secret to apply TRIVY_* environment variables. Will override Helm AND ConfigMap values. |
| trivy.vulnType | string | `nil` | vulnType can be used to tell Trivy to filter vulnerabilities by a pkg-type (library, os) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ spec:
type: number
V3Vector:
type: string
V40Score:
type: number
V40Vector:
type: string
type: object
type: object
cvsssource:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ spec:
type: number
V3Vector:
type: string
V40Score:
type: number
V40Vector:
type: string
type: object
type: object
cvsssource:
Expand Down
16 changes: 8 additions & 8 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ trivy:
# -- repository of the Trivy image
repository: aquasecurity/trivy
# -- tag version of the Trivy image
tag: 0.53.0
tag: 0.57.1
# -- imagePullSecret is the secret name to be used when pulling trivy image from private registries example : reg-secret
# It is the user responsibility to create the secret for the private registry in `trivy-operator` namespace
imagePullSecret: ~
Expand Down Expand Up @@ -517,8 +517,8 @@ trivy:
serverCustomHeaders: ~
# serverCustomHeaders: "foo=bar"

dbRegistry: "ghcr.io"
dbRepository: "aquasecurity/trivy-db"
dbRegistry: "mirror.gcr.io"
dbRepository: "aquasec/trivy-db"

# -- The username for dbRepository authentication
#
Expand All @@ -529,22 +529,22 @@ trivy:
dbRepositoryPassword: ~

# -- javaDbRegistry is the registry for the Java vulnerability database.
javaDbRegistry: "ghcr.io"
javaDbRepository: "aquasecurity/trivy-java-db"
javaDbRegistry: "mirror.gcr.io"
javaDbRepository: "aquasec/trivy-java-db"

# -- The Flag to enable insecure connection for downloading trivy-db via proxy (air-gaped env)
#
dbRepositoryInsecure: "false"

# -- The Flag to enable the usage of builtin rego policies by default, these policies are downloaded by default from ghcr.io/aquasecurity/trivy-checks
#
useBuiltinRegoPolicies: "true"
useBuiltinRegoPolicies: "false"
# -- The Flag to enable the usage of external rego policies config-map, this should be used when the user wants to use their own rego policies
#
externalRegoPoliciesEnabled: false
# -- To enable the usage of embedded rego policies, set the flag useEmbeddedRegoPolicies. This should serve as a fallback for air-gapped environments.
# When useEmbeddedRegoPolicies is set to true, useBuiltinRegoPolicies should be set to false.
useEmbeddedRegoPolicies: "false"
useEmbeddedRegoPolicies: "true"

# -- The Flag is the list of supported kinds separated by comma delimiter to be scanned by the config audit scanner
#
Expand Down Expand Up @@ -690,7 +690,7 @@ policiesBundle:
# -- repository of the policies bundle
repository: aquasecurity/trivy-checks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth changing the default value in the future after the release of trivy-checks in DockerHub in case the use of embedded checks is disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sure.

# -- tag version of the policies bundle
tag: 0
tag: 1
# -- registryUser is the user for the registry
registryUser: ~
# -- registryPassword is the password for the registry
Expand Down
20 changes: 14 additions & 6 deletions deploy/static/trivy-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,10 @@ spec:
type: number
V3Vector:
type: string
V40Score:
type: number
V40Vector:
type: string
type: object
type: object
cvsssource:
Expand Down Expand Up @@ -2849,6 +2853,10 @@ spec:
type: number
V3Vector:
type: string
V40Score:
type: number
V40Vector:
type: string
type: object
type: object
cvsssource:
Expand Down Expand Up @@ -2962,7 +2970,7 @@ data:
compliance.failEntriesLimit: "10"
report.recordFailedChecksOnly: "true"
node.collector.imageRef: "ghcr.io/aquasecurity/node-collector:0.3.1"
policies.bundle.oci.ref: "ghcr.io/aquasecurity/trivy-checks:0"
policies.bundle.oci.ref: "ghcr.io/aquasecurity/trivy-checks:1"
policies.bundle.insecure: "false"

node.collector.nodeSelector: "true"
Expand Down Expand Up @@ -3033,7 +3041,7 @@ metadata:
app.kubernetes.io/managed-by: kubectl
data:
trivy.repository: "ghcr.io/aquasecurity/trivy"
trivy.tag: "0.53.0"
trivy.tag: "0.57.1"
trivy.imagePullPolicy: "IfNotPresent"
trivy.additionalVulnerabilityReportFields: ""
trivy.severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
Expand All @@ -3042,13 +3050,13 @@ data:
trivy.includeDevDeps: "false"
trivy.imageScanCacheDir: "/tmp/trivy/.cache"
trivy.filesystemScanCacheDir: "/var/trivyoperator/trivy-db"
trivy.dbRepository: "ghcr.io/aquasecurity/trivy-db"
trivy.javaDbRepository: "ghcr.io/aquasecurity/trivy-java-db"
trivy.dbRepository: "mirror.gcr.io/aquasec/trivy-db"
trivy.javaDbRepository: "mirror.gcr.io/aquasec/trivy-java-db"
trivy.command: "image"
trivy.sbomSources: ""
trivy.dbRepositoryInsecure: "false"
trivy.useBuiltinRegoPolicies: "true"
trivy.useEmbeddedRegoPolicies: "false"
trivy.useBuiltinRegoPolicies: "false"
trivy.useEmbeddedRegoPolicies: "true"
trivy.supportedConfigAuditKinds: "Workload,Service,Role,ClusterRole,NetworkPolicy,Ingress,LimitRange,ResourceQuota"
trivy.timeout: "5m0s"
trivy.mode: "Standalone"
Expand Down
Loading
Loading