# EVOLUTION7_SECURITY_INVARIANTS.md

Executable invariants P341–P360 (`cain/action_commit/properties7.py`). Result on this checkout:
**20/20 PASS**. These are executable invariants, **NOT a formal proof**.

| ID | Invariant | Result |
|---|---|---|
| P341 | No protected action executes without a valid authorization | PASS |
| P342 | Authorization is bound to the exact canonical action + target | PASS |
| P343 | Mutation of a protected action invalidates its authorization | PASS |
| P344 | Revoked or expired authority cannot be reused | PASS |
| P345 | Replay of a single-use authorization is refused | PASS |
| P346 | Approval scope cannot exceed / transfer to another action | PASS |
| P347 | Delegation cannot increase authority | PASS |
| P348 | A child cannot exceed its parent's effective capability constraints | PASS |
| P349 | Consensus cannot transform a denial into permission | PASS |
| P350 | Attestation alone cannot authorize an action | PASS |
| P351 | Missing mandatory evidence cannot produce a verified result | PASS |
| P352 | Policy rollback / weak default is detected (no silent privilege restore) | PASS |
| P353 | Cross-tenant actions are rejected unless explicitly authorized | PASS |
| P354 | Evidence alteration is detectable (hash chain) | PASS |
| P355 | Duplicate execution is reconciled explicitly | PASS |
| P356 | Required enforcement failures halt protected execution | PASS |
| P357 | A direct-backend bypass is not described as blocked unless controlled | PASS |
| P358 | A clean-room verifier does not trust CAIN's own claims | PASS |
| P359 | Canonicalization fails closed on ambiguous inputs | PASS |
| P360 | Strict parse rejects duplicate keys and non-finite numbers | PASS |

## Adversarial + mutation summary

- Action-lifecycle lab: **100000/100000** attacks safely refused (`unsafe_outcomes=0`).
- Mutations: **32/32** killed (`surviving=[]`).
- Real experiment: effect_verified=True,
  enforcement_proved=True.

## Residual gaps (do not overclaim)
- The MCP proxy is the only enforcement adapter; other backends are observers.
- Policy semantics are not recursive and are not proven correct against an environment contract.
- Attestation-based environment requirements are not live-verified (no TEE on this host).
