v3/@claude-flow/guidance/docs/adrs/ADR-G012-manifest-validator.md
Status: Accepted Date: 2026-02-01 Author: Guidance Control Plane Team
The Agentic Container System Specification (v0.1) defines Agent Cell Manifests that declare an agent's identity, budgets, data policy, tool policy, memory policy, and observability requirements. Without a validator, malformed or over-privileged manifests can enter the system and create security gaps.
Implement ManifestValidator with fails-closed admission control:
| Check | Error Code | Severity |
|---|---|---|
| Missing apiVersion | MISSING_FIELD | Reject |
| Unsupported API version | UNSUPPORTED_API_VERSION | Reject |
| Missing cell name/purpose/codeRef | MISSING_FIELD | Reject |
| Invalid SHA-256 digest format | INVALID_DIGEST | Reject |
| Negative budget values | BUDGET_NEGATIVE | Reject |
| Budget exceeding maximum limits | BUDGET_EXCEED | Reject |
| Wildcard in network allowlist | WILDCARD_NETWORK | Reject (unless privileged) |
| Invalid data sensitivity enum | INVALID_ENUM | Reject |
| Region conflict (allowed intersects blocked) | REGION_CONFLICT | Reject |
| Missing memory namespace | MISSING_FIELD | Reject |
Three axes compose the risk score (0-100):
| Axis | Weight | Factors |
|---|---|---|
| Tool risk | High | Bash, Task, network wildcards, write confirmation disabled |
| Data sensitivity | Medium | PII allowed, restricted data, long retention |
| Privilege surface | Medium | Global memory scope, overwrite mode, gates disabled |
Risk score determines execution lane:
| Condition | Lane |
|---|---|
portabilityRequired | wasm (forced) |
Risk exceeds maxRiskScore | wasm (forced) |
| Risk >= 70 | wasm |
| Risk >= 40 with native preference | sandboxed (downgrade) |
| Low risk | Respect preferredLane |
| Risk | Decision |
|---|---|
| Below admit threshold (default 30) | admit |
| Between thresholds | review (human approval required) |
| Above reject threshold (default 70) or any validation error | reject |
ConformanceSuite validates system behavior against golden traces — recorded sequences of events with expected gate decisions. Ships with 5 default traces covering destructive commands, secrets, budget exceedance, memory without evidence, and valid operations.