← Model losses

Head-to-head comparison

openai / gpt-6-sol / low / low effort preferred over claude-code-cli / claude-sonnet-5-5 / medium / medium effort · close win.

Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.

Reviewed public evidence

Task goal

Review the supplied native and Python private-capture implementations and owner/direct invocation contracts for confidentiality and evidence integrity. Trace the concrete input/output surfaces, credential-field exclusions, file permissions, immutable naming, failure retention, request binding, and reconnect/reconciliation behavior. Examine plausible credential leakage, path or symlink substitution, oversized/truncated envelopes and stale owner-process capture configuration against the actual code. Report only actionable findings with severity, exact packet file/line evidence, realistic trigger and smallest remediation. Separately list acceptance gaps that are not demonstrated defects. Do not inspect credentials/profiles, invoke tools, change files, run tests, or publish private contents.

openai / gpt-6-sol / low / low effort answer

## Actionable findings

1. **High — Credential exclusion is bypassable by ordinary receipt fields.** Both sanitizers redact selected *keys*, but preserve arbitrary strings and keys such as `token` when the value is not a string. Python also indexes `text`, `output`, and `error` into `observedEvidence`; native stores the sanitized receipt wholesale. A credential echoed in model output, an error, or a nested non-string token therefore enters private capture. Trigger: a tool or provider error includes an authorization value in free text. **Smallest remediation:** exclude known credential-bearing output/error fields from capture, or apply a bounded credential-value scrub before persistence; document that arbitrary free text cannot be guaranteed secret-free. Evidence: `security.packet.md:8-16,91-100,159-172,183-198`.

2. **Medium — Python capture directory can be substituted through an ancestor symlink or a concurrent rename.** `_store` checks only whether the final directory is a symlink, then resolves it and later performs path-based create/link/open operations. An attacker able to alter an ancestor or the directory concurrently can redirect private evidence to another location; the permission check does not bind subsequent operations to the checked inode. **Smallest remediation:** open and validate the directory through directory file descriptors with `O_NOFOLLOW`, then perform create/link/readback relative to that descriptor; reject symlinked ancestors if required by policy. Evidence: `security.packet.md:107-150`.

3. **Medium — Oversized transport envelopes retain only a digest, not the response needed for reconciliation.** Above 2 MB, `rawEnvelope` becomes `None`; an unsupported envelope then raises, potentially after an uncertain submit. The digest cannot recover a request/run ID absent from the decoded output. **Smallest remediation:** retain a bounded, credential-scrubbed identity/admission projection from oversized envelopes, and report explicitly when identity cannot be extracted. Evidence: `security.packet.md:181-211,443-466`.

## Acceptance gaps, not demonstrated defects

- The already-running owner MCP process has stale environment/schema; automatic Python capture through it is unverified. Env-scoped bridge and native terminal readback are reported verified, but owner-process capture completeness is not. `security.packet.md:235,484`.
- The packet does not establish who can modify the configured capture directory or its ancestors, or the native storage authority’s filesystem/symlink behavior; exploitability of path substitution and native storage isolation depends on those controls.
- Native terminal storage uses a request-ID-plus-digest key and readback comparison, while Python uses a content-digest filename, hard-link creation, restrictive modes, and readback. These support immutable naming but do not by themselves prove protection against an attacker with write access to the storage authority. `security.packet.md:25-40,107-151`.
- Direct RPC binds repeated request IDs to an input hash, fences uncertain admissions, and reconciles receipts without relaunching workers. The packet does not demonstrate eventual reconciliation when event subscription stops and nobody calls `advance`; that is an availability/acceptance gap, not evidence of replay. `security.packet.md:273-300,307-355,387-429`.

**Next action:** harden free-text capture policy and descriptor-relative directory handling first; then test oversized uncertain-submit reconciliation and fresh-owner-process capture.

claude-code-cli / claude-sonnet-5-5 / medium / medium effort answer

# Evidence packet: private-capture confidentiality and integrity review

Direct analysis of `security.packet.md` only. No team lanes, tools or file writes. Line numbers are packet lines. `validateInput`, `OpenCodeClient`, the storage backend and the Mission Control MCP schema are not in the packet and are treated as uncertain.

## 1. Actionable findings

