Copacetic
$ copa Foundation Med RiskCopacetic (copa) directly patches OS-level package vulnerabilities inside existing OCI container images without rebuilding from source or requiring a Dockerfile. Driven by vulnerability JSON reports from scanners like Trivy or Grype (copa patch -i -r), it uses BuildKit to emit a patched image and optional OpenVEX JSON (--format openvex).
brew install copa copa orchestrates local BuildKit container updates from Trivy/Grype JSON files directly on the build host.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Accepts structured Trivy/Grype JSON reports and outputs machine-readable OpenVEX JSON (--format openvex --output), though it has no --dry-run mode.
- Consumes Trivy/Grype JSON (
-r) and emits OpenVEX JSON (--format openvex) - Fully non-interactive flag-driven execution
Outputs a newly tagged patched image locally unless --push is explicitly passed, preserving the original image digest.
- Writes to a new
-t <tag>locally without overwriting the source tag unless--pushis used - Requires a running BuildKit instance (
--addr)
Single Go binary via Homebrew and GitHub Releases across macOS, Linux, and Windows, requiring Docker/BuildKit.
- Installable via
brew install copa; requires BuildKit daemon
Patches OS CVEs in third-party base images in seconds without maintaining upstream Dockerfiles.
- Direct BuildKit OS-package patching from scanner JSON reports
CNCF Sandbox project (project-copacetic/copacetic) licensed under Apache-2.0.
- Official CNCF
project-copacetic/copaceticrepo
Clear quick-start docs and Cobra --help, though scanner plugin requirements can take setup.
- Docs at project-copacetic.github.io/copacetic/
Security, Auth & Guardrails
Reads OCI registry credentials from ~/.docker/config.json and connects to a BuildKit daemon via --addr.
Open-source CNCF Sandbox project (Apache-2.0) and completely free.
# Copacetic (copa) Agent Rules - Always generate a fresh Trivy/Grype JSON report (`-r`) and patch to a new local `-t <patched-tag>` before pushing. - Omit `--push` until the patched image passes re-scanning and smoke tests.
Agent-Ready Command Recipes
Safe Read-Only Queries
copa patch --help
Displays supported scanner report formats, --addr BuildKit flags, and --format openvex VEX export flags read-only.
Controlled Writes & Previews
copa patch -i ghcr.io/org/app:1.0.0 -r trivy.json -t 1.0.0-patched --format openvex --output vex.json
Creates a new locally tagged patched image (1.0.0-patched) without pushing remotely and writes an OpenVEX JSON document to vex.json.
Strengths for Agents
- + Consumes Trivy/Grype JSON reports directly and generates OpenVEX (
--format openvex) JSON proof. - + Non-destructive local patching onto a new
-ttag unless--pushis specified. - + Fixes OS CVEs in third-party images without needing source code or Dockerfiles.
Caveats & Pitfalls
- ! Only patches OS-level packages (apt/apk/dnf/yum), not language-level dependencies like npm or pip.
- ! Requires an accessible BuildKit daemon (
dockerorbuildkitdvia--addr).