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)Syncthing — keep the Go constant in sync:
ARG SYNCTHING_VERSION in the Dockerfile is NOT enough. The CLI also downloads syncthing on the user's machine using the syncthingVersion constant in pkg/syncthing/install.go.ARG SYNCTHING_VERSION, update syncthingVersion in pkg/syncthing/install.go to the same value, then run go test ./pkg/syncthing/....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")
fix: update vulnerable dependencies
- Update kubectl from 1.34.3 to 1.35.0 (fixes CVE-2024-XXXXX)
- Update github.com/example/module from v1.2.3 to v1.2.4 (fixes CVE-2024-YYYYY)
Resolves X CRITICAL and Y HIGH severity vulnerabilities.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer