Fix all CVEs in the Okteto CLI Docker image by scanning with Trivy and updating vulnerable dependencies and binaries
Fix all vulnerabilities in the Okteto CLI Docker image using systematic vulnerability scanning and remediation.
go.mod and go.sumtools/go.mod and tools/go.sumtools-builder stagedocker build -t okteto-cli:test . (do not use --no-cache unless necessary)trivy image --severity CRITICAL,HIGH okteto-cli:testtrivy image okteto-cli:testBefore attempting any fixes, create a summary table showing the current state:
## CVE Summary
| Binario | CVEs HIGH | CVEs CRITICAL | Estado |
| ----------------------- | --------- | ------------- | ---------------------- |
| syncthing | X | Y | ✅/⚠️/❌ [Description] |
| kustomize | X | Y | ✅/⚠️/❌ [Description] |
| kubectl | X | Y | ✅/⚠️/❌ [Description] |
| helm/helm3/helm4 | X | Y | ✅/⚠️/❌ [Description] |
| okteto | X | Y | ✅/⚠️/❌ [Description] |
| git | X | Y | ✅/⚠️/❌ [Description] |
| clean/remote/supervisor | X | Y | ✅/⚠️/❌ [Description] |
Total: X CRITICAL, Y HIGH
Status indicators:
Then list each CVE found with details:
Version update policy:
For Dockerfile binaries (kubectl, helm, kustomize, git, etc.):
ARG KUBECTL_VERSION=1.34.5)For Go dependencies (okteto binary):
go get -u <module>@<patch-version>go mod tidyFor internal tools (remote, supervisor, clean):
tools/ directorytools/go.mod: cd tools && go get -u <module>@<patch-version>cd tools && go mod tidycd tools && make testOnce vulnerabilities are fixed, verify the CLI still works correctly:
make testmake lintcd tools && make testcd tools && make lintdocker run okteto-cli:test versionkubectl updated to latest patch of max minor Kubernetes version supported by Oktetokubectl from the image - it's required for functionalityIf you did any change, create a PR for vulnerability fixes:
area/securityClear status statement: First line must clearly state whether ALL CRITICAL/HIGH vulnerabilities have been fixed or not
Before/after scans: Include trivy scan results before and after changes using:
trivy image --severity CRITICAL,HIGH okteto-cli:test
Summary of changes: List specific updates (e.g., "kubectl 1.34.3 → 1.35.0", "github.com/foo/bar v1.2.3 → v1.2.4")