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.0 #2301

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 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
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
8 changes: 4 additions & 4 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 @@ -145,7 +145,7 @@ 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.0"` | 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. |
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
8 changes: 4 additions & 4 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.0
# -- 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 @@ -538,13 +538,13 @@ trivy:

# -- 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
# -- 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
16 changes: 12 additions & 4 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.0"
trivy.imagePullPolicy: "IfNotPresent"
trivy.additionalVulnerabilityReportFields: ""
trivy.severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
Expand All @@ -3047,8 +3055,8 @@ data:
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