Thank you for contributing. This document covers everything you need to get started.
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.
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.
git commit -s -m "feat: your change"
The sign-off certifies the Developer Certificate of Origin v1.1.
Requires Python 3.11+.
git clone https://github.com/agentrust-io/cmcp
cd cmcp
pip install -e ".[dev]"ruff check src/ tests/ # lint
mypy src/cmcp_gateway/ # type check
bandit -r src/ -c pyproject.toml # security scan
pytest tests/unit/ -v # unit testsAll four must pass before a PR is mergeable.
Follow Conventional Commits:
feat: add sev-snp provider
fix: correct nonce encoding in RuntimeInfo
docs: clarify TRACE profile envelope structure
test: add coverage for stale attestation path
refactor: extract _build_policy helper
Keep commits small and focused. One logical change per commit. Do not bundle unrelated fixes.
- Branch from
main:git checkout -b feat/your-change - Write tests for new behaviour: the test suite must pass
- Run all four checks locally (see above)
- Open a PR against
mainwith the template filled in - At least one maintainer must approve before merge
- Squash if the commit history is noisy; preserve meaningful commits
Changes to these paths require two maintainer approvals and a comment explaining the security impact:
src/cmcp_gateway/audit/: signing, audit chain, TRACE Claim generationsrc/cmcp_gateway/tee/: TEE provider integrationsrc/cmcp_gateway/policy/: Cedar policy evaluation
Do not open a public issue. Use GitHub Security Advisories for private disclosure. See SECURITY.md.
- Python 3.11+ syntax throughout (
X | Y,match, etc.) ruffenforces style; do not add# noqawithout a comment explaining whymypy --strictonsrc/cmcp_gateway/; new public functions need type annotations- No comments that describe what the code does: only why when non-obvious
- Tests live in
tests/unit/and follow the existingtest_<module>.pynaming
Open a GitHub Discussion for design questions or proposals before writing code.