← Model losses

Head-to-head comparison

openai / gpt-6-luna / 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-luna / low / low effort answer

## Actionable findings

**Medium — Credential-shaped strings in free text are not redacted.**  
The native and Python filters redact selected structured field names, but leave string values untouched (`security.packet.md:8–15`, `86–100`). The Python capture stores task input, native receipt, transport failure, and—when within limit—the sanitized raw envelope (`:184–198`, `:200–211`). A credential included in a question, output, error, or another unrecognized field can therefore be retained in the private capture. The code describes free text as private evidence, so this is a confidentiality risk if callers can supply secrets there. **Smallest remediation:** warn callers not to include credentials and/or add a narrowly scoped detector/redaction policy for credential-shaped free-text values before persistence.

**Medium — Python capture directory has a symlink/TOCTOU substitution window.**  
`_store` checks `directory.is_symlink()` before resolving, then performs later path-based operations (`:107–117`). An attacker able to modify the directory’s parent between that check and use could substitute the resolved path or a component; the final `O_NOFOLLOW` checks protect only the final opened component, not the full path (`:123–147`). **Trigger:** concurrent filesystem access by an actor with write permission to a path component. **Smallest remediation:** anchor operations to a trusted directory file descriptor and use descriptor-relative, no-follow operations; ensure parent components are trusted.

**Low — Oversized raw envelopes lose their content digest.**  
For raw envelopes over 2 MB, the capture records a digest of the entire serialized envelope but sets `rawEnvelope` to `None` and labels coverage `digest-only-over-limit` (`:200–210`). This avoids storing an oversized payload, but does not bound serialization work or memory before the size check, and the digest alone cannot recover or inspect the omitted evidence. **Smallest remediation:** enforce a bounded serialization/input size before materializing the complete canonical JSON, and explicitly treat over-limit envelopes as incomplete evidence requiring reconciliation. The existing response path does mark response captures for reconciliation (`:212–217`).

## Not demonstrated defects / acceptance gaps

- **Credential-field coverage is not complete by proof.** The explicit key list omits plausible aliases such as `secret`, `bearer`, and provider-specific names (`:8–14`, `:86–100`). Whether those occur in these receipts is not shown; do not treat their presence as established.
- **Native capture’s size and failure behavior are unclear.** It bounds serialized terminal evidence at 8 MB and attempts identity-only failure retention, but storage permissions, atomicity, and enforcement are delegated to the native storage authority (`:24–43`). No defect is established from this packet.
- **Owner-process integration is unverified.** The packet explicitly says the already-running original Codex MCP process has stale environment/schema and automatic Python capture there is unverified (`:235`, `:484`). This is a capture-completeness gap, not evidence of credential leakage.
- **Request binding and reconnect behavior have positive evidence.** Requests are bound by `inputHash`; reuse with a different payload is rejected (`:308–310`). Uncertain submissions are not automatically retried; inspect/reconciliation uses durable receipts, ownership/session checks, and exact run matching (`:275–304`, `:305–306`). Reconnect subscribes before reconciliation and provides explicit advance recovery without relaunch (`:387–429`). No replay defect is demonstrated.
- **Immutable naming and failure retention are evidenced, with limits.** Python snapshots use content-hash filenames, exclusive hard-link creation, restrictive file modes, and readback verification (`:121–151`); native snapshots include the digest in the key and verify readback (`:27–35`). Python capture failures retain identity-only metadata when fallback storage succeeds (`:218–232`); native failure evidence is best-effort (`:36–43`). Fallback availability and native storage guarantees are not independently demonstrated.
- **Transport surfaces are limited but include private data.** The bridge sends authenticated loopback RPC and captures pre-request input, response envelope, and decoded output (`:443–467`). The packet asserts no auth/provider changes (`:235`), but does not show the transport implementation or prove the security properties of the authenticated loopback client.

**Next useful action:** validate the free-text credential policy and harden path operations; separately verify capture behavior in a fresh owner process and establish the native storage authority’s permission/atomicity guarantees.

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

Forced, weak preference for B: its descriptor-relative remediation better addresses a concretely conditional substitution risk, and its packet-coordinate citations are more directly usable. This is not an established material quality difference; B's misclassified free-text concern and incorrect digest heading substantially limit the preference, which an independent review could reject.

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