feat: add search_mixedbread web-search tool to bash harness - #2407
Conversation
Add a `search_mixedbread` tool (Mixedbread Basic Web Search, web store `mixedbread/web`) alongside the existing Serper `search`: POST /api/v1/stores/search with store_identifiers=["mixedbread/web"] and return title, URL, relevance score, and the page-content chunk text per result. The Mixedbread key is handed to the program over argv (--mixedbread-key) and popped from the program env, so the agent's bash subprocesses never inherit it. Enabled via --harness.search_mixedbread (needs MIXEDBREAD_API_KEY in the eval environment).
| "bash search_mixedbread=true requires MIXEDBREAD_API_KEY in the eval " | ||
| "environment (the host env or the harness config's env)" | ||
| ) | ||
| args += ["--mixedbread-search", f"--mixedbread-key={mixedbread_key}"] |
There was a problem hiding this comment.
🔴 Critical bash/harness.py:127
The Mixedbread credential is exposed to the untrusted agent, which can read the program's /proc/$PPID/cmdline or process listing from a bash child and recover MIXEDBREAD_API_KEY. Removing it from env does not protect it because --mixedbread-key places the secret directly in argv; pass the key through a channel inaccessible to agent subprocesses instead.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @verifiers/v1/harnesses/bash/harness.py around line 127:
The Mixedbread credential is exposed to the untrusted agent, which can read the program's `/proc/$PPID/cmdline` or process listing from a `bash` child and recover `MIXEDBREAD_API_KEY`. Removing it from `env` does not protect it because `--mixedbread-key` places the secret directly in `argv`; pass the key through a channel inaccessible to agent subprocesses instead.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new search tool capability with external API integration, which warrants human review. Additionally, there is an unresolved Critical security finding regarding credential exposure via command line arguments that needs to be addressed. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Summary
Adds a
search_mixedbreadweb-search tool to the bash harness, alongside the existing Serpersearchtool. It performs Mixedbread Basic Web Search (POST https://api.mixedbread.com/v1/stores/searchwithstore_identifiers: ["mixedbread/web"]) and returns each result as title, URL, relevance score, and the page-content chunk text (a large chunk of the page — often the whole page for short pages — not just a snippet).Changes
verifiers/v1/harnesses/bash/program.py:SEARCH_MIXEDBREAD_TOOLschema (name:search_mixedbread, params:query,num_results→top_k)run_mixedbread_search()— POSTs to Mixedbread withAuthorization: Bearer, wraps failures as tool errorsformat_mixedbread_results()— title / URL / score / full content text per result--mixedbread-search/--mixedbread-keyargv plumbing + dispatchverifiers/v1/harnesses/bash/harness.py:search_mixedbread: bool = Falseconfig flagMIXEDBREAD_PROMPTsystem-prompt fragmentMIXEDBREAD_API_KEYis popped from the program env and handed over argv (same secret hygiene as the Serper key), so the agent'sbashsubprocesses never inherit itEnable
Verified
list-chunks,files.retrieve,grep) return 404 for the web store — the search response'stextfield is the full content surfaceruffclean; harness config tests passNote
Cursor Bugbot is generating a summary for commit 0320859. Configure here.
Note
Add
search_mixedbreadweb-search tool toBashHarnesssearch_mixedbread: boolflag toBashHarnessConfigthat enables a Mixedbread Basic Web Search tool, requiringMIXEDBREAD_API_KEYin the program environment.run_mixedbread_searchcalls the Mixedbread API viahttpx.post, formats results withformat_mixedbread_results, and returns error strings instead of raising.--mixedbread-searchand--mixedbread-keyto the program and appendsMIXEDBREAD_PROMPTto the system prompt when the flag is enabled, mirroring the existing Serper search pattern.search_mixedbreadis enabled butMIXEDBREAD_API_KEYis missing, the harness raisesValueErrorat program launch; without the flag the tool is entirely unavailable.📊 Macroscope summarized 0320859. 2 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues