fix-cves
Fix all CVEs in the Okteto CLI Docker image by scanning with Trivy and updating vulnerable dependencies and binaries
Install
mkdir -p .claude/skills/fix-cves && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3320" && unzip -o skill.zip -d .claude/skills/fix-cves && rm skill.zipInstalls to .claude/skills/fix-cves
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
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 <noreply@anthropic.com>
You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversReplicate Flux is an OpenAPI image generator using Replicate's Flux model, enabling image creation via API and TypeScrip
Easily search npm and other repositories with Package Manager. Get package, version, and dependency info fast. Supports
Easily streamline container deployment to Kubernetes with Container Inc. Deploy apps directly from code editors via GitH
Digitize documents with Page/Image Scanner—supports ADF, duplex, batch, and multi-page TIFF for seamless document scanni
Docker MCP Server — AI-driven Docker container management and automation; manage containers, images, networks, and volum
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.