cmcp-runtime 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cmcp_runtime-0.1.0/.github/CODEOWNERS +13 -0
- cmcp_runtime-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
- cmcp_runtime-0.1.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
- cmcp_runtime-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +25 -0
- cmcp_runtime-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +26 -0
- cmcp_runtime-0.1.0/.github/dependabot.yml +19 -0
- cmcp_runtime-0.1.0/.github/workflows/ci.yml +73 -0
- cmcp_runtime-0.1.0/.github/workflows/codeql.yml +43 -0
- cmcp_runtime-0.1.0/.github/workflows/docker.yml +40 -0
- cmcp_runtime-0.1.0/.github/workflows/publish.yml +45 -0
- cmcp_runtime-0.1.0/.github/workflows/release-drafter.yml +25 -0
- cmcp_runtime-0.1.0/.github/workflows/sbom.yml +30 -0
- cmcp_runtime-0.1.0/.github/workflows/scorecard.yml +37 -0
- cmcp_runtime-0.1.0/.gitignore +18 -0
- cmcp_runtime-0.1.0/ADOPTERS.md +7 -0
- cmcp_runtime-0.1.0/CHANGELOG.md +21 -0
- cmcp_runtime-0.1.0/CHARTER.md +80 -0
- cmcp_runtime-0.1.0/CODE_OF_CONDUCT.md +17 -0
- cmcp_runtime-0.1.0/CONTRIBUTING.md +85 -0
- cmcp_runtime-0.1.0/Dockerfile +15 -0
- cmcp_runtime-0.1.0/GOVERNANCE.md +78 -0
- cmcp_runtime-0.1.0/LICENSE +21 -0
- cmcp_runtime-0.1.0/LIMITATIONS.md +77 -0
- cmcp_runtime-0.1.0/MAINTAINERS.md +38 -0
- cmcp_runtime-0.1.0/NOTICE +28 -0
- cmcp_runtime-0.1.0/PKG-INFO +298 -0
- cmcp_runtime-0.1.0/README.md +254 -0
- cmcp_runtime-0.1.0/ROADMAP.md +34 -0
- cmcp_runtime-0.1.0/SECURITY.md +40 -0
- cmcp_runtime-0.1.0/benchmarks/.gitkeep +1 -0
- cmcp_runtime-0.1.0/docker-compose.yml +47 -0
- cmcp_runtime-0.1.0/docs/README.md +119 -0
- cmcp_runtime-0.1.0/docs/SPEC.md +335 -0
- cmcp_runtime-0.1.0/docs/assets/icon.svg +29 -0
- cmcp_runtime-0.1.0/docs/configuration.md +128 -0
- cmcp_runtime-0.1.0/docs/quickstart.md +379 -0
- cmcp_runtime-0.1.0/docs/spec/attestation.md +514 -0
- cmcp_runtime-0.1.0/docs/spec/call-graph.md +229 -0
- cmcp_runtime-0.1.0/docs/spec/cedar-policy.md +355 -0
- cmcp_runtime-0.1.0/docs/spec/component-model.md +207 -0
- cmcp_runtime-0.1.0/docs/spec/error-codes.md +42 -0
- cmcp_runtime-0.1.0/docs/spec/failure-modes.md +277 -0
- cmcp_runtime-0.1.0/docs/spec/phase2-server.md +230 -0
- cmcp_runtime-0.1.0/docs/spec/proxy-security.md +53 -0
- cmcp_runtime-0.1.0/docs/spec/response-inspection.md +118 -0
- cmcp_runtime-0.1.0/docs/spec/session-policy.md +153 -0
- cmcp_runtime-0.1.0/docs/spec/threat-model.md +112 -0
- cmcp_runtime-0.1.0/docs/spec/tool-identity.md +190 -0
- cmcp_runtime-0.1.0/docs/spec/transport.md +201 -0
- cmcp_runtime-0.1.0/docs/spec/verification-library.md +149 -0
- cmcp_runtime-0.1.0/docs/testing/benchmarks.md +133 -0
- cmcp_runtime-0.1.0/docs/testing/soak-test.md +147 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/README.md +45 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/catalog.json +68 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/cmcp-config.yaml +9 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/policies/allow-approved-tools.cedar +7 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/policies/block-mnpi-to-communication.cedar +10 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/policies/block-phi-to-uncovered.cedar +11 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/policies/manifest.json +7 -0
- cmcp_runtime-0.1.0/examples/bfsi-demo/policies/schema.cedarschema +45 -0
- cmcp_runtime-0.1.0/examples/minimal/catalog.json +22 -0
- cmcp_runtime-0.1.0/examples/minimal/cmcp-config.yaml +5 -0
- cmcp_runtime-0.1.0/examples/minimal/policies/allow-all.cedar +6 -0
- cmcp_runtime-0.1.0/examples/minimal/policies/manifest.json +6 -0
- cmcp_runtime-0.1.0/examples/minimal/policies/schema.cedarschema +1 -0
- cmcp_runtime-0.1.0/pyproject.toml +102 -0
- cmcp_runtime-0.1.0/schemas/audit-entry.schema.json +128 -0
- cmcp_runtime-0.1.0/schemas/catalog-entry.schema.json +112 -0
- cmcp_runtime-0.1.0/schemas/cedar-schema.cedarschema +118 -0
- cmcp_runtime-0.1.0/schemas/trace-claim.schema.json +193 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/__init__.py +3 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/audit/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/audit/chain.py +245 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/audit/keys.py +48 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/audit/trace_claim.py +342 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/benchmarks.py +382 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/catalog/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/catalog/loader.py +234 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/catalog/scanner.py +180 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/cli.py +109 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/config.py +167 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/errors.py +106 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/inspection/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/inspection/patterns_v1.json +46 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/inspection/pipeline.py +586 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/mcp/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/mcp/proxy.py +551 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/mcp/server.py +599 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/policy/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/policy/bundle.py +229 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/policy/evaluator.py +188 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/session/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/session/call_log.py +232 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/session/manager.py +294 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/session/state.py +122 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/startup.py +264 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/__init__.py +1 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/base.py +92 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/detect.py +106 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/nras.py +215 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/opaque.py +18 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/sev_snp.py +158 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/spiffe.py +207 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/tdx.py +111 -0
- cmcp_runtime-0.1.0/src/cmcp_runtime/tee/tpm.py +189 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/__init__.py +18 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/opaque.py +117 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/sev_snp.py +157 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/tdx.py +158 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/tpm.py +203 -0
- cmcp_runtime-0.1.0/src/cmcp_verify/verify.py +494 -0
- cmcp_runtime-0.1.0/tests/__init__.py +0 -0
- cmcp_runtime-0.1.0/tests/conformance/README.md +81 -0
- cmcp_runtime-0.1.0/tests/conformance/__init__.py +0 -0
- cmcp_runtime-0.1.0/tests/conformance/conftest.py +17 -0
- cmcp_runtime-0.1.0/tests/conformance/test_audit_conformance.py +317 -0
- cmcp_runtime-0.1.0/tests/conformance/test_gateway_conformance.py +414 -0
- cmcp_runtime-0.1.0/tests/soak/__init__.py +0 -0
- cmcp_runtime-0.1.0/tests/soak/reference_server.py +94 -0
- cmcp_runtime-0.1.0/tests/soak/run_soak.py +563 -0
- cmcp_runtime-0.1.0/tests/unit/__init__.py +0 -0
- cmcp_runtime-0.1.0/tests/unit/test_audit.py +158 -0
- cmcp_runtime-0.1.0/tests/unit/test_audit_chain_anchor.py +218 -0
- cmcp_runtime-0.1.0/tests/unit/test_benchmarks.py +71 -0
- cmcp_runtime-0.1.0/tests/unit/test_break_glass.py +382 -0
- cmcp_runtime-0.1.0/tests/unit/test_call_log.py +128 -0
- cmcp_runtime-0.1.0/tests/unit/test_call_log_integration.py +183 -0
- cmcp_runtime-0.1.0/tests/unit/test_catalog.py +162 -0
- cmcp_runtime-0.1.0/tests/unit/test_catalog_scanner.py +153 -0
- cmcp_runtime-0.1.0/tests/unit/test_config.py +182 -0
- cmcp_runtime-0.1.0/tests/unit/test_egress_policy.py +370 -0
- cmcp_runtime-0.1.0/tests/unit/test_inspection.py +462 -0
- cmcp_runtime-0.1.0/tests/unit/test_low_batch_186_187_191_194.py +217 -0
- cmcp_runtime-0.1.0/tests/unit/test_mcp_proxy.py +393 -0
- cmcp_runtime-0.1.0/tests/unit/test_mcp_server_auth.py +415 -0
- cmcp_runtime-0.1.0/tests/unit/test_mid_session_failure.py +258 -0
- cmcp_runtime-0.1.0/tests/unit/test_nras_client.py +307 -0
- cmcp_runtime-0.1.0/tests/unit/test_policy_bundle.py +249 -0
- cmcp_runtime-0.1.0/tests/unit/test_policy_evaluator.py +231 -0
- cmcp_runtime-0.1.0/tests/unit/test_session.py +180 -0
- cmcp_runtime-0.1.0/tests/unit/test_session_call_log.py +319 -0
- cmcp_runtime-0.1.0/tests/unit/test_session_manager.py +250 -0
- cmcp_runtime-0.1.0/tests/unit/test_session_reset.py +228 -0
- cmcp_runtime-0.1.0/tests/unit/test_sev_snp_verify.py +187 -0
- cmcp_runtime-0.1.0/tests/unit/test_soak.py +191 -0
- cmcp_runtime-0.1.0/tests/unit/test_spiffe.py +205 -0
- cmcp_runtime-0.1.0/tests/unit/test_stage2_schema.py +195 -0
- cmcp_runtime-0.1.0/tests/unit/test_stage3_sensitivity.py +162 -0
- cmcp_runtime-0.1.0/tests/unit/test_startup.py +188 -0
- cmcp_runtime-0.1.0/tests/unit/test_tdx_opaque_verify.py +161 -0
- cmcp_runtime-0.1.0/tests/unit/test_tee.py +290 -0
- cmcp_runtime-0.1.0/tests/unit/test_tee_dev_mode_freeze.py +84 -0
- cmcp_runtime-0.1.0/tests/unit/test_tee_providers.py +207 -0
- cmcp_runtime-0.1.0/tests/unit/test_tpm_verify.py +323 -0
- cmcp_runtime-0.1.0/tests/unit/test_trace_claim.py +368 -0
- cmcp_runtime-0.1.0/tests/unit/test_verify.py +444 -0
- cmcp_runtime-0.1.0/tests/unit/test_workflow_scope.py +230 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Default owners for all files
|
|
2
|
+
* @agentrust-io/maintainers
|
|
3
|
+
|
|
4
|
+
# Security-sensitive paths require security-reviewers sign-off
|
|
5
|
+
src/cmcp_gateway/audit/ @agentrust-io/security-reviewers @agentrust-io/maintainers
|
|
6
|
+
src/cmcp_gateway/tee/ @agentrust-io/security-reviewers @agentrust-io/maintainers
|
|
7
|
+
src/cmcp_gateway/policy/ @agentrust-io/security-reviewers @agentrust-io/maintainers
|
|
8
|
+
|
|
9
|
+
# CI/CD workflow changes
|
|
10
|
+
.github/workflows/ @agentrust-io/maintainers
|
|
11
|
+
|
|
12
|
+
# Package configuration
|
|
13
|
+
pyproject.toml @agentrust-io/maintainers
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Defect in gateway behavior
|
|
4
|
+
labels: bug
|
|
5
|
+
assignees: ''
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## cmcp-gateway version
|
|
9
|
+
|
|
10
|
+
<!-- Output of `cmcp-gateway --version` or the git SHA if building from source -->
|
|
11
|
+
|
|
12
|
+
## Python version
|
|
13
|
+
|
|
14
|
+
<!-- Output of `python --version` -->
|
|
15
|
+
|
|
16
|
+
## TEE provider
|
|
17
|
+
|
|
18
|
+
<!-- e.g. Intel TDX, AMD SEV-SNP, AWS Nitro Enclaves, none -->
|
|
19
|
+
|
|
20
|
+
## Reproduction steps
|
|
21
|
+
|
|
22
|
+
1.
|
|
23
|
+
2.
|
|
24
|
+
3.
|
|
25
|
+
|
|
26
|
+
## Expected behavior
|
|
27
|
+
|
|
28
|
+
<!-- What you expected to happen -->
|
|
29
|
+
|
|
30
|
+
## Actual behavior
|
|
31
|
+
|
|
32
|
+
<!-- What actually happened -->
|
|
33
|
+
|
|
34
|
+
## Relevant logs or TRACE Claim output
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
<!-- Paste log output or TRACE Claim JSON here -->
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Conformance test ID (if applicable)
|
|
41
|
+
|
|
42
|
+
<!-- Prefix with ATTEST, POLICY, AUDIT, or TRACE — e.g. ATTEST-007, POLICY-003 -->
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security vulnerability
|
|
4
|
+
url: https://github.com/agentrust-io/cmcp/security/advisories/new
|
|
5
|
+
about: Report a security vulnerability via GitHub Security Advisories. Do not open a public issue.
|
|
6
|
+
- name: Design discussion
|
|
7
|
+
url: https://github.com/agentrust-io/cmcp/discussions
|
|
8
|
+
about: Start a design discussion or ask a broad question in GitHub Discussions before opening an issue.
|
|
9
|
+
- name: Trace spec proposal
|
|
10
|
+
url: https://github.com/agentrust-io/trace-spec/issues/new
|
|
11
|
+
about: Propose a change to the cMCP trace specification in the trace-spec repo.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Propose a new capability
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Problem statement
|
|
8
|
+
|
|
9
|
+
<!-- Describe the problem or gap this feature addresses. Be specific about who is affected and under what conditions. -->
|
|
10
|
+
|
|
11
|
+
## Proposed solution
|
|
12
|
+
|
|
13
|
+
<!-- Describe the capability you want added. Include enough detail for an implementer to scope the work. -->
|
|
14
|
+
|
|
15
|
+
## Alternatives considered
|
|
16
|
+
|
|
17
|
+
<!-- List other approaches you evaluated and why you ruled them out. -->
|
|
18
|
+
|
|
19
|
+
## Security/TEE impact
|
|
20
|
+
|
|
21
|
+
<!-- Required. Describe any impact on the TEE boundary, attestation flow, secret handling, or threat model. Write "None" if not applicable. -->
|
|
22
|
+
|
|
23
|
+
## Spec alignment
|
|
24
|
+
|
|
25
|
+
<!-- Does this require a change to the trace spec? If yes, describe which fields or events are affected and link to the relevant spec section. If no, write "No trace-spec change required." -->
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## What
|
|
2
|
+
|
|
3
|
+
<!-- Brief description of the change. One to three sentences. -->
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
<!-- Motivation and context. Link the issue this closes, e.g. Closes #123. -->
|
|
8
|
+
|
|
9
|
+
## Security impact
|
|
10
|
+
|
|
11
|
+
<!-- Required. If this change touches TEE boundaries, message signing, audit chain integrity,
|
|
12
|
+
capability tokens, or trust-score inputs, describe the impact. Otherwise write "None". -->
|
|
13
|
+
|
|
14
|
+
## Test plan
|
|
15
|
+
|
|
16
|
+
- [ ] `pytest` passes
|
|
17
|
+
- [ ] `ruff check` passes
|
|
18
|
+
- [ ] `mypy` passes
|
|
19
|
+
- [ ] Manual test performed (describe steps below if applicable)
|
|
20
|
+
|
|
21
|
+
<!-- Manual test steps (delete if not applicable): -->
|
|
22
|
+
|
|
23
|
+
## DCO sign-off
|
|
24
|
+
|
|
25
|
+
- [ ] I certify that I wrote or have the right to submit this contribution, and I agree to the
|
|
26
|
+
Developer Certificate of Origin (https://developercertificate.org).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
day: "monday"
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
ignore:
|
|
10
|
+
- dependency-name: "*"
|
|
11
|
+
update-types:
|
|
12
|
+
- "version-update:semver-major"
|
|
13
|
+
|
|
14
|
+
- package-ecosystem: "github-actions"
|
|
15
|
+
directory: "/"
|
|
16
|
+
schedule:
|
|
17
|
+
interval: "weekly"
|
|
18
|
+
day: "monday"
|
|
19
|
+
open-pull-requests-limit: 5
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
ref:
|
|
11
|
+
description: "Branch or SHA to run CI on"
|
|
12
|
+
required: false
|
|
13
|
+
default: ""
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
21
|
+
os: [ubuntu-latest, windows-latest]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@v6
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: python -m pip install --upgrade pip setuptools && pip install -e ".[dev]"
|
|
32
|
+
|
|
33
|
+
- name: Security scan
|
|
34
|
+
run: pip install bandit pip-audit && bandit -r src/ -c pyproject.toml && pip-audit
|
|
35
|
+
|
|
36
|
+
- name: Lint
|
|
37
|
+
run: ruff check src/ tests/
|
|
38
|
+
|
|
39
|
+
- name: Type check
|
|
40
|
+
run: mypy src/cmcp_runtime/
|
|
41
|
+
|
|
42
|
+
- name: Test
|
|
43
|
+
run: pytest tests/unit/ -v --tb=short --cov=src --cov-report=xml
|
|
44
|
+
|
|
45
|
+
- name: Upload coverage report
|
|
46
|
+
uses: codecov/codecov-action@v6
|
|
47
|
+
with:
|
|
48
|
+
fail_ci_if_error: false
|
|
49
|
+
|
|
50
|
+
benchmark:
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
needs: test
|
|
53
|
+
if: github.ref == 'refs/heads/main'
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v6
|
|
57
|
+
|
|
58
|
+
- uses: actions/setup-python@v6
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.12"
|
|
61
|
+
|
|
62
|
+
- name: Install dependencies
|
|
63
|
+
run: python -m pip install --upgrade pip setuptools && pip install -e ".[dev]"
|
|
64
|
+
|
|
65
|
+
- name: Run benchmark (software-only, CI gate p99 < 5ms)
|
|
66
|
+
run: python -m cmcp_runtime.benchmarks --provider software-only --calls 10000 --out benchmarks/
|
|
67
|
+
|
|
68
|
+
- name: Upload benchmark results
|
|
69
|
+
uses: actions/upload-artifact@v7
|
|
70
|
+
with:
|
|
71
|
+
name: benchmark-results
|
|
72
|
+
path: benchmarks/
|
|
73
|
+
if-no-files-found: warn
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: '15 3 * * 0'
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
actions: read
|
|
15
|
+
contents: read
|
|
16
|
+
security-events: write
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
analyze:
|
|
23
|
+
name: Analyze (python)
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Initialize CodeQL
|
|
31
|
+
uses: github/codeql-action/init@v4
|
|
32
|
+
with:
|
|
33
|
+
languages: python
|
|
34
|
+
queries: +security-extended
|
|
35
|
+
|
|
36
|
+
- name: Autobuild
|
|
37
|
+
uses: github/codeql-action/autobuild@v4
|
|
38
|
+
|
|
39
|
+
- name: Perform CodeQL Analysis
|
|
40
|
+
uses: github/codeql-action/analyze@v4
|
|
41
|
+
continue-on-error: true
|
|
42
|
+
with:
|
|
43
|
+
category: /language:python
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Docker publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build-and-push:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
packages: write
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Log in to GitHub Container Registry
|
|
23
|
+
uses: docker/login-action@v4
|
|
24
|
+
with:
|
|
25
|
+
registry: ghcr.io
|
|
26
|
+
username: ${{ github.actor }}
|
|
27
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
|
|
29
|
+
- name: Extract tag name
|
|
30
|
+
id: tag
|
|
31
|
+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
|
32
|
+
|
|
33
|
+
- name: Build and push
|
|
34
|
+
uses: docker/build-push-action@v7
|
|
35
|
+
with:
|
|
36
|
+
context: .
|
|
37
|
+
push: true
|
|
38
|
+
tags: |
|
|
39
|
+
ghcr.io/agentrust-io/cmcp-gateway:${{ steps.tag.outputs.tag }}
|
|
40
|
+
ghcr.io/agentrust-io/cmcp-gateway:latest
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write # for OIDC trusted publishing
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build
|
|
23
|
+
run: pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build distributions
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- uses: actions/upload-artifact@v7
|
|
29
|
+
with:
|
|
30
|
+
name: dist
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
publish:
|
|
34
|
+
needs: build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment: pypi
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/download-artifact@v8
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
|
|
45
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
draft-release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
|
|
18
|
+
- name: Create GitHub Release
|
|
19
|
+
env:
|
|
20
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
run: |
|
|
22
|
+
gh release create "${{ github.ref_name }}" \
|
|
23
|
+
--title "cmcp ${{ github.ref_name }}" \
|
|
24
|
+
--generate-notes \
|
|
25
|
+
--draft
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: SBOM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
sbom:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Generate SBOM
|
|
22
|
+
uses: anchore/sbom-action@v0
|
|
23
|
+
with:
|
|
24
|
+
format: spdx-json
|
|
25
|
+
output-file: sbom.spdx.json
|
|
26
|
+
- name: Upload SBOM artifact
|
|
27
|
+
uses: actions/upload-artifact@v7
|
|
28
|
+
with:
|
|
29
|
+
name: sbom
|
|
30
|
+
path: sbom.spdx.json
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: OpenSSF Scorecard
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
branch_protection_rule:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: '30 4 * * 1'
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
security-events: write
|
|
13
|
+
id-token: write
|
|
14
|
+
contents: read
|
|
15
|
+
actions: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
scorecard:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Run Scorecard
|
|
28
|
+
uses: ossf/scorecard-action@v2
|
|
29
|
+
with:
|
|
30
|
+
results_file: scorecard-results.sarif
|
|
31
|
+
results_format: sarif
|
|
32
|
+
publish_results: true
|
|
33
|
+
|
|
34
|
+
- name: Upload SARIF
|
|
35
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
36
|
+
with:
|
|
37
|
+
sarif_file: scorecard-results.sarif
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-06-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial TEE gateway with provider support for TPM, SEV-SNP, TDX, and Opaque
|
|
15
|
+
- Cedar policy enforcement for request authorization at the gateway layer
|
|
16
|
+
- TRACE Claim generation using the `GatewayClaim` envelope from `agentrust-trace`
|
|
17
|
+
- `cmcp-verify` standalone verifier for validating TRACE Claims offline
|
|
18
|
+
- Audit chain with Ed25519 signing for tamper-evident log integrity
|
|
19
|
+
|
|
20
|
+
[Unreleased]: https://github.com/agentrust-io/cmcp/compare/v0.1.0...HEAD
|
|
21
|
+
[0.1.0]: https://github.com/agentrust-io/cmcp/releases/tag/v0.1.0
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Technical Charter — cMCP
|
|
2
|
+
|
|
3
|
+
**Proposed hosting**: Agentic AI Foundation (AAIF).
|
|
4
|
+
**Status**: Pre-acceptance draft — effective upon host organization acceptance.
|
|
5
|
+
|
|
6
|
+
> **Note for external contributors:** This charter is a working draft and has not yet been accepted by a host organization. Governance terms, IP policy, and trademark ownership described here are proposed, not final. Do not assume binding foundation commitments until formal acceptance.
|
|
7
|
+
|
|
8
|
+
**Version**: 0.1 (aligned with gateway v0.1)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Mission
|
|
13
|
+
|
|
14
|
+
The cMCP project develops and maintains an open implementation of the Confidential MCP (Model Context Protocol) gateway — hardware-attested policy enforcement for AI agent tool calls. The mission is to make tool-call authorization cryptographically verifiable by any party, without trusting the operator, without requiring closed infrastructure, and without vendor lock-in to any silicon vendor, cloud provider, or AI platform.
|
|
15
|
+
|
|
16
|
+
## 2. Scope
|
|
17
|
+
|
|
18
|
+
The project includes:
|
|
19
|
+
|
|
20
|
+
- **cMCP Gateway** — the reference open-source implementation of the confidential gateway, including the gRPC/HTTP proxy, policy engine, and hardware attestation bridge.
|
|
21
|
+
- **Hardware Provider API** — the normalized interface (`BaseProvider`) for integrating TEE platforms (TPM, AMD SEV-SNP, Intel TDX, and others).
|
|
22
|
+
- **Python SDK** — the `cmcp-gateway` package and client libraries for policy authoring and runtime integration.
|
|
23
|
+
- **TRACE integration** — built-in emission of TRACE Trust Records for every attested tool call (see [agentrust-io/trace-spec](https://github.com/agentrust-io/trace-spec)).
|
|
24
|
+
- **Agent Manifest binding** — verification of agent identity via Agent Manifest at tool-call time (see [agentrust-io/agent-manifest](https://github.com/agentrust-io/agent-manifest)).
|
|
25
|
+
- **Integration examples** — working examples across financial services, healthcare, and multi-tenant SaaS deployment patterns.
|
|
26
|
+
|
|
27
|
+
Out of scope: AI model governance beyond tool-call enforcement, hardware TEE platform SDKs, network-level policy outside the MCP protocol boundary, and MCP server implementations themselves.
|
|
28
|
+
|
|
29
|
+
## 3. Technical Steering Committee
|
|
30
|
+
|
|
31
|
+
Upon host organization acceptance, governance transitions from the current Project Lead model to a Technical Steering Committee (TSC).
|
|
32
|
+
|
|
33
|
+
**Composition**: 3–7 members. No single organization may hold more than 40% of TSC seats. The founding Project Lead (Imran Siddique, Opaque Systems) holds one founding seat for the v1.0 release cycle.
|
|
34
|
+
|
|
35
|
+
**Election**: TSC members are elected annually by active contributors (at least one merged pull request in the preceding 12 months). Each contributor has one vote.
|
|
36
|
+
|
|
37
|
+
**Quorum**: Two-thirds of TSC members must participate for a vote to be valid.
|
|
38
|
+
|
|
39
|
+
**Decisions**:
|
|
40
|
+
- Patch releases and editorial changes: simple TSC majority
|
|
41
|
+
- Minor releases (new hardware providers, new policy primitives): two-thirds TSC majority + 7-day public comment
|
|
42
|
+
- Breaking API changes (gateway protocol, provider API): two-thirds TSC majority + 30-day public comment + explicit migration guide
|
|
43
|
+
|
|
44
|
+
**Meetings**: Monthly public TSC meeting. Notes published within 5 business days.
|
|
45
|
+
|
|
46
|
+
## 4. Intellectual Property Policy
|
|
47
|
+
|
|
48
|
+
All contributions must be made under the terms of [LICENSE](LICENSE). Contributors must sign commits with the Developer Certificate of Origin (DCO). No contribution may incorporate material covered by a patent the contributor is unwilling to license royalty-free to conforming implementations.
|
|
49
|
+
|
|
50
|
+
Code and schemas are licensed under Apache 2.0 with Patent Promise (see LICENSE).
|
|
51
|
+
|
|
52
|
+
## 5. Trademark Policy
|
|
53
|
+
|
|
54
|
+
"cMCP" and "cMCP-compatible" as project and conformance marks are currently held by Opaque Systems, Inc. Upon host organization acceptance, trademark ownership transfers to AAIF under their standard trademark policy.
|
|
55
|
+
|
|
56
|
+
Use of "cMCP-compatible" to describe a gateway deployment requires that the implementation satisfies the hardware attestation and policy enforcement requirements defined in the project documentation for the version being claimed.
|
|
57
|
+
|
|
58
|
+
## 6. Relationship to other projects
|
|
59
|
+
|
|
60
|
+
cMCP builds on and does not replace:
|
|
61
|
+
|
|
62
|
+
- **MCP (Model Context Protocol, Anthropic)** — the underlying tool-call protocol that cMCP extends with attestation
|
|
63
|
+
- **TRACE** ([agentrust-io/trace-spec](https://github.com/agentrust-io/trace-spec)) — governance record emitted per attested tool call
|
|
64
|
+
- **Agent Manifest** ([agentrust-io/agent-manifest](https://github.com/agentrust-io/agent-manifest)) — agent identity bound at tool-call time
|
|
65
|
+
- **SPIFFE / SPIRE** — workload identity for gateway and agent services
|
|
66
|
+
- **RATS / EAT (RFC 9711)** — attestation evidence format
|
|
67
|
+
- **OPA / Cedar** — policy engine integration surface
|
|
68
|
+
|
|
69
|
+
## 7. Transition timeline
|
|
70
|
+
|
|
71
|
+
| Milestone | Target |
|
|
72
|
+
|---|---|
|
|
73
|
+
| v0.1 developer preview — CC Summit announcement | June 2026 |
|
|
74
|
+
| Hardware provider API stabilization, TRACE v0.2 integration | Q3 2026 |
|
|
75
|
+
| AAIF project proposal submission | Q3 2026 |
|
|
76
|
+
| v1.0 stable release under TSC governance | 2027 |
|
|
77
|
+
|
|
78
|
+
## 8. Amendments
|
|
79
|
+
|
|
80
|
+
Amendments to this charter require a two-thirds TSC majority and a 30-day public comment period. Before host organization acceptance, amendments require Project Lead approval and 14-day notice to contributors.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make participation in our community a harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Positive behavior: welcoming and inclusive language, respecting differing viewpoints, gracefully accepting constructive criticism, focusing on what is best for the community.
|
|
10
|
+
|
|
11
|
+
Unacceptable behavior: sexualized language or imagery, trolling, insulting comments, personal or political attacks, public or private harassment, publishing others' private information without permission.
|
|
12
|
+
|
|
13
|
+
## Enforcement
|
|
14
|
+
|
|
15
|
+
Report instances of abusive behavior by opening a GitHub issue labeled `code of conduct`, or by posting in [GitHub Discussions](https://github.com/orgs/agentrust-io/discussions). Security vulnerabilities belong in SECURITY.md, not here.
|
|
16
|
+
|
|
17
|
+
Adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Contributing to cMCP
|
|
2
|
+
|
|
3
|
+
Thank you for contributing. This document covers everything you need to get started.
|
|
4
|
+
|
|
5
|
+
## Before you start
|
|
6
|
+
|
|
7
|
+
cMCP is a hardware-attested policy gateway. Changes to the TEE boundary, signing path, audit chain, or TRACE Claim generation require extra care — these are security-critical components. When in doubt, open an issue first.
|
|
8
|
+
|
|
9
|
+
## Developer certificate of origin
|
|
10
|
+
|
|
11
|
+
All commits must include a `Signed-off-by` line. This is a lightweight way to certify you wrote the code or have the right to contribute it. No CLA required.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
git commit -s -m "feat: your change"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The sign-off certifies the [Developer Certificate of Origin v1.1](https://developercertificate.org/).
|
|
18
|
+
|
|
19
|
+
## Development setup
|
|
20
|
+
|
|
21
|
+
Requires Python 3.11+.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/agentrust-io/cmcp
|
|
25
|
+
cd cmcp
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Running checks locally
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
ruff check src/ tests/ # lint
|
|
33
|
+
mypy src/cmcp_gateway/ # type check
|
|
34
|
+
bandit -r src/ -c pyproject.toml # security scan
|
|
35
|
+
pytest tests/unit/ -v # unit tests
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
All four must pass before a PR is mergeable.
|
|
39
|
+
|
|
40
|
+
## Commit format
|
|
41
|
+
|
|
42
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
feat: add sev-snp provider
|
|
46
|
+
fix: correct nonce encoding in RuntimeInfo
|
|
47
|
+
docs: clarify TRACE profile envelope structure
|
|
48
|
+
test: add coverage for stale attestation path
|
|
49
|
+
refactor: extract _build_policy helper
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Keep commits small and focused. One logical change per commit. Do not bundle unrelated fixes.
|
|
53
|
+
|
|
54
|
+
## Pull request process
|
|
55
|
+
|
|
56
|
+
1. Branch from `main`: `git checkout -b feat/your-change`
|
|
57
|
+
2. Write tests for new behaviour — the test suite must pass
|
|
58
|
+
3. Run all four checks locally (see above)
|
|
59
|
+
4. Open a PR against `main` with the template filled in
|
|
60
|
+
5. At least one maintainer must approve before merge
|
|
61
|
+
6. Squash if the commit history is noisy; preserve meaningful commits
|
|
62
|
+
|
|
63
|
+
## Security-critical components
|
|
64
|
+
|
|
65
|
+
Changes to these paths require two maintainer approvals and a comment explaining the security impact:
|
|
66
|
+
|
|
67
|
+
- `src/cmcp_gateway/audit/` — signing, audit chain, TRACE Claim generation
|
|
68
|
+
- `src/cmcp_gateway/tee/` — TEE provider integration
|
|
69
|
+
- `src/cmcp_gateway/policy/` — Cedar policy evaluation
|
|
70
|
+
|
|
71
|
+
## Reporting security vulnerabilities
|
|
72
|
+
|
|
73
|
+
Do **not** open a public issue. Use [GitHub Security Advisories](https://github.com/agentrust-io/cmcp/security/advisories/new) for private disclosure. See [SECURITY.md](SECURITY.md).
|
|
74
|
+
|
|
75
|
+
## Code conventions
|
|
76
|
+
|
|
77
|
+
- Python 3.11+ syntax throughout (`X | Y`, `match`, etc.)
|
|
78
|
+
- `ruff` enforces style; do not add `# noqa` without a comment explaining why
|
|
79
|
+
- `mypy --strict` on `src/cmcp_gateway/`; new public functions need type annotations
|
|
80
|
+
- No comments that describe *what* the code does — only *why* when non-obvious
|
|
81
|
+
- Tests live in `tests/unit/` and follow the existing `test_<module>.py` naming
|
|
82
|
+
|
|
83
|
+
## Questions
|
|
84
|
+
|
|
85
|
+
Open a [GitHub Discussion](https://github.com/agentrust-io/cmcp/discussions) for design questions or proposals before writing code.
|