← Model losses

Head-to-head comparison

openai / gpt-6-sol / low / low effort preferred over nvidia / moonshotai/kimi-k3 / low / low 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.

nvidia / moonshotai/kimi-k3 / low / low effort answer

## Evidence Packet — Direct review of security.packet.md (sha256:ef3d51…)

### Task-relevant findings (actionable)

**F1 — Medium: Credential-key exclusion is evadable by unlisted key names (both implementations, same defect class).**
- Evidence: `native/private-capture.js` packet lines 3–14 (set `secretKeys` + exact-match `token` condition); `bridge/[REDACTED: private constant].py` packet lines 18–29 (identical logic).
- Concrete issue: keys are normalized (`[^a-z0-9]` stripped / `isalnum`) and matched against a fixed set. Common credential carriers not in the set pass through verbatim into the immutable 0600 capture: e.g. `authToken` → `authtoken`, `bearer`, `jwt`, `secret`, `sessionKey`, `privateKey`, `passphrase`, `sshKey`, `signingKey`, `awsSecretAccessKey`. The special-case only fires when the key is exactly `token` and the value is a string (JS line 8; Python line 28), so `auth_token: "ghp_…"` is stored in cleartext in `input`/`nativeReceipt`/`rawEnvelope` evidence (Python lines 124–140).
- Realistic trigger: any native receipt, transport envelope header map, or engine output that surfaces a token under a non-enumerated key name (both `capture()` call sites in `_direct_rpc`, packet lines 207–222, pass the full payload and raw envelope).
- Smallest remediation: extend the normalized set and add a suffix heuristic (`endsWith('token')`, `endsWith('secret')`, `endsWith('key')` for string values), keeping the two implementations in parity; add a regression case per new key.

**F2 — Medium: `_store` never verifies ownership (st_uid) of the capture directory or the committed file.**
- Evidence: `bridge/[REDACTED: private constant].py` packet lines 40–49 (symlink check on the directory itself, resolve, repo check, mode check — no `st_uid` comparison), lines 55–67 (link + unlink), lines 68–77 (O_NOFOLLOW re-open and readback, no fstat owner check).
- Concrete issue: mode `0o700` checks permissions but not owner. If `OPENCODE2_[REDACTED: private constant]` (line 113) or `OPENCODE2_CAPTURE_FAILURE_DIR` (line 157) resolves — via misconfiguration, a symlinked ancestor (only the leaf is checked for symlink at line 41), or a shared host — to a directory owned/controlled by another principal, that principal controls the namespace: it can pre-place `digest.json`, or unlink/replace the destination after the readback closes (line 77) and before any later consumer re-opens by the returned digest. Content is still 0600 owned by the writer, so this is primarily an integrity/substitution and namespace-confusion issue rather than direct disclosure.
- Smallest remediation: after `directory.stat()` (line 48), require `st_uid == os.getuid()`; after `os.fstat(fd)` (line 70), require the file's `st_uid == os.getuid()`. Fail closed.

**F3 — Low: native `captureTerminalSnapshot` can reject after the durable receipt commit and can abort the whole reconcile page.**
- Evidence: JS packet lines 20–26 — `terminalEvidence`/`privateEvidence` and `JSON.stringify` run *before* the `try` at line 26; `privateEvidence` recurses without a depth bound (lines 6–15). Call sites: bridge line 242 (`transition` awaits capture after `storage.set` committed the receipt/version bump, line 241) and line 408 (`reconcile` awaits `captureTerminalSnapshot` with no `.catch`, unlike the adjacent line 412).
- Realistic trigger: a pathological receipt object (very deep nesting, cyclic via any non-plain value) — thrown error rejects `transition` (submit/inspect/advance then surface an RPC error after the durable state was already committed; the caller sees failure although, e.g., state advanced) or terminates `reconcile()` mid-page, silently skipping `captureTerminalSnapshot`/`advance` for every later receipt in that scan page until the next event.
- Smallest remediation: wrap the capture body (including `terminalEvidence`) in the existing try, and add `.catch(() => {})` at line 408 to match line 412.

