openai / gpt-6-sol / low / low effort preferred over xai / grok-4.7-efficient / 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.
xai / grok-4.7-efficient / medium / medium effort answer
The capture boundary fails closed on replay, but credential exclusion is bypassable on the normal write path and Python failure handling drops already-computed integrity anchors. Four defects are actionable; stale owner configuration is not a demonstrated leak.
## Actionable findings
**1. High — structured credential exclusion fails open.** Both denylists omit common names (`secret`, `privatekey`, `jwt`, `bearer`, `sessiontoken`, `idtoken`). A normalized key matches only the fixed set; `token` is not in that set and is withheld only when `key.lower() == 'token'` and the value is a string. Object or array `token` values are recursed, so nested `jwt`, `value`, or `secret` fields are stored. Prefixed keys such as `x-api-key` normalize to `xapikey` and miss `apikey`. String and non-dict envelopes are stored unchanged.
Evidence: `native/private-capture.js` lines 3–9; `bridge/[REDACTED: private constant].py` lines 18–32 and 132–140. `terminalEvidence` and `capture` then persist the walked object (`private-capture.js` lines 12–16 and 22–29; `[REDACTED: private constant].py` lines 116–130 and 144).
Trigger: a terminal receipt, direct payload, or raw RPC envelope contains `token: {jwt: "..."}`, `secret`, `[REDACTED: private constant]`, or `x-api-key`. The success path writes those values into the private snapshot. Durable storage is worse: redaction never runs on the primary receipt.
Smallest remediation: one shared normalized denylist; withhold the whole value on match regardless of type; also match normalized suffixes `token`, `secret`, `password`, `apikey`, and `credential`. Apply that helper before any durable or snapshot write.
**2. High — enabling private capture stores and returns unredacted input.** On `options.privateCapture === true`, the full client `input` is copied to `privateTaskContext` and committed with `storage.set` before the snapshot helper runs. `privateEvidence` is applied only inside `terminalEvidence` to a separate object. `inspect`, `submit`, `advance`, and `cancel` return that durable receipt. The bridge then spreads the original `output`, not the redacted copy.
Evidence: native direct RPC lines 302, 240–242, 273–275, and 340–346; bridge helper line 223.
Trigger: private capture is on and `input` or engine `admission` or `result` contains a credential field, including one the denylist would have caught. It remains in scoped request storage and in the authenticated RPC response. Turning the flag on increases retention relative to the question-only receipt.
Smallest remediation: redact `input` before assigning `privateTaskContext`, and do not return that field on RPC. Keep the unredacted task context only in the private snapshot store after finding 1 is fixed.
**3. Medium — Python capture path checks do not pin the directory they write.** `is_symlink()` covers only the leaf. `resolve()` follows parent symlinks. The repo check and `stat()` mode check are not tied to a directory fd. `stat()` follows symlinks. `O_NOFOLLOW` is used only after `NamedTemporaryFile` and `os.link`. Relative `OPENCODE2_[REDACTED: private constant]` or `OPENCODE2_CAPTURE_FAILURE_DIR` is resolved against the process cwd. The temp file is created with the process umask and chmodded to `0o600` only afterward.
Evidence: `bridge/[REDACTED: private constant].py` lines 39–49 and 53–68; failure directory selection at lines 157–159.
Trigger: a parent component of the capture or failure directory is a symlink, or the leaf is replaced after the symlink check, pointing at a traversable directory or a repo. Writes follow that path. A local observer can open the temp name before `fchmod` if the substituted directory is traversable and umask leaves group or other read. A same-user redirect into a repo defeats the `.git` check via that race and can later be committed.
Smallest remediation: reject non-absolute paths; walk with `O_NOFOLLOW`; `open` the final directory `O_DIRECTORY|O_NOFOLLOW`; require mode `0o700`, matching uid, and a regular non-repo directory; create the temp file `O_EXCL|O_NOFOLLOW` with mode `0o600` on that dirfd before writing.
**4. Medium — Python failure retention and response binding drop or mis-file evidence.** The `except` block builds an identity-only failure record and discards `record`, including `rawEnvelopeEvidence.sha256` already computed in the `try`. The failure file digest is not returned. Separately, `runID` and `requestID` prefer the response over the submitted payload when both exist. Python filenames are content digests only, so a mis-bound snapshot is not request-scoped on disk. Native failure keys do retain `snapshotDigest` (`private-capture.js` lines 34–37); Python does not.
Evidence: `bridge/[REDACTED: private constant].py` lines 118–119, 132–144, and 150–164; bridge call at helper line 222.
Trigger: `_store` raises after an oversized or secret-bearing envelope was hashed (combined record over 8,000,000 bytes, readback mismatch, or unsafe directory). Reconciliation is left with no digest. Or the RPC `output` carries a different `requestID` or `runID` than the payload; the lifecycle snapshot is labeled with the response identity and can be reconciled to the wrong battle.
Smallest remediation: on failure, persist `requestID` from the caller, `errorClass`, raw-envelope sha256, and serialized length, and return those digests. If both sides have an ID, require equality and otherwise fail closed. Bind the record to the caller ID.
## Acceptance gaps (not demonstrated defects)
- The stale Codex MCP process with old env or schema is an unverified capture gap. Both gates fail silent: the native code returns when `enabled` is not strictly `true`, and Python returns `disabled` when `OPENCODE2_[REDACTED: private constant]` is unset (`private-capture.js` line 21; `[REDACTED: private constant].py` lines 113–115; packet lines 235 and 484). That is missing evidence, not a shown credential leak.
- Free text is intentionally retained, including `question`, `error` (native RPC line 334, sliced to 2000 characters), and `text`. Credential-shaped strings in those fields are a residual policy risk.
- Native snapshots cover only `completed` and `terminal-incomplete`. `admitting` and `admission-uncertain` are not snapshotted, and reconcile or advance will not move them (native RPC lines 354–355 and 408–410). Recovery depends on `inspectUnsafe` plus engine helpers not in this packet.
- The admission-diagnostic RPC is not captured (bridge helper lines 226–236). `publicationAllowed: false` is stored but not enforced here.
- The native storage permissions, `validID`, `KEY`, `inputHash`, and `OpenCodeClient.request` shape are outside the packet. The integration claim of directory `0700` and file `0600` is not visible in the JS capture path.
- `evidence_index` stops after 4096 path characters or 64 segments (`[REDACTED: private constant].py` lines 89–90). Full `input` and `nativeReceipt` copies remain. Digests are not comparable across native `JSON.stringify` and Python canonical JSON.
- Non-dict `output` is silently replaced with `{}` (`[REDACTED: private constant].py` line 117). The shown bridge success path avoids that with `isinstance(..., dict)`.
## Alternatives and discarded hypotheses
- I did not treat a pre-created leaf symlink in `/tmp` as a bypass. `is_symlink()` rejects that leaf. The gap is parent symlinks and the check-to-write race.
- I did not treat `events.emit("changed", ...)` as a credential leak. The payload is only sequence, request ID, and state (native RPC line 244).
- I did not treat JSON key-order readback mismatch as a defect. The packet states native readback was verified, and storage round-trip semantics are not in the packet.
- I did not treat returning the RPC `output` to the direct caller as itself a leak. The caller needs the result. The defect is the unredacted durable copy and the weak snapshot denylist.
- `coverage: digest-only-over-limit` omits a sanitized label, but `structuredCredentialsWithheld` remains set (`[REDACTED: private constant].py` lines 139–141). That is not an independent defect.
## Missing evidence
`validID`, storage key prefix `KEY`, hash inputs, `validateInput`, engine launch, status, and collect shapes, and the storage implementation are not in the packet. I cannot confirm request-ID key traversal, whether reconcile’s scan is cross-workspace, or that live replies actually contain the weak field names. Consequence: findings 1 and 2 are proven write-path defects; exploitability in production traffic depends on those unseen object shapes. The symlink finding does not depend on them.
## Next useful action
Patch findings 1–4 in the snapshot helpers and the durable `privateTaskContext` assignment, then add tests for object-valued `token`, suffix keys, response ID mismatch, failure-record digest retention, and a parent-symlink capture directory. Do not inspect live credentials or treat a stale owner process as a leak.Primary judge's stated reason
Forced, weak preference for B because its path-substitution finding avoids A's erroneous temporary-file leakage mechanism and is directly anchored to packet lines, reducing the risk of remediation aimed at a nonexistent permission window. A's additional durable-retention analysis is meaningful counterevidence; no overall material quality difference is established, and an independent review could reasonably reject this 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_c1c8553b03a7f76683babd944f160597aeda712271027cc711e202bf7d2963a1. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.