๐Ÿ”’ SOC 2 Type II

April 26, 2026 ยท View on GitHub

๐Ÿ”’ SOC 2 Type II โ€” Trust Service Criteria Mapping

Disclaimer: This document is an internal self-assessment mapping, NOT a validated certification or third-party audit. It documents how the toolkit's capabilities align with the referenced standard. Organizations must perform their own compliance assessments with qualified auditors.

How the Agent Governance Toolkit maps to the AICPA SOC 2 Type II Trust Service Criteria (2017)


Executive Summary

The Agent Governance Toolkit provides runtime governance infrastructure that addresses SOC 2 Type II controls across Security, Availability, and Processing Integrity criteria. The toolkit's strongest coverage is in Security (CC1โ€“CC9), where the policy engine, RBAC, cryptographic identity, execution rings, and audit logging provide a defense-in-depth enforcement stack. Availability (A1) is well-supported through circuit breakers, SLO enforcement, and chaos testing primitives. Processing Integrity (PI1) benefits from deterministic policy evaluation, Merkle audit chains, and input validation โ€” though several audit chain implementations have integrity defects.

Confidentiality (C1) has partial coverage through egress controls, PII pattern detection, cryptographic identity, and credential redaction on the MCP gateway audit path โ€” but still lacks comprehensive audit-log PII minimization, at-rest encryption, and key rotation. Privacy (P1โ€“P8) is the largest gap area: the toolkit detects only 2 built-in PII patterns (SSN, credit card) on tool inputs, has no consent management, no data subject access request support, and no retention enforcement. Organizations deploying this toolkit in SOC 2 scope must supplement Privacy controls with external tooling.

Important: This mapping documents what the toolkit provides as infrastructure. SOC 2 Type II requires evidence of operating effectiveness over a review period โ€” policies followed, controls monitored, exceptions investigated. The toolkit provides the enforcement mechanisms; the operating procedures, organizational policies, and evidence collection are the deployer's responsibility. "Partial" coverage means the toolkit provides building blocks but does not satisfy the control independently.


Coverage Summary

CriteriaCoverageKey Controls AddressedPrimary Gaps
Security (CC1โ€“CC9)โš ๏ธ PartialPolicy engine, RBAC, DID identity, execution rings, audit logging, MCP security scanning, kill switchDetection modules unwired from enforcement
Availability (A1)โš ๏ธ PartialCircuit breakers, SLO/error budgets, chaos testing framework, sub-millisecond enforcementChaos engine framework-only, no health check endpoints, rate limiter unwired
Processing Integrity (PI1)โš ๏ธ PartialMerkle audit chain, policy validation, input sanitization, drift detection3 of 4 audit chain implementations have integrity defects, post_execute() never blocks
Confidentiality (C1)โš ๏ธ PartialEd25519 identity, HMAC-SHA256 signing, egress policy, PII/secret detection, MCP audit credential redactionSymmetric HMAC keys, no at-rest encryption, incomplete audit-log PII minimization
Privacy (P1โ€“P8)โŒ Gap2 PII regex patterns, blocked patterns, retention_days schema fieldNo consent management, no DSAR, no data minimization, retention not enforced

0 of 5 criteria fully covered. 4 partially addressed. 1 gap.


Security (CC1โ€“CC9)

The system is protected against unauthorized access, unauthorized disclosure of information, and damage to systems that could compromise the availability, integrity, confidentiality, and privacy of information or systems and affect the entity's ability to meet its objectives.

What Exists

CC1: Control Environment

ControlFeatureLocationCoverage
CC1.1 Commitment to integritySTRIDE-oriented threat modeldocs/THREAT_MODEL.mdโš ๏ธ Partial โ€” documents threats, no control ownership
CC1.4 AccountabilityRBAC with 4 roles (READER, WRITER, ADMIN, AUDITOR)agent-governance-python/agent-os/src/agent_os/integrations/rbac.py:16-30โš ๏ธ Partial โ€” role-to-permission mapping, no personnel tracking

CC5: Control Activities

ControlFeatureLocationCoverage
CC5.1 Risk-mitigating controlsPolicyEvaluator โ€” every agent action evaluated before executionagent-governance-python/agent-os/src/agent_os/policies/evaluator.pyโœ… Covered
CC5.2 Technology controlsGovernancePolicy with max_tool_calls, max_tokens, timeout_seconds, blocked_patternsagent-governance-python/agent-os/src/agent_os/integrations/base.pyโœ… Covered
CC5.2 Policy modesStrict (deny-by-default), permissive (allow-by-default), audit (log-only)agent-governance-python/agent-os/src/agent_os/policies/schema.py:34-41โœ… Covered

CC6: Logical and Physical Access Controls

