Skip to content

fix(exa): redact reflected search credentials - #178745

Merged
steipete merged 1 commit into
mainfrom
deslop/z44-2-exa-error-redaction-20261015
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z44-2-exa-error-redaction-20261015

Conversation

@steipete

@steipete steipete commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Exa search errors included upstream response text verbatim. An upstream error reflecting the active x-api-key could expose that credential in tool-visible error text, including through the HTTP status-text fallback.

User Impact

Exa failures no longer expose the active search credential when the upstream service reflects it in an error. No configuration or migration is required.

Why This Change Was Made

Use the existing Plugin SDK arbitrary-header error redactor for the bounded error body and status text. Keep the Exa error prefix, numeric status/statusCode, body limit, cancellation, and request behavior unchanged.

Best-effort tradeoffs accepted

None. This is a credential-redaction bug fix, not removal of a guard.

Evidence

Both new regression cases fail on the original actual search-tool route and pass with the fix. All 17 Exa provider tests pass. Targeted Exa package typecheck, changed-file syntax lint/format, mandatory lint-suppressions (14 tests), and scoped runtime/static cycle checks (zero cycles) pass. Independent review found no actionable P0–P2 defects. Hosted exact-head CI is the broad gate; no paid live request was made.

Production delta: +11 lines (22 added, 11 removed). Test delta: +22 lines. Separate small bug fix discovered during the plugin cleanup sweep.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 20, 2026 20:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T20:18:07.523396Z beb7681 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR redacts reflected Exa credentials from HTTP error bodies and status text using existing Plugin SDK helpers.

Example: Exa returns HTTP 503 with “upstream rejected fixture-exa-opaque-credential”.

  • Before: The tool error includes the synthetic credential verbatim.
  • After: The tool error contains “upstream rejected ***” and retains status and statusCode 503.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-correct repair with meaningful error-path regressions; behavioral evidence remains an in-process test harness.
Proof confidence 🦐 gold shrimp (3/6) Under the supplied maintainer-authored classification, the ordinary contributor proof gate does not apply; available evidence exercises the real Exa tool owner with mocked fetch responses, and no live provider execution is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed Exa search can expose the active search credential to the calling agent when an upstream service reflects it.
Reason: Credential removal restores the existing error-safety expectation, preserves diagnostic status and bounded reads, and follows the maintainer-authored direction supplied for this review.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a credential leak still present on current main, and source review found no actionable introduced defects.

Priority: P2
Reviewed head: beb7681f98922b52c5a0e1f3881471c98f16ef1e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point or real-transport reflection trace is supplied; the red-before/green-after results are reported in the PR body.
Agent review details

How this fits together

The Exa plugin translates web_search arguments and configured credentials into an HTTP search request, then returns normalized results or a provider error to the calling agent.

flowchart LR
  A[Agent web search call] --> B[Exa plugin]
  B --> C[Exa HTTP endpoint]
  C --> D[Bounded error reader]
  D --> E[SDK credential redactor]
  E --> F[Provider error returned to agent]
Loading

Technical review

Best possible solution:

Keep the Exa request owner and reuse the SDK redactor for both bounded error bodies and status-text fallback.

Do we have a high-confidence way to reproduce the issue?

Current-main source directly copies reflected response text into the thrown error; the submitted tests supply concrete body and status-text cases, but no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete repair using existing owners: pass the actual outgoing headers to the SDK error reader and redact the fallback without introducing another policy layer.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 05ade6d2df13.

Provenance checked

  • Exa request orchestration and error construction changes intended behavior with a stated reason (12d398d: The earlier refactor consolidated request ownership and preserved existing diagnostics; its patch carries forward the raw error construction rather than establishing its first introduction.)
  • Provider HTTP error type and numeric status keeps the original intent (ddc2518: The search-routing repair retained numeric managed-provider status for useful authentication and quota guidance.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 12d398d adds extensions/exa/src/exa-web-search-provider.runtime.ts:365 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 12d398d18f9a; files: extensions/exa/src/exa-web-search-provider.runtime.ts)

PR surface

