Systematically scans and patches vulnerabilities in the Okteto CLI Docker image.
Install
mkdir -p .claude/skills/fix-cves && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3320" && unzip -o skill.zip -d .claude/skills/fix-cves && rm skill.zipInstalls to .claude/skills/fix-cves
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Fix all CVEs in the Okteto CLI Docker image by scanning with Trivy and updating vulnerable dependencies and binariesKey capabilities
- →Run systematic vulnerability scans on container images
- →Generate status matrices for binary dependencies
- →Update Dockerfile ARG variables to patch versions
- →Rebuild image stages for security compliance
How it works
Iteratively executes vulnerability scans against local images and cross-references results with existing Dockerfile build arguments.
Inputs & outputs
When to use fix-cves
- →Scan Okteto CLI image for CVEs
- →Patch critical vulnerabilities in binary dependencies
- →Generate a security report for the Docker image
- →Update outdated packages in the Dockerfile
About this skill
Fix CLI CVEs
Fix all vulnerabilities in the Okteto CLI Docker image using systematic vulnerability scanning and remediation.
CONTEXT
- The source code and Dockerfile for this image are in this repository
- The Dockerfile includes multiple binaries: kubectl, helm, kustomize, git, syncthing, and the Okteto CLI itself
- Go dependencies for the Okteto CLI binary are in
go.modandgo.sum - Go dependencies for internal tools (remote, supervisor, clean) are in
tools/go.modandtools/go.sum - Binary versions are defined as ARG variables at the top of the Dockerfile (lines 3-18)
- Internal tools (remote, supervisor, clean) are built from source in the
tools-builderstage - Focus on CRITICAL and HIGH severity vulnerabilities first, then address medium/low as needed
WORKFLOW
1. Build and Scan Process
- Build the image:
docker build -t okteto-cli:test .(do not use--no-cacheunless necessary) - Scan for vulnerabilities:
trivy image --severity CRITICAL,HIGH okteto-cli:test - For full scan:
trivy image okteto-cli:test - Analyze scan results to identify specific packages and CVEs that need attention
2. Generate CVE Summary Table
Before 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:
- ✅ Clean - No vulnerabilities
- ⚠️ Warning - False positive or minor issue
- ❌ Action needed - Real CVEs requiring fixes
Then list each CVE found with details:
- CVE ID
- Component and version
- Vulnerability description
- Fixed version available
- Impact/severity
3. Vulnerability Remediation
- Repeat the build and scan process after each set of changes
- Continue until all CRITICAL and HIGH vulnerabilities are resolved or you cannot fix more CVEs
Version update policy:
- Patch updates (v1.2.3 → v1.2.4): Apply automatically
- Minor updates (v1.2.3 → v1.3.0): Ask user for confirmation before updating
- Major updates (v1.x → v2.x): Ask user for confirmation before updating
For Dockerfile binaries (kubectl, helm, kustomize, git, etc.):
- Check release pages for available versions:
- Update version ARG at top of Dockerfile (e.g.,
ARG KUBECTL_VERSION=1.34.5) - Follow version update policy above
Syncthing — keep the Go constant in sync:
- Bumping
ARG SYNCTHING_VERSIONin the Dockerfile is NOT enough. The CLI also downloads syncthing on the user's machine using thesyncthingVersionconstant inpkg/syncthing/install.go. - Whenever you change
ARG SYNCTHING_VERSION, updatesyncthingVersioninpkg/syncthing/install.goto the same value, then rungo test ./pkg/syncthing/.... - Both must always point to the same version so the image and the locally-downloaded binary match.
For Go dependencies (okteto binary):
- Update to specific patched version:
go get -u <module>@<patch-version> - Clean up:
go mod tidy - Follow version update policy above
For internal tools (remote, supervisor, clean):
- Tools are built from source in
tools/directory - Update Go dependencies in
tools/go.mod:cd tools && go get -u <module>@<patch-version> - Clean up:
cd tools && go mod tidy - Run tools tests:
cd tools && make test - Follow version update policy above
4. Functionality Verification
Once vulnerabilities are fixed, verify the CLI still works correctly:
- Run CLI unit tests:
make test - Run CLI linting:
make lint - Run tools tests:
cd tools && make test - Run tools linting:
cd tools && make lint - Test the Docker image:
docker run okteto-cli:test version
IMPORTANT CONSTRAINTS
- kubectl maintenance: Keep
kubectlupdated to latest patch of max minor Kubernetes version supported by Okteto - kubectl preservation: Never remove
kubectlfrom the image - it's required for functionality - Breaking changes: Some updates may break compatibility - test thoroughly
- Binary compatibility: Ensure all binaries work on the Alpine/BusyBox base image
PULL REQUEST REQUIREMENTS
If you did any change, create a PR for vulnerability fixes:
Required Labels
area/security
Required Content
-
Clear 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")
Commit Message Format
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 <[email protected]>
When not to use it
- →Fixing logic bugs in application code
- →Scanning source code files outside of Docker contexts
Prerequisites
Limitations
- →Requires manual validation of patches
- →Focuses primarily on CRITICAL and HIGH severity vulnerabilities
How it compares
It focuses specifically on the binary dependency chain within the Okteto image rather than general dependency management.
Compared to similar skills
fix-cves side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fix-cves (this skill) | 1 | 6mo | No flags | Intermediate |
| sca-trivy | 1 | 6mo | Review | Intermediate |
| go-vuln-remediate | 0 | 1mo | Caution | Advanced |
| secrets-management | 5 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
sca-trivy
rohunj
Software Composition Analysis (SCA) and container vulnerability scanning using Aqua Trivy for identifying CVE vulnerabilities in dependencies, container images, IaC misconfigurations, and license compliance risks. Use when: (1) Scanning container images and filesystems for vulnerabilities and misconfigurations, (2) Analyzing dependencies for known CVEs across multiple languages (Go, Python, Node.js, Java, etc.), (3) Detecting IaC security issues in Terraform, Kubernetes, Dockerfile, (4) Integrating vulnerability scanning into CI/CD pipelines with SARIF output, (5) Generating Software Bill of Materials (SBOM) in CycloneDX or SPDX format, (6) Prioritizing remediation by CVSS score and exploitability.
go-vuln-remediate
infobloxopen
Run Wiz-based vulnerability scan and automatic Go module remediation for containerized Go services in the konk repository. Use when you need to build images, scan CVEs, patch vulnerable dependencies in go.mod/go.sum across konk-service and konk-provision modules, validate builds, and prepare a PR su
secrets-management
wshobson
Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.
container-security-testing
Ed1s0nZ
容器安全测试的专业技能和方法论
security-automation
Ed1s0nZ
安全自动化的专业技能和方法论
sca-setup
robertsinfosec
SCA scanning setup workflow. Use when adding software composition analysis to a repository, configuring Dependabot, setting up npm audit in CI, or when a repo is missing dependency vulnerability scanning. Produces working Dependabot config and CI checks.