ControlFeatureLocationCoverage
CC6.1 Logical accessRBAC โ€” 4 roles with action-level permissionsagent-governance-python/agent-os/src/agent_os/integrations/rbac.py:24-30โœ… Covered
CC6.1 Tool restrictionsallowed_tools per policy, PolicyInterceptor blocks unlisted toolsagent-governance-python/agent-os/src/agent_os/integrations/base.py:689-693โœ… Covered
CC6.2 Access provisioningTrust scoring (0โ€“1000, 5 tiers), delegation chains must narrowagent-governance-python/agent-mesh/src/agentmesh/trust/โœ… Covered
CC6.3 Access removalTrust decay over time without positive signals, role removalagent-governance-python/agent-os/src/agent_os/integrations/rbac.py:94-96โš ๏ธ Partial
CC6.6 AuthenticationEd25519 challenge-response handshake with DoS protectionagent-governance-python/agent-mesh/src/agentmesh/trust/handshake.py:158-456โœ… Covered
CC6.6 Certificate authoritySPIFFE CA with Ed25519 sponsor verification for SVID certificatesagent-governance-python/agent-mesh/src/agentmesh/core/identity/ca.py:6-44โœ… Covered
CC6.7 Privilege restrictionExecution rings (Ring 0โ€“3) enforce privilege tiers; Ring 0 always deniedagent-governance-python/agent-hypervisor/src/hypervisor/models.py:46-69โœ… Covered
CC6.8 Malicious software preventionPrompt injection detection (6 regex groups), MCP security scanner, MemoryGuardagent-governance-python/agent-os/src/agent_os/prompt_injection.py:147-197, mcp_security.py:272+โš ๏ธ Partial

CC7: System Operations

ControlFeatureLocationCoverage
CC7.1 Detection and monitoringGovernanceAuditLogger with pluggable backends (JSONL, in-memory, logging)agent-governance-python/agent-os/src/agent_os/audit_logger.py:19-136โœ… Covered
CC7.1 Tamper-evident loggingMerkleAuditChain with SHA-256 hash chaining and inclusion proofsagent-governance-python/agent-mesh/src/agentmesh/governance/audit.py:23-344โœ… Covered
CC7.2 Change monitoringVersion-controlled PolicyDocument with name, version, description fieldsagent-governance-python/agent-os/src/agent_os/policies/schema.py:70-115โš ๏ธ Partial
CC7.3 Vulnerability managementMCP security scanner: tool poisoning, rug pulls, description injection, schema abuse, cross-server attacks, confused deputyagent-governance-python/agent-os/src/agent_os/mcp_security.py:300-331โš ๏ธ Partial
CC7.3 Supply chainSupplyChainGuard: freshly published packages (<7 days), unpinned versions, typosquatting detectionagent-governance-python/agent-os/src/agent_os/supply_chain.py:72-79โš ๏ธ Partial
CC7.4 Incident responseKill switch with 6 kill reasons (BEHAVIORAL_DRIFT, RATE_LIMIT, RING_BREACH, MANUAL, QUARANTINE_TIMEOUT, SESSION_TIMEOUT)agent-governance-python/agent-hypervisor/src/hypervisor/security/kill_switch.py:64-136โš ๏ธ Partial
CC7.4 EscalationEscalationHandler with approval backends, timeout with default-deny, M-of-N quorum, fatigue detectionagent-governance-python/agent-os/src/agent_os/integrations/escalation.py:48-583โœ… Covered

CC8: Change Management

ControlFeatureLocationCoverage
CC8.1 Infrastructure changesSBOM generation (SPDX 2.3 format), Ed25519 artifact signingagent-governance-python/agent-sre/src/agent_sre/signing.py:18-33โš ๏ธ Partial
CC8.1 CI securityAutomated dependency review, CodeQL scanning, OpenSSF Scorecard, SBOM generation.github/workflows/dependency-review.yml, codeql.yml, scorecard.yml, sbom.ymlโœ… Covered
CC8.1 Progressive deliveryCanary deployments for gradual rolloutagent-governance-python/agent-sre/src/agent_sre/delivery/gitops.pyโš ๏ธ Partial

CC9: Risk Mitigation

ControlFeatureLocationCoverage
CC9.1 Risk identificationRogue agent detection โ€” composite behavioral risk scoring: frequency z-scores, entropy deviation, capability profile violationsagent-governance-python/agent-sre/src/agent_sre/anomaly/rogue_detector.py:276-401โœ… Covered
CC9.1 Anomaly detectionRolling baselines with z-score detectionagent-governance-python/agent-sre/src/agent_sre/anomaly/detector.py:123โœ… Covered
CC9.2 Risk mitigationCircuit breakers for cascading failure preventionagent-governance-python/agent-sre/src/agent_sre/cascade/circuit_breaker.py:90โœ… Covered
# CC6.1 in action: Role-Based Access Control
from agent_os.integrations.rbac import RBACManager, Role

rbac = RBACManager()
rbac.assign_role("data-analyst", Role.READER)
rbac.assign_role("ops-agent", Role.ADMIN)