Source +11, Tests +22. Total +33 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 22 11 +11
Tests 1 22 0 +22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 44 11 +33

Labels

Label changes:

  • add P2: This is a focused credential-disclosure repair triggered by reflected upstream failure text; no active incident or broader runtime outage is established.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a focused credential-disclosure repair triggered by reflected upstream failure text; no active incident or broader runtime outage is established.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • A real HTTP reflection trace through the Exa tool would strengthen confidence that both body and status-text errors omit a synthetic credential.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 4:29 PM ET / 20:29 UTC.

@steipete
steipete enabled auto-merge (squash) October 20, 2026 20:33
@steipete
steipete disabled auto-merge October 20, 2026 22:26
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head CI attribution

Reviewed head: beb7681f98922b52c5a0e1f3881471c98f16ef1e.
CI run: 39489846098, attempt 1.

All selected jobs completed. Security, types, lint, package boundaries, and every selected test job passed. No job was rerun and the branch was not updated to obtain green.

Failing job Attribution and evidence
checks-fast-baseline-ratchets, 118860584468 Inherited mock-export failure at src/commands/doctor-database-network-storage.test.ts:15, mocking ./doctor-database-engine-inspection.js. The actual CI checkout e7208652e33264e3d0af9876b2dababe99c280c2 has ordered parents 00a052a90a7fea7d13257ba4d0cbc049aedb3f99 and this exact PR head. The failing file has identical blob 29c039ac68a10dcb3d8e90de21bda55c1d184e49 in the baseline and tested merge. The tested merge adds only this PR's two Exa files. The failure was introduced by #178672 and repaired on main by 2466488c29e25f6fdafe0d6419387116e4194ade. Independent PR #178757 reproduces the identical signature without changing that test.
openclaw/ci-gate, 118921239063 Downstream failure solely from checks-baseline-ratchets=failure; the gate log records all other selected results as successful.

The informational failure table calls the ratchet new because its comparison main job passed and selected scope was not compared. The source-bound evidence above establishes inheritance from the recorded, older baseline; the later main repair explains that comparison. Failed CI is not being relabeled green.

Two historical PR-context jobs (118859300350, 118859793178) failed because the initial body lacked required headings. That body was corrected once; the newer same-head context job 118861586062 passed. Those superseded metadata failures are not attributed to main.

Focused proof: all 17 Exa provider tests passed, including both credential-reflection controls through the actual search-tool route. Targeted package types, syntax lint/format, suppression tests (14), whitespace, and scoped runtime/static cycles (zero) passed. Fresh independent P0–P2 review found no actionable defects. No paid live Exa request was made.

This uses the scoped maintainer-authorized inherited-failure exception, pinned to the reviewed head. Security, required reviews, and every other required check remain enforced. Exa's credential redaction, numeric status fields, bounded errors, cancellation, cache behavior, and successful result contract remain protected.

@steipete

Copy link
Copy Markdown
Contributor Author

Native infrastructure timeout and guarded fallback

Two investigated native admin submissions for head beb7681f98922b52c5a0e1f3881471c98f16ef1e passed merge verification but exceeded the 60-second GitHub mergeability settle deadline. Both stopped before intent or dispatch, released their operation locks, and left the confirmed-retired auto outcome unchanged. A fresh REST observation reported the same head mergeable, open, unmerged, with no armed auto request. No source, branch, CI run, credential, or policy was changed to address the timeout.

The complete exact-head failure table and source-bound inherited attribution remain applicable. Required-check inventory contains only the failed Actions CI gate and combined CI/security status; independent dependency and security-sensitive review statuses passed, as did Opengrep and the precise security scan. No enforced review is outstanding.

Under the campaign's explicit two-infrastructure-failure fallback authority, a direct squash may be submitted with the exact reviewed SHA guard only after the native read-only evidence verifier independently passes current failed-CI qualification, required reviews/threads, security publisher validation, and live writer/bypass authority. This bypasses the unavailable native mergeability projection, not those checks. Failed CI remains recorded as failed. The provider still evaluates the SHA-pinned merge request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: exa P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant