-
Notifications
You must be signed in to change notification settings - Fork 5
feat: distribute complypack as multi-platform plugin with container MCP server #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jpower432
wants to merge
13
commits into
complytime:main
Choose a base branch
from
jpower432:feat/plugin-distribution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5823ec0
feat: add --source and --schema flags to mcp serve
jpower432 0b64647
fix: remove hardcoded version and add test for buildConfigFromFlags
jpower432 ae6c62b
build: add Containerfile for container distribution
jpower432 62927c1
ci: add container image build and push workflow
jpower432 87b1634
feat: add multi-platform plugin manifests
jpower432 1ee43bd
docs: add multi-platform install instructions
jpower432 2378fea
fix: add CA certificates to container image
jpower432 7a822ce
fix: pin workflow refs and container base image
jpower432 8884086
chore: apply suggestions from code review
jpower432 38622a4
chore: update gemini-extension.json
jpower432 2627c97
fix: allow --schema flag without --source in mcp serve
jpower432 3a49369
fix: rename .mcp.json to .mcp.json.example
jpower432 d481809
fix: address container workflow review feedback
jpower432 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "name": "complypack", | ||
| "displayName": "ComplyPack", | ||
| "version": "0.1.0", | ||
| "description": "Generate Rego policies from Gemara catalogs and extract assessment requirements via MCP server", | ||
| "author": { | ||
| "name": "ComplyTime Authors", | ||
| "url": "https://github.com/complytime" | ||
| }, | ||
| "homepage": "https://github.com/complytime/complypack", | ||
| "repository": "https://github.com/complytime/complypack", | ||
| "license": "Apache-2.0", | ||
| "keywords": [ | ||
| "compliance", | ||
| "rego", | ||
| "opa", | ||
| "gemara", | ||
| "policy", | ||
| "mcp" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "complypack", | ||
| "displayName": "ComplyPack", | ||
| "version": "0.1.0", | ||
| "description": "Generate Rego policies from Gemara catalogs and extract assessment requirements via MCP server", | ||
| "author": { | ||
| "name": "ComplyTime Authors", | ||
| "url": "https://github.com/complytime" | ||
| }, | ||
| "repository": "https://github.com/complytime/complypack", | ||
| "license": "Apache-2.0", | ||
| "keywords": [ | ||
| "compliance", | ||
| "rego", | ||
| "opa", | ||
| "gemara", | ||
| "policy", | ||
| "mcp" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| .git | ||
| .github | ||
| .complytime | ||
| .cursor | ||
| .opencode | ||
| docs | ||
| kb | ||
| skills | ||
| tests | ||
| acceptance | ||
| *.md | ||
| !LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Container Image | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| push: | ||
| uses: complytime/org-infra/.github/workflows/reusable_publish_ghcr.yml@e266be092e71ac9343fcd6d5cafc50402161981e # main | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| actions: read | ||
| id-token: write | ||
| attestations: write | ||
| with: | ||
| component_name: complypack | ||
| containerfile_path: Containerfile | ||
| context_path: . | ||
| image_name: complytime/complypack | ||
| image_description: "ComplyPack MCP server for compliance policy generation" | ||
| platforms: linux/amd64,linux/arm64 | ||
|
|
||
| scan: | ||
| needs: push | ||
| if: >- | ||
| always() | ||
| && needs.push.result == 'success' | ||
| && needs.push.outputs.image != '' | ||
| uses: complytime/org-infra/.github/workflows/reusable_trivy_image_scan.yml@e266be092e71ac9343fcd6d5cafc50402161981e # main | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| security-events: write | ||
| id-token: write | ||
| with: | ||
| image_ref: ${{ needs.push.outputs.image }}:${{ needs.push.outputs.tag }} | ||
| image_digest: ${{ needs.push.outputs.digest }} | ||
| trivy_severity: HIGH,CRITICAL | ||
|
|
||
| sign: | ||
| needs: [push, scan] | ||
| if: >- | ||
| always() | ||
| && needs.push.result == 'success' | ||
| uses: complytime/org-infra/.github/workflows/reusable_sign_and_verify.yml@e266be092e71ac9343fcd6d5cafc50402161981e # main | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
| with: | ||
| image_name: ${{ needs.push.outputs.image }} | ||
| digest: ${{ needs.push.outputs.digest }} | ||
| allowed_identity_regex: "https://github.com/complytime/org-infra(/.*)?$" | ||
| verify_vuln: ${{ needs.scan.result == 'success' }} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "mcpServers": { | ||
| "complypack": { | ||
| "command": "docker", | ||
| "args": ["run", "--rm", "-i", | ||
| "ghcr.io/complytime/complypack:VERSION", | ||
| "mcp", "serve", | ||
| "--source", "oci://YOUR_REGISTRY/gemara/YOUR_CATALOG:TAG", | ||
| "--schema", "YOUR_PLATFORM"] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| FROM golang:1.26-alpine AS builder | ||
|
|
||
| WORKDIR /build | ||
| COPY go.mod go.sum ./ | ||
| RUN go mod download | ||
| COPY . . | ||
| RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o complypack ./cmd/complypack | ||
|
|
||
| FROM registry.access.redhat.com/ubi9-micro:9.6-4@sha256:b498b3ea26111ab4b81d65139f2ebd2ef9a2abb7a4588b7fdcc54889f95e9caa | ||
|
|
||
| COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt | ||
| COPY --from=builder /build/complypack /usr/local/bin/complypack | ||
|
|
||
| ARG USER_UID=10001 | ||
| USER ${USER_UID} | ||
|
|
||
| ENTRYPOINT ["complypack"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # Installing ComplyPack | ||
|
|
||
| ComplyPack is a plugin that provides a compliance policy generation skill and | ||
| an MCP server for working with Gemara catalogs. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Docker or Podman (Fedora users: `sudo dnf install podman-docker`) | ||
|
|
||
| ## Claude Code | ||
|
|
||
| Install from the marketplace: | ||
|
|
||
| ``` | ||
| /plugin install complypack@claude-plugins-official | ||
| ``` | ||
|
|
||
| The skill is auto-discovered. To configure the MCP server, create a | ||
| `.mcp.json` in your project: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "complypack": { | ||
| "command": "docker", | ||
| "args": ["run", "--rm", "-i", | ||
| "ghcr.io/complytime/complypack:latest", | ||
| "mcp", "serve", | ||
| "--source", "oci://your-registry/gemara/your-catalog:v1", | ||
| "--schema", "ci"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Replace the `--source` and `--schema` values with your Gemara catalog | ||
| references and target platforms. | ||
|
|
||
| ### Multiple sources and schemas | ||
|
|
||
| ```json | ||
| "args": ["run", "--rm", "-i", | ||
| "ghcr.io/complytime/complypack:latest", | ||
| "mcp", "serve", | ||
| "--source", "oci://registry.example.com/gemara/controls:v1", | ||
| "--source", "oci://registry.example.com/gemara/guidance:v1", | ||
| "--schema", "ci=cue://cue.dev/x/githubactions@v0#Workflow", | ||
| "--schema", "kubernetes"] | ||
| ``` | ||
|
|
||
| ### Plain HTTP registries (development) | ||
|
|
||
| Use `oci+http://` for registries without TLS: | ||
|
|
||
| ```json | ||
| "--source", "oci+http://localhost:5001/gemara/controls:v1" | ||
| ``` | ||
|
|
||
| ## OpenCode | ||
|
|
||
| Add to your `opencode.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "complypack": { | ||
| "command": "docker", | ||
| "args": ["run", "--rm", "-i", | ||
| "ghcr.io/complytime/complypack:latest", | ||
| "mcp", "serve", | ||
| "--source", "oci://your-registry/gemara/your-catalog:v1", | ||
| "--schema", "ci"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Using a config file (advanced) | ||
|
|
||
| If you prefer YAML configuration, mount a `complypack.yaml`: | ||
|
|
||
| ```json | ||
| "args": ["run", "--rm", "-i", | ||
| "-v", "./complypack.yaml:/config/complypack.yaml:ro", | ||
| "ghcr.io/complytime/complypack:latest", | ||
| "mcp", "serve", | ||
| "--config", "/config/complypack.yaml"] | ||
| ``` | ||
|
|
||
| ## Verifying the image | ||
|
|
||
| Images include SLSA provenance and SBOM attestations. To verify: | ||
|
|
||
| ``` | ||
| gh attestation verify oci://ghcr.io/complytime/complypack:latest \ | ||
| --owner complytime | ||
| ``` | ||
|
|
||
| ## Embedded schemas | ||
|
|
||
| These platforms have built-in schemas (no `--schema source` needed): | ||
|
|
||
| - `kubernetes` | ||
| - `terraform` | ||
| - `docker` | ||
| - `ansible` | ||
| - `ci` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.