# Reader cannot write โ€” denied by permission check
assert not rbac.has_permission("data-analyst", "write")   # False
assert rbac.has_permission("data-analyst", "read")         # True
# CC7.1 in action: Governance Audit Logging
from agent_os.audit_logger import GovernanceAuditLogger, JsonlFileBackend

audit = GovernanceAuditLogger()
audit.add_backend(JsonlFileBackend("governance_audit.jsonl"))
audit.log_decision(
    agent_id="finance-bot",
    action="transfer",
    decision="deny",
    reason="Policy violation: amount exceeds role limit",
)

Reference implementation: The finance-soc2 example demonstrates CC6.1, CC6.3, CC7.1, CC7.2, CC7.3, and CC8.1 using real Agent OS governance APIs with role-based separation of duties, approval workflows, and immutable audit trails.

Security Gaps

  • Kill switch is placeholder (CC7.4): Resolved. KillSwitch now registers agents and substitutes, creates StepHandoff records, and increments handoff_success_count during saga orchestration. See kill_switch.py:69-178.
  • Detection modules not wired to enforcement (CC6.8): PromptInjectionDetector, RateLimiter, BoundedSemaphore, ScopeGuard, SupplyChainGuard, and MCPSecurityScanner exist as standalone utilities but are not auto-wired into the BaseIntegration enforcement lifecycle. 6 of 10 OWASP risks share this structural gap.
  • MCP scanner acknowledges incompleteness (CC7.3): Line 287 of mcp_security.py warns it "uses built-in sample rules that may not cover all MCP tool poisoning techniques."
  • Regex-only prompt injection detection (CC6.8): No semantic or multilingual detection. English-only regex patterns can be bypassed via paraphrasing.
  • No network-level security enforcement (CC6.6): TLS enforcement and certificate pinning are deferred to deployment configuration.
  • Organizational controls not addressed (CC1โ€“CC4): Board oversight, personnel policies, risk assessment governance, and monitoring activities are organizational obligations outside the toolkit's scope.
  1. Wire detection modules into BaseIntegration.pre_execute() via GovernancePolicy flags (closes CC6.8 gaps across multiple OWASP risks).
  2. Implement actual process termination in KillSwitch (CC7.4).
  3. Deploy each agent in a separate container with governance middleware inside for defense-in-depth (CC6.7).
  4. Add network policies for cross-agent communication control (CC6.6).
  5. Integrate LlamaFirewall for semantic prompt injection detection (CC6.8).

Availability (A1)

The system is available for operation and use as committed or agreed.

What Exists

ControlFeatureLocationCoverage
A1.1 System capacityPolicy enforcement at sub-millisecond latency; 47K ops/sec at 1,000 concurrent agentsBENCHMARKS.mdโœ… Covered
A1.1 Throughput stabilityNear-linear scaling: 46,329 ops/sec (50 agents) โ†’ 47,085 ops/sec (1,000 agents)agent-governance-python/agent-os/benchmarks/bench_kernel.pyโœ… Covered
A1.2 Fault isolationPer-agent circuit breakers (CLOSED โ†’ OPEN โ†’ HALF_OPEN) with configurable failure thresholdsagent-governance-python/agent-sre/src/agent_sre/cascade/circuit_breaker.py:22-26โœ… Covered
A1.2 Cascading failure preventionCascade detection monitors dependency chains for failure propagation patternsagent-governance-python/agent-sre/src/agent_sre/cascade/circuit_breaker.pyโœ… Covered
A1.2 SLO enforcement7 SLI types: TaskSuccessRate, ToolCallAccuracy, ResponseLatency, CostPerTask, PolicyComplianceRate, HallucinationRate, CalibrationDeltaagent-governance-python/agent-sre/src/agent_sre/slo/indicators.pyโœ… Covered
A1.2 Error budgetsQuantified failure tolerance with burn rate alerts triggering automatic interventionagent-governance-python/agent-sre/src/agent_sre/slo/indicators.pyโœ… Covered
A1.2 Chaos testingChaosExperiment framework for resilience testing with fault injection, schedule evaluation, and template libraryagent-governance-python/agent-sre/src/agent_sre/chaos/engine.py:246โš ๏ธ Partial
A1.2 Rate limitingToken-bucket algorithm, thread-safe with threading.Lockagent-governance-python/agent-os/src/agent_os/rate_limiter.py:93-101โš ๏ธ Partial (unwired)
A1.2 ReplayReplay engine for failure reproduction and debuggingagent-governance-python/agent-sre/src/agent_sre/replay/engine.py:105โš ๏ธ Partial
A1.3 RecoverySaga compensation for automatic rollback on execution failureagent-governance-python/agent-hypervisor/src/hypervisor/security/kill_switch.pyโš ๏ธ Partial

Performance Benchmarks