**F1 – Medium: credential exclusion is an exact-match key denylist.**
- Evidence: native 3-4, 8-9; Python 18-20, 26-29. Keys are normalized, then matched exactly against a fixed set.
- The match misses `x-api-key` (→ `xapikey`), `authToken`, `idToken`, `sessionToken`, `secret`, `privateKey`, `accessKey`, `bearer`, and env-style names such as `OPENAI_API_KEY`.
- `token` is withheld only when its value is a string. Free-text values are never scanned, which the code acknowledges at Python 24.
- Trigger: a receipt, input or tool result carries `{"env":{"OPENAI_API_KEY":"…"}}` or `{"authToken":"…"}`. It is written to disk, and Python labels the envelope `exact`/`structured-credentials-withheld` (139-141), which gives false assurance.
- Fix: match on a normalized substring or regex (`secret|token|password|passwd|apikey|authorization|cookie|credential|privatekey|bearer|accesskey`). Explicitly allow counters such as `tokens`, `inputTokens` and `maxTokens`. Share one list between native and Python and test them with the same fixtures.

**F2 – Medium: native receipt stores raw input as `privateTaskContext`, unsanitized.**
- Evidence: native RPC 302 stores `privateTaskContext: input`, and `transition` persists it (240-241). `inspect` returns the receipt (346). Only the terminal snapshot (native 15) and Python (116) apply `privateEvidence`.
- Trigger: `privateCapture` is on and the submit input carries credential-like fields. They sit in the general request-key storage outside the 0700/0600 capture domain, and the sanitizer guards only the later snapshot copy.
- Whether `validateInput` rejects such fields is outside the packet.
- Fix: store `privateEvidence(input)` or only `inputHash`. The raw input is not needed for reconciliation.

**F3 – Medium: post-admission capture can throw and mask the native result.**
- Evidence: Python 116-119 (`[REDACTED: private constant]`, `.get` on payload/output) and the `record` build with `evidence_index` (120-130) sit outside the `try` that starts at 131.
- Trigger: the final `capture_[REDACTED: private constant](method, payload, output)` at 222 runs after the native call has succeeded. Deeply nested output hits `RecursionError` in the unbounded `[REDACTED: private constant]` recursion (the depth guard exists only in `evidence_index`). A non-dict payload raises `AttributeError` at 118. The exception propagates out of `_direct_rpc`, so the caller loses `runID` and state for an already-admitted submit and may replay it.
- The response-envelope capture at 215 may preserve the data, but the caller cannot see it.
- Fix: move lines 116-130 inside the `try`. Add a depth bound to `[REDACTED: private constant]`. Wrap the 222 and 218 calls so a capture failure returns `capture-failed` status and never replaces the native output.

**F4 – Low/Medium: no request/run binding check.**
- Evidence: Python 118-119 prefers `output.requestID` over `payload.requestID`. `_direct_rpc` (216-223) never compares the two. `nativeBattleID` can also come from caller-supplied `payload.runID`.
- Trigger: a stale, misrouted or replayed reply is filed under the reply's ID and returned as the answer to this request.
- Fix: if both IDs are present and differ, record both with `bindingMismatch: true`, set `reconciliationRequired`, and raise `BridgeError`.

**F5 – Low: retries are indistinguishable.**
- Evidence: Python records contain no time, attempt or sequence (120-130), and the filename is the content digest (53-54, 54).
- Trigger: two identical `submit-before` or `-response` captures from a replayed or uncertain submit collapse into one file. The retry count cannot be proven, which matters for the no-replay fence.
- The docstring says "each native battle ID groups snapshots", but the layout is flat digest names with no requestID or run prefix, so lookup requires scanning contents.
- Fix: add an attempt nonce and monotonic time to the record (the digest changes accordingly), or write a per-request sidecar index.

**F6 – Low: oversize and truncation behavior loses evidence.**
- Evidence: Python 51-52 raises when the record exceeds 8 MB, and the failure record is identity-only (152-155). The raw envelope is digest-only above 2 MB (139-140). The digest covers the sanitized form (135-137).
- The "exact" coverage label means exact parsed JSON, not wire bytes. A truncated or non-JSON body raises in `client.request` (209-212), leaving only the exception class name.
- Trigger: a large `needs-collection` or terminal output. The Python side keeps nothing. Native holds the receipt, but the F6 gap is that the bridge capture is then silently weaker.
- Native 27 behaves the same way: identity-only failure above 8 MB.
- Fix: spill oversized content to a separate digest-named file, or record the wire byte length and HTTP status at the client layer. Rename the label to `parsed-json-exact`.