**F4 — Low: native readback verification depends on durable storage preserving JSON member order.**
- Evidence: JS packet lines 30, 46–52 — verification is `JSON.stringify(await storage.get(key)) === serialized` against a string built from a fresh object. Any normalization that reorders keys (documented at bridge lines 236–240 that storage normalizes values) yields `missing-or-mismatched` and `reconciliationRequired: true`. This is fail-closed (no confidentiality or integrity loss), but produces false reconciliation alarms and makes `captured-readback-verified` unreliable across storage implementations.
- Smallest remediation: canonicalize (stable stringify) on write and compare digests of canonical form on read.

### Alternatives / discarded hypotheses (likely false positives)
- **Symlink substitution at destination:** adequately handled — `os.link` + `FileExistsError` pass (lines 63–65) plus `O_NOFOLLOW` re-open and exact readback (lines 68–75) fail closed. Not a defect.
- **Oversized envelopes truncated mid-write:** not present — bytes are fully serialized, size-checked before write (Python lines 50–52, 135–140; JS line 27), and failures produce identity-only failure records. Digest-only-over-limit coverage retains the hash (line 139).
- **Free-text credentials in questions/taskContext:** intentionally captured (`[REDACTED: private constant]` docstring, Python line 24; `privateTaskContext: input`, bridge line 302). Design choice, not enumerated-key bypass — treated as acceptance gap, not defect.
- **Credential values in Python failure path:** correctly limited to `errorClass` only (line 154); no leakage there. `projectDirectory` in records is by design.
- **Reconnect/observation gap:** subscription is started before cold reconcile (bridge lines 416–435, comment lines 421–423), and explicit `advance` is a safe idempotent recovery (lines 354–361). No defect.
- **Request-ID rebinding:** `existing.inputHash !== hash` throws (bridge lines 292–295); follow-ups require completed prior runs (line 299). Sound within shown code.

### Missing evidence / dependencies (uncertainties)
- `validID`, `ownedRoot`, `validateInput`, and `KEY` are referenced (bridge lines 248, 276, 297, 300) but not in the packet — ID validation strength and root-ownership derivation cannot be verified.
- The native `storage.get/set/scan` authority semantics (atomicity, key-order preservation, access control on `direct-private/v1/*` keys) are unknown; F4 severity depends on them.
- `ctx.rpc.register`/`directRpcDefinition` authorization scope is not shown — who may invoke submit/inspect is unverifiable.
- Whether `options.privateCapture` env/config can be toggled at runtime between capture and readback (stale owner-process configuration) cannot be determined from the packet.

### Acceptance gaps (not demonstrated defects)
- Automatic capture in the already-running original Codex MCP owner process is explicitly unverified (packet lines 235, 484); original team_moa/direct Codex flows do not use the Python helper.
- No demonstrated test that the extended key-exclusion set (F1) is exercised end-to-end.
- Directory-ownership attack (F2) and reconcile-abort path (F3) are unexercised; no negative tests shown.
- Digest-only oversized raw-envelope path (Python line 139) is implemented but untested per packet.
- No retention/deletion/rotation policy for `direct-private/v1/terminal/*`, failure records, or `*.json` digest files is shown.
- Stale environment in long-lived owner processes after `OPENCODE2_[REDACTED: private constant]` changes is acknowledged but not covered.

### Next useful action
Patch the shared credential-key normalization (both files, keep parity), add `st_uid` checks in `_store`, and add negative tests: unlisted-token-key receipt, foreign-owned capture directory, and oversized envelope.

No conflicting observations within the packet; review was direct (single-lane evidence analysis), no tools invoked, no files changed.

Primary judge's stated reason

A receives a slight forced preference because its directory-race explanation and corresponding remediation give a more directly usable response to an expressly requested substitution threat, with accurate packet-coordinate citations. This is not an established material quality gap: B's stronger treatment of intentional free-text retention is substantial counterevidence, and an independent review could reasonably reject the preference.

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_474af60cde383be9566b7372583850604ddd908b4a966e2e621aaf21308afc84. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.