These numbers are relevant to A1.1 (system capacity) and demonstrate that the governance layer does not meaningfully impact availability:

Measurementops/secp50p99
Policy evaluation (single rule)84,4890.011 ms0.037 ms
Policy evaluation (100 rules)32,0250.030 ms0.108 ms
Kernel enforcement (allow)9,6680.103 ms0.347 ms
Circuit breaker state check1,828,8450.001 ms0.001 ms
Audit entry write285,2020.002 ms0.008 ms
SLO evaluation29,4750.030 ms0.097 ms
Fault injection428,2530.001 ms0.007 ms
Concurrent throughput (1,000 agents)47,085โ€”โ€”

Source: BENCHMARKS.md. Measured with time.perf_counter(), 10,000 iterations, on a development workstation.

# A1.2 in action: SLO with Error Budget
from agent_sre import SLO, ErrorBudget
from agent_sre.slo.indicators import TaskSuccessRate, HallucinationRate

slo = SLO(
    name="production-agent",
    description="Production reliability targets",
    indicators=[
        TaskSuccessRate(target=0.95, window="24h"),
        HallucinationRate(target=0.05, window="24h"),
    ],
    error_budget=ErrorBudget(total=0.05),
)

Availability Gaps

  • Chaos engine is framework-only (A1.2): ChaosExperiment.inject_fault() records that a fault was injected but does not modify system behavior. Callers must implement actual fault injection externally.
  • RateLimiter not wired (A1.2): RateLimiter at rate_limiter.py:93-101 has a correct token-bucket algorithm but is not imported by any adapter or interceptor. BoundedSemaphore for concurrency limiting is similarly unwired.
  • No health check endpoints (A1.1): No liveness or readiness probes exposed for container orchestration.
  • No disaster recovery automation (A1.3): Replay engine is designed for debugging and failure reproduction, not automated recovery. Saga compensation in the kill switch is placeholder-only.
  • No backup/restore for audit data (A1.3): Audit backends write to JSONL files or in-memory stores with no backup, replication, or archival mechanism.
  1. Wire RateLimiter and BoundedSemaphore into BaseIntegration with blocking behavior controlled by policy flags.
  2. Implement health check endpoints for Kubernetes liveness/readiness probes.
  3. Add pluggable fault injection hooks in the chaos engine for real resilience testing.
  4. Deploy audit logs to an external append-only sink (Azure Monitor, write-once storage) for durability.
  5. Implement automated backup and retention for audit data stores.

Processing Integrity (PI1)

System processing is complete, valid, accurate, timely, and authorized.

What Exists

ControlFeatureLocationCoverage
PI1.1 Input validationPolicyEvaluator validates every action against declarative rules before executionagent-governance-python/agent-os/src/agent_os/policies/evaluator.pyโœ… Covered
PI1.1 Blocked patternsSubstring, regex, and glob pattern blocking on tool argumentsagent-governance-python/agent-os/src/agent_os/integrations/base.py:695-701โœ… Covered
PI1.1 Input sanitizationCommand injection detection, shell metacharacter blocking, base64 payload decodingagent-governance-python/agent-os/src/agent_os/prompt_injection.py:548-563โœ… Covered
PI1.2 Processing completenessSaga orchestration tracks multi-step workflows with checkpoint_frequencyagent-governance-python/agent-os/src/agent_os/integrations/base.pyโš ๏ธ Partial
PI1.3 Accuracy verificationCodeSecurityValidator โ€” AST-based validation of LLM-generated Python code (17 dangerous imports, 22+ dangerous calls, shell/SQL injection, path traversal, secrets)agent-governance-python/agent-os/src/agent_os/secure_codegen.py:179-237โš ๏ธ Partial
PI1.3 Drift detectionSequenceMatcher-based drift scoring between baseline and actual outputagent-governance-python/agent-os/src/agent_os/integrations/base.py:977-1038โš ๏ธ Partial (advisory only)
PI1.3 Accuracy SLIsToolCallAccuracy (99.9% target), TaskSuccessRate (99.5% target), HallucinationRate (5% target), CalibrationDeltaagent-governance-python/agent-sre/src/agent_sre/slo/indicators.py:133-468โœ… Covered
PI1.4 Output recordingCloudEvents v1.0 export with action, outcome, policy_decision, matched_ruleagent-governance-python/agent-mesh/src/agentmesh/governance/audit.py:90-128โœ… Covered
PI1.5 Audit chain integrityMerkleAuditChain with SHA-256 hash chaining, inclusion proofs, full chain verificationagent-governance-python/agent-mesh/src/agentmesh/governance/audit.py:23-344โœ… Covered
PI1.5 Signed audit entriesHMAC-SHA256 signatures on audit entries via AuditSink protocolagent-governance-python/agent-mesh/src/agentmesh/governance/audit_backends.py:31-87โš ๏ธ Partial
PI1.5 Flight recorderSQLite with WAL mode, Merkle chain tamper detection; captures prompt, action, verdict, resultagent-governance-python/agent-os/modules/control-plane/src/agent_control_plane/flight_recorder.py:33-79โš ๏ธ Partial
PI1.5 Delta audit engineAppend-only delta log per session with SHA-256 hashed entriesagent-governance-python/agent-hypervisor/src/hypervisor/audit/delta.py:59-110โŒ Stub
# PI1.5 in action: Merkle Audit Chain
from agentmesh.governance.audit import AuditEntry, AuditLog