**F7 – Low: directory and file hardening gaps.**
- Evidence: Python 41-49, 55-68, 157-159.
- Only the final path component is checked for symlinks. There is no `st_uid == geteuid()` check, and `mkdir(parents=True)` creates intermediate directories with umask defaults.
- A relative `OPENCODE2_[REDACTED: private constant]` resolves against the bridge's cwd.
- `os.link` fails on filesystems without hardlinks (exFAT/SMB under `/Volumes`), so every capture there becomes a failure. A pre-existing 0755 fallback directory makes the failure log fail with `logged=False`.
- Files are 0600, not read-only, so immutability is by naming and write-time readback only.
- Same-user path substitution is mostly mitigated: `O_NOFOLLOW` at 68 and 78, and a planted destination symlink makes `os.link` raise `FileExistsError`, which falls through to the NOFOLLOW open. The residual risk is a same-user adversary.
- Fix: require an absolute path, check the owner, and fall back to `O_CREAT|O_EXCL` when `link` is unsupported. Optionally set 0400 after the write.

**F8 – Low: reconnect/reconciliation load and ordering.**
- Evidence: native 406-408, 431-433, 242-243.
- Every `server.connected` and every execution event rescans all requests. For each terminal one it re-serializes, hashes and reads back up to 8 MB, outside `exclusively`.
- In `transition`, snapshot capture is awaited before waiters are woken and the event is emitted, so slow storage delays completion signals.
- Fix: skip requests already verified (an in-memory digest set), and run capture after `wake()`/`emit`.

## 2. Acceptance gaps (not demonstrated defects)

- **Stale owner process.**
  - Python reads the env on each call (113), so a stale owner MCP process silently returns `{'state':'disabled'}` inside `privateCapture`, with no hard failure.
  - The native `options.privateCapture` flag is independent of the Python env, so the two sides can disagree.
  - Original `team_moa` and direct Codex writer flows do not call the helper. No automatic capture completeness is claimed or shown.
- **Native admission states have no private snapshot.** Only `completed` and `terminal-incomplete` are captured (native 21). `admission-uncertain` and `admission-rejected`, the most reconciliation-critical states, are covered only by the mutable receipt plus Python's `-response` captures.
- **Native failure records are write-only.** `direct-private/v1/failure/*` records are never cleared or surfaced by `readTerminalCapture` (43-57). A later success leaves the stale `reconciliationRequired` record in place.
- **No tamper evidence beyond the same trust domain.** The native snapshot and the receipt share one storage. The digest is anchored externally only if the Python capture of an `inspect` response includes `privateTerminalCapture`.
- **`reconciliationRequired` is false for non-terminal `running` and `needs-collection`** on the final method capture (Python 146-148). This is only a labeling gap.
- **Unverified items.** `validateInput` field filtering, the `client.request` size and timeout behavior, and the storage `set` overwrite semantics are outside the packet.

## 3. Discarded hypotheses and likely false positives

- A symlinked final directory or destination is handled by the `is_symlink` check and `O_NOFOLLOW`.
- A leftover temp file is cleaned by the `finally` at 66-67. After a crash it is a 0600 file only.
- The native get-then-set race is benign because the key is content-addressed. A differing existing value triggers a readback failure and is not overwritten.
- Exception messages are intentionally not logged (151).
- `headers` is withheld at all nesting depths in both implementations.
- Returning the unsanitized native `output` to the caller is consistent with existing behavior and is not a new leak.

## 4. Next action

Fix F1-F3 first. They are small and local: a shared sanitizer test with credential-name fixtures, `try` scope and depth bounding in `capture()`, and sanitizing `privateTaskContext`. Then add the F4 binding check and the F5 attempt nonce. Verify the stale-owner and oversized-envelope gaps with targeted tests on the owner MCP restart path.

MATERIAL_EVIDENCE_CONFLICT: none. The only tension is the docstring claim at Python 110, "each native battle ID groups immutable snapshots", against the flat digest-only layout at Python 54, which is covered in F5.

Primary judge's stated reason

Forced, weak preference for A: its more restrained separation of assurance gaps and directly usable packet references slightly better serves an actionable security review. This is not an established material quality difference; B's exception-boundary finding could reasonably lead an independent reviewer to prefer B.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: 363476d6-e8c0-4ffc-9edf-97ef2eef4154. Pair: brp1_2adab8380c2cb6b8345b055aed07c772d06ca763b3937f03b224f9a79ebd744e. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.