ComplyPack is a CLI and Go library for packing, unpacking, signing, and verifying OCI artifacts containing policy bundles. It provides an evaluator-agnostic format for distributing compliance policies using OCI registries, and an MCP server for LLM-assisted policy generation.
- OCI Artifact Packaging - Pack policy content into OCI Image Manifest v1.1 artifacts
- MCP Server - Expose Gemara catalogs, platform schemas, and evaluators to LLMs
- Policy Graph Resolution - Resolve effective policies with overlays from Gemara bundles
- Evaluator-Agnostic - Supports any policy language (OPA, CEL, etc.) via evaluator-id dispatch
- CUE Schema Sources - Load platform schemas from CUE registry, HTTPS, or local files
- Signing & Verification - Built-in support for keyed and keyless (Sigstore) signing
go install github.com/complytime/complypack/cmd/complypack@latestgo get github.com/complytime/complypackCreate complypack.yaml in your working directory:
# Globally unique pack identifier (reverse-domain convention).
# Survives registry moves, distinguishes packs from different authors.
id: io.complytime.my-controls
# Provider plugin that evaluates this pack's content.
# Must match the provider's binary suffix (e.g., "opa" → complyctl-provider-opa).
evaluator-id: opa
# ComplyPack artifact version
version: 0.1.0
# Gemara policy source (for MCP server)
gemara:
source: oci://ghcr.io/org/controls:v1
# Platform schemas (for MCP server validation tools)
schemas:
- platform: kubernetes
source: cue://cue.dev/x/k8s.io/api/core/v1
- platform: ci
source: cue://cue.dev/x/gitlab/gitlabciSee complypack.example.yaml for full configuration options.
Uses the Docker credential chain:
docker login ghcr.ioPack a directory of policy content into a ComplyPack OCI artifact and push to a registry:
# Pack and push to a registry
complypack pack policy/ ghcr.io/org/my-policies:v1.0.0
# Pack to a local registry
complypack pack policy/ localhost:5001/test:latest --plain-httpThe command reads evaluator-id and version from complypack.yaml. The content directory is tar+gzipped and stored as the artifact's opaque content layer.
Start the MCP server to expose Gemara catalogs, platform schemas, and policy tools to LLMs:
complypack mcp serve
complypack mcp serve --config /path/to/complypack.yaml| Resource | Description |
|---|---|
complypack://catalog/<name> |
Gemara catalog (YAML) |
complypack://schema/<platform> |
Platform schema (JSON) |
complypack://evaluator |
Available policy evaluators |
| Tool | Description |
|---|---|
validate_policy |
Validate policy syntax, contract compliance, and linting |
test_policy |
Run policy against test data with schema validation |
get_assessment_requirements |
Extract assessment requirements with parameters |
{
"artifactType": "application/vnd.complypack.artifact.v1",
"config": { "mediaType": "application/vnd.complypack.config.v1+json" },
"layers": [{ "mediaType": "application/vnd.complypack.content.v1.tar+gzip" }]
}| Purpose | Media Type |
|---|---|
| Artifact Type | application/vnd.complypack.artifact.v1 |
| Config Layer | application/vnd.complypack.config.v1+json |
| Content Layer | application/vnd.complypack.content.v1.tar+gzip |
The content layer is opaque — the evaluator-id in the config tells consumers which provider handles it. For OPA, this is a tarball of .rego files.
The MCP server resolves Gemara policy graphs:
- Load OCI bundle or local file
bundle.Classify()— identify artifact types (Policy, ControlCatalog, etc.)ResolveEffectivePolicy()— apply overlays from policy imports- Extract assessment requirements with structured parameters from assessment plans
cfg := complypack.Config{
ID: "io.example.my-policies",
EvaluatorID: "opa",
Version: "1.0.0",
}
content := strings.NewReader("policy content here")
desc, err := complypack.Pack(ctx, store, cfg, content)result, err := complypack.Unpack(ctx, store, desc)
defer result.Content.Close()
fmt.Printf("Evaluator: %s\n", result.Config.EvaluatorID)ComplyPack uses sentinel errors:
ErrInvalidConfig— Config validation failedErrEmptyContent— Content reader returned zero bytesErrContentTooLarge— Content exceeds 100MB limitErrSigningFailed— Signing operation failedErrVerificationFailed— Signature verification failedErrInvalidMediaType— Unexpected media type in manifestErrNoContentLayer— Manifest missing content layer
- Signing/Verification: Validation logic is implemented, but full sigstore-go integration is pending
- Content Size: Maximum 100MB per artifact
- Single Content Layer: Only one content layer per artifact is supported
- ComplyTime — Compliance automation
- Gemara — Compliance policy framework
- ORAS — OCI Registry as Storage
- Open Policy Agent — Policy-based control
Apache License 2.0 — see LICENSE for details.