log = AuditLog()
entry = AuditEntry(
    event_type="governance_decision",
    agent_did="did:agentmesh:finance-bot:abc123",
    action="transfer",
    outcome="denied",
    policy_decision="DENY",
    matched_rule="max_transfer_limit",
)
log.add_entry(entry)

# Entry gets automatic SHA-256 hash chaining
assert entry.entry_hash != ""
assert entry.previous_hash != "" or log.entries.index(entry) == 0

Processing Integrity Gaps

  • DeltaEngine chain verification is a stub (PI1.5): Resolved. verify_chain() now computes SHA-256 hashes and verifies parent linkage across entries. See delta.py:67-127.
  • FlightRecorder hash covers INSERT-time state (PI1.5): Hash is computed at insert time with policy_verdict='pending', but the verdict is later updated to 'allowed'/'blocked'. Tampering of the verdict field is undetectable by integrity verification.
  • Anomaly detections outside tamper-evident chain (PI1.5): RogueAgentDetector stores assessments in an in-memory list, not in the integrity-protected audit chain.
  • post_execute() never blocks (PI1.3): base.py:977-1038 computes drift scores and emits DRIFT_DETECTED events but always returns (True, None) โ€” advisory only, no enforcement on output integrity.
  • Python-only code validation (PI1.3): CodeSecurityValidator raises ValueError for any language other than Python at secure_codegen.py:193.
  • No output text sanitization (PI1.4): Tool argument scanning exists; LLM response text is not scanned for dangerous content, PII, or secrets.
  1. Fix DeltaEngine verify_chain() stub โ€” Done. Now performs real SHA-256 chain verification.
  2. Fix FlightRecorder hash โ€” compute hash over final state including resolved verdict, not INSERT-time state.
  3. Wire anomaly detections into the tamper-evident audit chain.
  4. Add GovernancePolicy.block_on_drift flag to enable enforcement in post_execute().
  5. Use only MerkleAuditChain (the sound implementation) for SOC 2 audit evidence until other implementations are fixed.

Confidentiality (C1)

Information designated as confidential is protected as committed or agreed.

What Exists

ControlFeatureLocationCoverage
C1.1 Confidential data identificationPII detection: SSN (\b\d{3}-\d{2}-\d{4}\b) and credit card regex patterns in tool parametersagent-governance-python/agent-os/src/agent_os/mcp_gateway.py:34-42โš ๏ธ Partial (2 patterns only)
C1.1 Secret detection5 regex patterns for API keys, passwords, tokens, AWS keys, private keys in generated code (CRITICAL severity)agent-governance-python/agent-os/src/agent_os/secure_codegen.py:346-360โš ๏ธ Partial
C1.2 Data access controlsRBAC with action-level permissions; scoped capabilities with delegation narrowing (child โ‰ค parent)agent-governance-python/agent-os/src/agent_os/integrations/rbac.py:88-92โœ… Covered
C1.2 Egress controlsDomain-level egress filtering with first-match-wins and default-denyagent-governance-python/agent-os/src/agent_os/egress_policy.py:113-139โœ… Covered
C1.2 Cryptographic identityEd25519 key pairs for agent identity; DID format did:agentmesh:{agentId}:{fingerprint}agent-governance-python/agent-mesh/src/agentmesh/trust/handshake.pyโœ… Covered
C1.2 Signed auditHMAC-SHA256 signatures on audit entries for tamper detectionagent-governance-python/agent-mesh/src/agentmesh/governance/audit_backends.py:61-87โš ๏ธ Partial
C1.2 Channel encryptionIATP (Inter-Agent Trust Protocol) provides encrypted inter-agent communication channelsagent-governance-python/agent-os/modules/iatp/โš ๏ธ Partial
C1.3 Data disposalretention_days field in policy schema (default 90, minimum 1)agent-governance-python/agent-os/src/agent_os/policies/policy_schema.json:215-218โŒ Declaration only
# C1.2 in action: Egress Policy with Default-Deny
from agent_os.egress_policy import EgressPolicy

policy = EgressPolicy(default_action="deny")
policy.add_rule("*.internal.corp.com", action="allow")
policy.add_rule("api.openai.com", action="allow")

# All other domains blocked โ€” prevents data exfiltration
assert not policy.is_allowed("evil-exfil-server.com")  # Denied
assert policy.is_allowed("api.openai.com")              # Allowed

