{
  "markdown": "<!-- mcp-name: io.github.AIops-tools/compliance-aiops -->\n\n# Compliance AIops\n\n> **Disclaimer**: Community-maintained open-source project. **Not affiliated with, endorsed by, or sponsored by any framework body or GRC vendor.** HIPAA, PCI-DSS, SOC 2, GDPR and OSCAL are referenced descriptively; the frameworks and trademarks belong to their owners. MIT licensed.\n\nGoverned **compliance-evidence** tooling for AI-agent infrastructure ops. It\n**reads the audit trails your governed AIops agents already write** — the local\n`~/.<tool>-aiops/audit.db` SQLite trails, all sharing one `audit_log` schema —\nand turns that activity into **framework-mapped, hash-chain-sealed compliance\nevidence**. It **never scans your infrastructure and never replaces a GRC\nplatform**: it converts the trails you already produce into auditor-ready,\ntamper-evident evidence bundles.\n\nUnlike the other tools in the AIops-tools line it is **not a platform wrapper**:\n**no external API, no network, no platform credentials**. Its only inputs are\nthose on-disk audit databases, read **read-only**. That also makes it the\neasiest-to-self-test tool in the line — fully offline and deterministic.\n\n> **Evidence, not certification.** Fully offline; the source `audit.db`\n> files remain the system of record. OSCAL export is a documented v0.2 roadmap\n> item (v0.1 emits JSON + Markdown + CSV shaped to ease a future OSCAL\n> Assessment-Results adapter).\n\n## Key features\n\n- **Framework mapping with honest evidence-strength** — audit events map to\n  **HIPAA §164.312 / PCI-DSS v4.0 / SOC 2 TSC / GDPR** controls. Audit trails\n  prove *operating effectiveness* strongly but *control design / configuration*\n  only partially, and each control is labelled `strong` or `partial`.\n  `gap_analysis` says so per control, with the caveat and a remediation hint.\n- **Hash-chain-sealed evidence bundles** — SHA-256 over ordered records\n  (`hash = SHA-256(prev_hash ‖ canonical_json(record))`, genesis prev = 64\n  zeros). The `chainHead` is **reproducible** for the same (framework, period,\n  sources). `verify_bundle` catches tampering; `verify_source_chain` detects\n  row-id gaps / deletions in a source trail. An optional HMAC signature seals a\n  bundle under a stored signing key.\n- **Zero-network, read-only** — no credentials, no outbound calls, no mutation\n  of the source trails. Bundles are the only thing written, under\n  `~/.compliance-aiops/bundles/`.\n- **Deterministic, test-verified integrity** — the integrity claims are\n  themselves covered by tests: synthetic audit DBs are built through the real\n  governance-harness `AuditEngine`, a golden reproducible `chainHead` is\n  asserted, and tamper tests confirm detection. No live infrastructure needed.\n\n## What this tool does, and does not, decide\n\nIt reads your audit trails and writes evidence bundles — and records every\noperation. It does **not** decide whether producing or signing a bundle is\nallowed: that is the agent's judgement, or the filesystem permissions of the\naccount it runs as. The source `audit.db` files are opened strictly read-only\nregardless, and the only thing ever written is a bundle under\n`~/.compliance-aiops/bundles/`.\n\nSo there is no read-only switch, no policy file, no approval gate to configure.\nThe one thing the tool guarantees is that nothing is silent: **every call, over\nMCP and over the CLI alike, lands an audit row** in\n`~/.compliance-aiops/audit.db`.\n\n> Each tool declares a `risk_level`, kept in agreement with its `[READ]`/`[WRITE]`\n> documentation tag by a test, and carried into the audit row as a descriptive\n> tier — so a reviewer can see at a glance what a row was. It is a label, not a\n> gate.\n\n## Tools (16 MCP tools)\n\n### Read / analysis (13)\n\n| Tool | Purpose |\n|------|---------|\n| `list_audit_sources` | Discovered sibling audit DBs (path, tool, readable, row count) |\n| `query_audit_events` | Cross-tool event query — filter by tool/skill/status/risk/approved/selector/since/until |\n| `activity_timeline` | Event counts bucketed by hour or day |\n| `list_frameworks` | Supported frameworks + control counts |\n| `coverage_summary` | Per-control covered/weak/uncovered for ONE framework |\n| `control_evidence` | Evidence rows + population + a reproducible query for ONE control |\n| `gap_analysis` | Controls with no/weak evidence + honest caveat + remediation |\n| `approval_report` | High-risk write ops + who approved + rationale (the CC8.1 / PCI 7-8 / HIPAA §312(a) artifact) |\n| `exceptions_report` | Denied / error / budget_exceeded ops — enforcement + anomaly evidence |\n| `verify_source_chain` | Chain head + row-id gap detection for one source |\n| `verify_bundle` | Verify a sealed bundle: chain + seal head + optional signature |\n| `list_bundles` | Bundles under `~/.compliance-aiops/bundles/` |\n| `oscal_assessment_results` | A sealed bundle as a NIST **OSCAL 1.2.3** Assessment Results document, inline, with its limitations named |\n| `bundle_schedule_hint` | Ready-to-paste cron line + non-interactive command for periodic sealing (writes nothing) |\n\n### Write / artifact (3 — no external mutation)\n\n| Tool | Risk | Purpose |\n|------|:---:|---------|\n| `generate_evidence_bundle` | low | One call: coverage + approval trail + exceptions + sealed records → a bundle `.json` |\n| `export_bundle` | low | Render a bundle to markdown / csv / json / **oscal** |\n| `sign_bundle` | medium | HMAC over the seal using the stored signing key |\n\nThe CLI exposes a convenience subset; the full 19-tool surface is available over MCP.\n\n## Frameworks & controls\n\n| Framework | Sample controls (strength) |\n|-----------|----------------------------|\n| **HIPAA** (§164.312) | 164.312(b) Audit controls (strong), 164.312(a)(1) Access control (strong), 164.312(c)(1) Integrity (strong) |\n| **PCI-DSS v4.0** | 10.2 Audit log content (strong), 10.3 Protect audit logs (strong), 7-8 Least privilege / authn (partial) |\n| **SOC 2 TSC** | CC6.1 Logical access (strong), CC7.2 Monitoring (strong), CC8.1 Change management (strong) |\n| **GDPR** | Art.30 Records of processing (partial), Art.32 Security of processing (strong) |\n| **ISO/IEC 27001:2022** (Annex A) | A.5.15 Access control (strong), A.5.16 Identity mgmt (strong), A.5.18 Access rights (partial), A.8.2 Privileged access (partial), A.8.15 Logging (strong), A.8.16 Monitoring (strong), A.8.32 Change management (strong) |\n| **等保2.0 (DJCP L3)** (GB/T 22239-2019 三级) | 8.1.5.4 安全审计 (strong), 8.1.4.2 访问控制 (partial), 8.1.5 安全管理中心/集中审计 (strong) |\n\n## Install\n\n```bash\nuv tool install compliance-aiops      # or: pipx install compliance-aiops\n```\n\n## Quick start\n\n### As a Claude Code plugin\n\nOne install gives an agent both the skill and the MCP server:\n\n```\n/plugin marketplace add AIops-tools/marketplace\n/plugin install compliance-aiops@aiops-tools\n```\n\nThe MCP server is fetched with [uv](https://docs.astral.sh/uv/) and pinned to the\npackage version this plugin declares, so an audit row can be traced back to the\ncode that wrote it. Credentials are still configured with `compliance-aiops init` — see below.\n\n### As a CLI or standalone MCP server\n\n```bash\ncompliance-aiops init                 # discover sibling ~/.*-aiops/audit.db, set org name, optional signing key\ncompliance-aiops doctor               # which sibling audit DBs are present/readable\ncompliance-aiops overview             # audit sources + per-framework covered/total\ncompliance-aiops report coverage soc2 # per-control SOC 2 coverage\ncompliance-aiops bundle generate soc2 # sealed evidence bundle → ~/.compliance-aiops/bundles/\ncompliance-aiops bundle verify <path> # re-verify the chain + seal (+ signature)\n```\n\nRun as an MCP server (stdio):\n\n```bash\nexport COMPLIANCE_AIOPS_MASTER_PASSWORD=...   # only needed to unlock a signing key\ncompliance-aiops mcp                          # or: compliance-aiops-mcp\n```\n\n## 定期封存 (scheduled sealing)\n\nEvidence bundles are most useful when sealed on a **cadence** (e.g. weekly), so\neach period has a tamper-evident anchor. This tool ships **no daemon** — instead\n`bundle schedule` prints a ready-to-paste cron line plus the exact non-interactive\ncommand, and writes nothing:\n\n```bash\ncompliance-aiops bundle schedule soc2 --cron \"0 2 * * 1\" --period 7d --sign\n```\n\nIt returns a `cronLine` you paste into `crontab -e`, for example:\n\n```cron\n0 2 * * 1 compliance-aiops bundle generate soc2 --period 7d --sign\n```\n\n- `--period` (also available on `bundle generate`) is a convenience relative\n  window — `7d`, `24h`, `2w`, or `last-7-days` — resolved to a since/until pair\n  ending \"now\", so each scheduled run seals the trailing window.\n- Export `COMPLIANCE_AIOPS_MASTER_PASSWORD` **in the cron job's environment** so a\n  stored signing key unlocks non-interactively. Do **not** inline the real\n  password in the crontab file — reference it from a protected env file.\n\n## Integrity & honest limits\n\n- **Tamper-EVIDENT, not tamper-PROOF.** The hash chain and optional signature\n  let an auditor *detect* alteration; they do not prevent it. The source\n  `audit.db` files remain the system of record — record the `chainHead`\n  out-of-band if you need an independent anchor.\n- **Operating effectiveness vs. design.** An audit trail strongly evidences that\n  a control *ran* (samples, approvals, denials) but only partially evidences that\n  a control is *designed / configured* correctly (e.g. MFA required,\n  least-privilege roles). Every control carries a `strong` / `partial` label and\n  `gap_analysis` surfaces the caveat rather than overclaiming.\n\n## Supported scope & limitations\n\n- **Evidence, not certification.** This produces auditor-ready evidence bundles;\n  it does not issue attestations, opinions, or certifications.\n- **In scope:** the six frameworks above, over the `audit_log` trails written by\n  governed AIops tools discovered via `~/.*-aiops/audit.db`.\n- **Not in scope:** it does **not** scan infrastructure, connect to any platform,\n  or replace a GRC platform. For platform operations use the other AIops-tools.\n- **OSCAL export is v0.2.** v0.1 emits JSON + Markdown + CSV.\n- **Interfaces may change before v1.0.**\n- **Verification:** the integrity claims are covered by deterministic offline tests;\n  see [`docs/VERIFICATION.md`](docs/VERIFICATION.md) for the reproducible run.\n\n## Missing a capability?\n\nWant another framework, control mapping, export format (OSCAL, CSV shape), or a\nverification you don't see here? **Open an issue or a PR — contributions\nwelcome.**\n",
  "bytes": 10419,
  "sha": "c45c3a15c98397d8585c5f8232c159598915c029d9c69eae19035914a885d4b9",
  "repo_slug": "aiops-tools/compliance-aiops",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_aiops_tools_compliance_aiops_e6bc591f/readme"
}