# STRUCTURED ADVERSARIAL FINDINGS & RED-TEAM LOG
## Project Sovereign — CAIN-42 × TALOS × IHVRK
### Evolution 6: Operation Absolute Sovereign

**Review Date:** 2026-10-12  
**Lead Auditor:** Independent Security & Formal Methods Lead  
**Scope:** CAIN-42 JIT Decision Engine, TALOS Verify Kernel, Worker Sandbox, IHVRK Evidence Pipeline.

---

### Finding Summary

| Finding ID | Title | Severity | Status | Regression Test |
|---|---|---|---|---|
| `SOV-E6-FIND-01` | In-Process Gateway Tool Execution Memory Exposure | **HIGH** | **REMEDIATED** | `test_37_ungoverned_python_tool_execution_blocked`, `test_38` |
| `SOV-E6-FIND-02` | Unhandled Storage Exception During Key Revocation Lookup | **MEDIUM** | **REMEDIATED** | `test_mutation_8_ledger_failure_defaults_to_approval_detected` |
| `SOV-E6-FIND-03` | Silent Overwriting of Duplicate JSON Keys in Deserialization | **LOW** | **REMEDIATED** | `test_07_duplicate_json_keys_rejected_by_canonicalizer` |
| `SOV-E6-FIND-04` | Absent Remote Git Repository Blocks Hosted CI Execution | **HIGH** | **BLOCKED (Release Blocker)** | `test_56_hosted_ci_blocked_when_remote_absent` |
| `SOV-E6-FIND-05` | Live Customer Traffic Routing Not Proven on MCPGate Appliance | **HIGH** | **BLOCKED (Release Blocker)** | Production Gate Check |

---

### Detailed Findings

#### SOV-E6-FIND-01: In-Process Gateway Tool Execution Memory Exposure
- **Severity:** HIGH (CVSS 7.8)
- **Preconditions:** Agent or user requests execution of an untrusted Python function or tool.
- **Vulnerability:** Prior to Evolution 6, Python tool functions and in-process gateway helpers ran within the memory space of the gateway daemon process, risking memory inspection, database fd hijacking, or privilege escalation.
- **Remediation:** Created `TalosWorkerBoundary` and `TalosGovernedPythonRunner` in `cain/talos/talos_worker.py`. All untrusted tool execution is dispatched to a disposable child process with Landlock ABI 8, `PR_SET_NO_NEW_PRIVS`, `close_fds=True`, and sterile environment sanitization.
- **Verification:** Tested in `tests/sovereign/evolution_06/test_evolution_6_adversarial.py` (Tests 26-38).

#### SOV-E6-FIND-02: Unhandled Storage Exception During Key Revocation Lookup
- **Severity:** MEDIUM (CVSS 5.3)
- **Preconditions:** SQLite database corruption, lock timeout, or storage disconnection during authorization evaluation.
- **Vulnerability:** Unhandled exceptions in `self.ledger.is_key_revoked()` caused unhandled error cascades instead of clean fail-closed verdicts.
- **Remediation:** Wrapped all ledger lookups in `try...except Exception:` blocks in `TalosVerifyKernel.verify_authorization()`, failing closed immediately to `INDETERMINATE`.
- **Verification:** Verified by mutation test `test_mutation_8` in `verification/sovereign/test_e6_talos_mutations.py`.

#### SOV-E6-FIND-03: Silent Overwriting of Duplicate JSON Keys in Deserialization
- **Severity:** LOW (CVSS 3.1)
- **Preconditions:** Attacker submits crafted JSON payload with duplicate keys (e.g. `{"action": "read", "action": "write"}`).
- **Vulnerability:** Standard Python `json.loads` silently keeps the last key, allowing potential semantic ambiguity between what a human saw and what the parser decoded.
- **Remediation:** Enforced strict duplicate key rejection hook `reject_duplicates` in RFC 8785 canonical validation.
- **Verification:** Verified by `test_07_duplicate_json_keys_rejected_by_canonicalizer`.

#### SOV-E6-FIND-04: Absent Remote Git Repository Blocks Hosted CI Execution
- **Severity:** HIGH (Release Blocker)
- **Preconditions:** Production release candidate qualification.
- **Finding:** `git remote -v` in the checkout returns empty stdout. No remote repository exists to trigger hosted CI runners.
- **Remediation:** Documented exact operator instructions for attaching remote origin and workflow dispatch. Production release gate remains strictly `BLOCKED`.

#### SOV-E6-FIND-05: Live Customer Traffic Routing Not Proven on MCPGate Appliance
- **Severity:** HIGH (Release Blocker)
- **Preconditions:** Production release candidate qualification.
- **Finding:** No cryptographically signed evidence demonstrates that 100% of live production customer requests traverse the MCPGate / TALOS boundary before reaching downstream tool servers.
- **Remediation:** Production release gate remains strictly `BLOCKED` until live traffic traversal evidence bundles are recorded.