Confidentiality Gaps

  • HMAC uses symmetric keys (C1.2): Any insider with the HMAC key can forge the entire audit chain. No external commitment (Merkle root anchoring to a timestamping service) or asymmetric signing prevents full chain rewrite.
  • No at-rest encryption (C1.1): Audit logs, policy documents, and configuration files are stored in plaintext. No encryption for data at rest.
  • No key rotation mechanism (C1.2): No mechanism for rotating Ed25519 keys, HMAC secrets, or SPIFFE certificates on a schedule.
  • Audit redaction is partial, not comprehensive (C1.1): mcp_gateway.py now redacts credential-like secrets before persisted audit storage via CredentialRedactor, but broad PII minimization remains incomplete. Built-in PII detection still covers only SSN and credit card patterns on tool inputs, so non-credential PII can still flow into logs on some paths.
  • Only 2 PII patterns (C1.1): SSN and credit card number. No email, phone, IP address, JWT token, or other sensitive data patterns.
  • retention_days not enforced (C1.3): The schema field exists but no code preserves or deletes logs based on this value. A deployer can set retention_days: 1 without validation error.
  • No TLS enforcement (C1.2): Network encryption deferred entirely to deployment configuration.
  1. Expand audit redaction beyond credentials so persisted audit payloads also minimize non-credential PII before storage.
  2. Expand PII patterns to cover the OWASP-recommended set (email, phone, IP address, JWT tokens).
  3. Implement asymmetric signing for audit entries to prevent insider forgery.
  4. Add key rotation tooling for Ed25519 and HMAC credentials.
  5. Enforce retention_days at runtime with actual log deletion and archival.
  6. Deploy audit logs to encrypted storage (e.g., Azure Blob with SSE, S3 with KMS).

Privacy (P1โ€“P8)

Personal information is collected, used, retained, disclosed, and disposed to meet the entity's objectives.

โš ๏ธ Privacy is the largest gap area. The toolkit is a runtime governance framework for AI agent actions. It was not designed as a privacy management platform. Organizations in SOC 2 scope with Privacy criteria must supplement with dedicated privacy tooling.

What Exists

ControlFeatureLocationCoverage
P1 NoticeNo privacy notice mechanismโ€”โŒ Gap
P2 Choice and consentNo consent managementโ€”โŒ Gap
P3 Collection limitationblocked_patterns can restrict sensitive data in tool arguments (regex, substring, glob)agent-governance-python/agent-os/src/agent_os/integrations/base.py:695-701โš ๏ธ Partial โ€” tool arguments only
P4 Use, retention, disposalretention_days schema field (default 90, minimum 1) โ€” declaration only, not enforced at runtimeagent-governance-python/agent-os/src/agent_os/policies/policy_schema.json:215-218โŒ Gap
P5 AccessNo data subject access request (DSAR) supportโ€”โŒ Gap
P6 Disclosure and notificationPII detection: 2 regex patterns (SSN, credit card) block matching tool parametersagent-governance-python/agent-os/src/agent_os/mcp_gateway.py:34-42โš ๏ธ Partial
P6 Egress controlsDomain-level egress filtering prevents data exfiltration to unauthorized domainsagent-governance-python/agent-os/src/agent_os/egress_policy.py:113-139โš ๏ธ Partial
P6 Leak detectionCanary token detection catches system prompt leakage in user-visible outputagent-governance-python/agent-os/src/agent_os/prompt_injection.py:595-612โš ๏ธ Partial
P7 QualityNo data quality or accuracy verification for personal dataโ€”โŒ Gap
P8 Monitoring and enforcementNo privacy-specific monitoring or enforcement mechanismsโ€”โŒ Gap

