Chainguard for Cursor

June 1, 2026 · View on GitHub

Bring Chainguard's secure container images and hardened library dependencies directly into your Cursor AI workflow. Query images, check security advisories, inspect SBOMs, migrate Dockerfiles, and configure Chainguard Libraries for Java, JavaScript, and Python — all from the agent chat.

What's included

Skills

Invoke with / in the agent chat:

SkillWhat it does
/chainguard-find-imageFind the right cgr.dev image for your language, framework, or tool
/chainguard-inspect-imageList packages, SBOM summary, entrypoint, and config for an image
/chainguard-check-advisoriesQuery CVEs and security advisories for an image or APK package
/chainguard-compare-versionsShow version history, changelogs, and digests across image tags
/chainguard-migrate-dockerfileRewrite a Dockerfile to use Chainguard base images
/chainguard-libraries-javaConfigure Maven or Gradle to use Chainguard Libraries
/chainguard-libraries-javascriptConfigure npm, Yarn, or pnpm to use Chainguard Libraries
/chainguard-libraries-pythonConfigure pip, uv, or Poetry to use Chainguard Libraries
/chainguard-setup-authVerify and set up Chainguard authentication via chainctl

Rules

Applied automatically based on the file you're editing:

RuleActivates on
Prefer Chainguard ImagesDockerfile, docker-compose.yml
Chainguard Libraries — Javapom.xml, build.gradle, *.gradle.kts
Chainguard Libraries — JavaScriptpackage.json, .npmrc, .yarnrc*
Chainguard Libraries — Pythonrequirements*.txt, pyproject.toml, Pipfile
Supply Chain PolicyGitHub Actions workflows

MCP Servers

The skills above use four Chainguard MCP servers for live data:

ServerEndpointProvides
cg-ocicgr.dev/mcpImage lookup, tags, digests
cg-apkapk.cgr.dev/mcpAPK package queries
cg-versionsversions.cgr.dev/mcpVersion history and changelogs
cg-apiconsole-api.enforce.dev/mcpPolicies, advisories, org context

Requirements

MCP Server Setup

The MCP servers authenticate via OAuth 2.0. Cursor handles this natively — no manual configuration required.

When you first invoke a skill that uses an MCP server, Cursor will open a browser tab to complete authentication. Sign in with your Chainguard account and return to Cursor. Each server authenticates once and stays connected.

If a server shows as disconnected in Settings → MCP, click the reconnect button to re-authenticate.

Chainguard Libraries

Chainguard Libraries provides hardened, continuously-patched builds of popular open source packages for Java (Maven/Gradle), JavaScript (npm/Yarn/pnpm), and Python (pip/uv/Poetry).

Use the /chainguard-libraries-java, /chainguard-libraries-javascript, or /chainguard-libraries-python skills to configure your project. Each will walk you through obtaining a registry token and updating your package manager configuration.

You'll need a Chainguard Libraries subscription — contact chainguard.dev for access.

Usage examples

Find an image

/chainguard-find-image — find me a Python 3.12 image for production

Resolves your organization, queries the catalog, and returns a digest-pinned reference:

cgr.dev/mycompany/python:latest@sha256:a1b2c3...   # minimal, distroless runtime
cgr.dev/mycompany/python:latest-dev                # includes shell + pip for builds

Inspect an image

/chainguard-inspect-image — what packages are in cgr.dev/mycompany/nginx:latest?

Lists all APK packages, the entrypoint, architecture, and whether the image runs as non-root.


Check for CVEs

/chainguard-check-advisories — are there any open CVEs in cgr.dev/mycompany/go:latest?

Returns CVE IDs, severity, affected versions, and Chainguard's advisory status (fixed, not_affected, etc.). Reports explicitly if none are found.


Compare versions

/chainguard-compare-versions — what changed between the last two releases of cgr.dev/mycompany/node?

Shows a changelog with package version bumps, CVE fixes, and the sha256 digest for each release so you can pin to a known-good version.


Migrate a Dockerfile

/chainguard-migrate-dockerfile — harden this Dockerfile:

FROM node:20
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
CMD ["node", "server.js"]

Rewrites the Dockerfile using a multi-stage build: -dev variant for the build stage, minimal distroless runtime for the final stage, pinned to the current digest.


Set up Chainguard Libraries — Java

/chainguard-libraries-java — configure our Maven project to pull from Chainguard Libraries

Walks through adding the Chainguard Maven registry to settings.xml and the token configuration for authenticated pulls.


Set up Chainguard Libraries — JavaScript

/chainguard-libraries-javascript — we use pnpm. Set up Chainguard Libraries as our npm registry.

Produces the .npmrc configuration with the Chainguard registry URL and auth token setup for pnpm workspaces.


Set up Chainguard Libraries — Python

/chainguard-libraries-python — configure uv to use Chainguard Libraries as our PyPI index

Updates pyproject.toml or uv.toml to point to the Chainguard Python registry with token-based authentication.


Check authentication

/chainguard-setup-auth — I'm on a new machine, walk me through getting set up

Checks for chainctl, runs chainctl auth login if needed, and confirms access with chainctl iam organizations list.

License

Apache 2.0 — see LICENSE.