Privacy Gaps

  • No consent management (P2): No opt-in/opt-out mechanism, consent tracking, purpose limitation, or consent withdrawal support. This is a fundamental Privacy criteria requirement.
  • No data subject access requests (P5): No DSAR workflow, data export mechanism, or right-to-erasure support.
  • No data minimization (P3): No mechanism to limit data collection to what is necessary for a specific purpose. blocked_patterns is a negative control (block known-bad) rather than a positive control (allow only known-good).
  • No retention enforcement (P4): retention_days field exists in the policy schema but no code preserves or deletes data based on this value. Default is 90 days with minimum 1 โ€” there is no floor enforcement.
  • Only 2 PII patterns (P6): SSN (\b\d{3}-\d{2}-\d{4}\b) and credit card number regex in mcp_gateway.py:34-42. No detection for email addresses, phone numbers, IP addresses, physical addresses, dates of birth, or other PII categories.
  • No output PII scanning (P6): PII patterns check tool input arguments only. LLM response text is not scanned โ€” an agent can freely output personal data in its responses.
  • Audit-log PII minimization is incomplete (P6): The MCP gateway redacts credential-like secrets before persisted audit storage, but broader PII classes are not comprehensively minimized across audit paths. PII in tool arguments can still propagate into logs when it does not match the built-in credential patterns.
  • No privacy notice mechanism (P1): No feature generates or delivers privacy notices to end users interacting with governed agents.
  • No privacy impact assessment tooling (P8): No DPIA/PIA workflow or template generation.
  1. Broaden audit parameter minimization โ€” extend current credential redaction to cover a wider PII set before persistence. This remains the highest-leverage single fix.
  2. Expand PII detection from 2 patterns to the OWASP-recommended set (email, phone, IP, JWT, passport, driver's license numbers).
  3. Apply PII scanning to LLM outputs via post_execute() or a dedicated output interceptor.
  4. Deploy dedicated privacy management tooling (e.g., OneTrust, BigID, Transcend) for consent, DSAR, and data mapping.
  5. Enforce retention_days at runtime with automated log deletion.
  6. Add GovernancePolicy.data_classification metadata to categorize agents by data sensitivity.
  7. Document the scope boundary: the toolkit governs agent actions, not personal data lifecycle management.

Evidence Sources

All file paths referenced in this document, organized by package:

Agent OS (agent-governance-python/agent-os/)

FileEvidence For
src/agent_os/policies/evaluator.pyCC5.1, PI1.1 โ€” Policy evaluation engine
src/agent_os/policies/schema.py:34-115CC5.2, CC7.2 โ€” PolicyDocument, PolicyRule, PolicyAction
src/agent_os/integrations/base.py:689-1038CC5.2, CC6.1, PI1.1, PI1.3 โ€” GovernancePolicy, PolicyInterceptor, drift detection
src/agent_os/integrations/rbac.py:16-144CC6.1, C1.2 โ€” RBAC roles, permissions, YAML serialization
src/agent_os/integrations/escalation.py:48-583CC7.4 โ€” Escalation system, approval backends, quorum, fatigue detection
src/agent_os/audit_logger.py:19-136CC7.1 โ€” GovernanceAuditLogger, pluggable backends
src/agent_os/mcp_gateway.py:34-42C1.1, P6 โ€” PII pattern detection (SSN, credit card)
src/agent_os/mcp_security.py:272-741CC7.3 โ€” MCP security scanner, rug-pull detection, typosquatting
src/agent_os/prompt_injection.py:147-612CC6.8 โ€” Prompt injection detection, canary tokens, base64 decoding
src/agent_os/secure_codegen.py:179-393PI1.3, C1.1 โ€” Code security validation, secret detection
src/agent_os/supply_chain.py:72-79CC7.3 โ€” Supply chain guard
src/agent_os/egress_policy.py:113-139C1.2, P6 โ€” Egress filtering
src/agent_os/rate_limiter.py:93-101A1.2 โ€” Token-bucket rate limiting (unwired)
policies/policy_schema.json:215-218C1.3, P4 โ€” retention_days field
examples/finance-soc2/CC6.1, CC6.3, CC7.1, CC7.2, CC7.3, CC8.1 โ€” Reference SOC 2 implementation
modules/control-plane/src/agent_control_plane/flight_recorder.py:33-79PI1.5 โ€” Flight recorder (hash integrity defect)

AgentMesh (agent-governance-python/agent-mesh/)

FileEvidence For
src/agentmesh/governance/audit.py:23-512PI1.5, CC7.1 โ€” MerkleAuditChain, AuditLog, CloudEvents export
src/agentmesh/governance/audit_backends.py:31-87PI1.5, C1.2 โ€” HMAC-SHA256 signed audit entries
src/agentmesh/trust/handshake.py:158-456CC6.6 โ€” Ed25519 challenge-response handshake
src/agentmesh/core/identity/ca.py:6-44CC6.6 โ€” SPIFFE certificate authority

Agent Hypervisor (agent-governance-python/agent-hypervisor/)

FileEvidence For
src/hypervisor/models.py:46-69CC6.7 โ€” Execution rings (Ring 0โ€“3)
src/hypervisor/security/kill_switch.py:64-178CC7.4 โ€” Kill switch with saga handoff
src/hypervisor/audit/delta.py:59-127PI1.5 โ€” Delta audit engine with SHA-256 chain verification
src/hypervisor/rings/breach_detector.py:1-60CC9.1 โ€” Ring breach detection

Agent SRE (agent-governance-python/agent-sre/)

FileEvidence For
src/agent_sre/cascade/circuit_breaker.py:22-90A1.2, CC9.2 โ€” Circuit breakers
src/agent_sre/slo/indicators.py:133-468A1.2, PI1.3 โ€” SLIs (7 types), error budgets, burn rate alerts
src/agent_sre/chaos/engine.py:246A1.2 โ€” Chaos testing framework
src/agent_sre/anomaly/rogue_detector.py:276-401CC9.1 โ€” Rogue agent detection
src/agent_sre/anomaly/detector.py:123CC9.1 โ€” Anomaly detection (z-score baselines)
src/agent_sre/replay/engine.py:105A1.3 โ€” Replay engine
src/agent_sre/signing.py:18-33CC8.1 โ€” Ed25519 artifact signing
src/agent_sre/incidents/detector.pyCC7.4 โ€” Incident detection
src/agent_sre/delivery/gitops.pyCC8.1 โ€” Progressive delivery

Other

FileEvidence For
BENCHMARKS.mdA1.1 โ€” Performance benchmarks
docs/THREAT_MODEL.mdCC1.1 โ€” STRIDE threat model
.github/workflows/dependency-review.ymlCC8.1 โ€” CI security scanning
.github/workflows/codeql.ymlCC8.1 โ€” CodeQL analysis
.github/workflows/scorecard.ymlCC8.1 โ€” OpenSSF Scorecard

Gaps Summary

All gaps consolidated and rated by severity for remediation prioritization.

Critical

GapCriteriaImpactLocation
Audit-log PII minimization is incompleteC1.1, P6Credential-like secrets are redacted on the MCP gateway path, but broader PII minimization remains incomplete across audit datamcp_gateway.py, credential_redactor.py
DeltaEngine verify_chain() is a stubPI1.5Returns True always โ€” hypervisor audit trail has zero tamper evidencedelta.py:99
No consent managementP2Fundamental Privacy criteria requirement not addressedโ€”
No data subject access request supportP5Required for Privacy criteria complianceโ€”

Resolved (formerly Critical/High)

GapCriteriaResolution
DeltaEngine verify_chain() stubPI1.5Now performs SHA-256 chain verification (delta.py:67-127)
Kill switch placeholderCC7.4Now implements saga handoff with handoff_success_count tracking (kill_switch.py:69-178)
Audit logs store unredacted parametersC1.1Credential-like secrets now redacted via CredentialRedactor before audit persistence

High

GapCriteriaImpactLocation
Detection modules unwiredCC6.86 detection modules exist but none are integrated into enforcement lifecyclebase.py (multiple)
FlightRecorder hash gapPI1.5Hash covers INSERT-time state, not final verdict โ€” tampering undetectableflight_recorder.py
HMAC symmetric key riskC1.2Insider with the key can forge the entire audit chainaudit_backends.py:61-87
retention_days not enforcedC1.3, P4Schema field exists but no runtime enforcement; default 90, minimum 1policy_schema.json:215-218
Only 2 PII patternsC1.1, P6Only SSN and credit card detected; no email, phone, IP, or other PIImcp_gateway.py:34-42

Medium

GapCriteriaImpactLocation
Chaos engine framework-onlyA1.2Records faults but does not inject them; callers must implement injectionengine.py:246
RateLimiter not wiredA1.2Correct algorithm exists but not imported by any adapterrate_limiter.py:93-101
No health check endpointsA1.1No liveness/readiness probes for container orchestrationโ€”
post_execute() never blocksPI1.3Drift detection emits events but always returns (True, None)base.py:977-1038
Python-only code validationPI1.3CodeSecurityValidator raises ValueError for non-Python languagessecure_codegen.py:193
Regex-only prompt injectionCC6.8No semantic or multilingual detection; English-only patternsprompt_injection.py
No at-rest encryptionC1.1Audit logs and policy documents stored in plaintextโ€”
No key rotationC1.2No mechanism for rotating Ed25519 or HMAC credentialsโ€”
No privacy notice mechanismP1No feature delivers privacy notices to end usersโ€”
No data minimizationP3No positive control for limiting data collection to purposeโ€”
Organizational controlsCC1โ€“CC4Board oversight, personnel policies, risk governance are deployer obligationsโ€”

Alignment with Other Compliance Mappings

FrameworkDocumentOverlap with SOC 2
OWASP Agentic Top 10 (2026)docs/OWASP-COMPLIANCE.mdCC6.8 (malicious software), CC7.3 (vulnerability management), CC9.1 (risk mitigation)
OWASP LLM Top 10 (2025)docs/compliance/owasp-llm-top10-mapping.mdCC6.8 (LLM01, LLM07), C1.1 (LLM06), PI1.3 (LLM02, LLM09)
EU AI Act (2024/1689)docs/compliance/eu-ai-act-checklist.mdCC7.1 (Art. 12 logging), CC7.4 (Art. 14 human oversight), PI1.5 (Art. 12 record-keeping)
NIST AI RMFdocs/compliance/nist-ai-rmf-alignment.mdCC9.1 (Govern/Map functions), A1.2 (Measure function)

Last updated: April 2026 ยท Toolkit version: v2.3.0

โฌ… Back to README ยท OWASP Agentic Mapping ยท EU AI Act Checklist