Skip to content

fix(mcp): surface byte search for encoded literals - #8817

Merged
morluto merged 1 commit into
mainfrom
codex/string-search-byte-discovery
Nov 4, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/string-search-byte-discovery

Conversation

@morluto

@morluto morluto commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

When a known encoded literal is missing from Ghidra's string inventory, the search_strings tool description does not point agents to the existing byte-search alternative. Mention search_bytes for known encoded bytes and clarify that a byte match does not establish a string or its use. Related: #8218.

Problem and expected behavior

A real Ghidra 12.1.4 session on a source-owned Mach-O returned no search_strings matches for Ωprobe, while search_bytes found the known UTF-8 byte sequence at 0x10000039c with file-offset and coverage information. This is an inventory limitation, not a failed byte search or a claim that the hit proves text interpretation or use.

Change and scope

Add one sentence to the existing MCP search_strings description. search_bytes remains Ghidra-only; the sentence names Ghidra explicitly. No tool, schema, matching, provider selection or runtime behavior changes. #8816 edits the same description for a separate raw-candidate issue; reconcile the wording if either PR lands first. Contribution scope decision: not applicable; catalog guidance for existing static tools.

Contract and boundary impact

  • Semantic owner: authored search_strings tool contract; search_bytes continues to own byte-match and coverage semantics.
  • CLI/MCP: MCP catalog description only; no input/output schema or tool-count change.
  • Provider/platform: Ghidra byte-search alternative; Kuna does not declare this operation.
  • Evidence: byte observations remain separate from defined strings and references; no Evidence is rewritten.
  • Target/cleanup: existing static analysis reads caller-selected bytes; no target execution or mutation.
  • Generated metadata: normal build/check regenerates ignored catalogs; generated files are not committed.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration. (Existing owned analysis cache and temporary artifacts.)
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Real Ghidra 12.1.4 and Kuna 1.990 on macOS arm64, compact and full stdio MCP: Ghidra string search returned no match, Ghidra byte search returned one match with coverage, and Kuna byte search returned capability_unavailable. Successful responses validated against advertised output schemas. The source-owned, unexecuted target SHA-256 ab0b231c1480722ebbd6d61a020d8f8b39928c94f471ea0ec23b33559d408ee5 remained unchanged.

  • Fresh before/after tools/list controls in both schema profiles showed 234 tools, unchanged search input/output schemas and unchanged search_bytes definition. The search_strings description grew by 110 UTF-8 bytes. This is a byte count, not a token or whole-task measurement.

  • In an isolated, manually conflict-resolved combination with fix(session): guide unsupported provider recovery #8567 head b282fece7, real Kuna 1.990 and Ghidra 12.1.4 MCP controls in both profiles followed the encoded-literal workflow: Kuna search returned no match, its unavailable byte-search response directed candidate discovery, explicit Ghidra selection found the known UTF-16LE bytes, and an exported bundle retained the original Kuna search Evidence exactly. The target digest stayed unchanged. This validates the local combination and caller-driven handoff, not an automatic merge or agent choice.

  • No controlled model/host selection trial was run; this establishes discoverable catalog wording and a working alternative, not an observed agent-selection improvement. Other hosts, encodings and targets remain unverified.

  • Observed, derived, and inferred claims remain distinguishable.

  • Artifact identity, source provenance, and failed attempts remain preserved.

  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run build:cached, npm run check:ci:fast, and npm run docs:check — passed.
  • Fresh real stdio MCP catalog and Ghidra/Kuna workflow controls — passed as described above.

Compatibility, safety, and release

  • Description-only change; no migration, dependency, installation, or schema changes.
  • Real-provider check covers macOS arm64 only. The target was not executed or modified.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • This PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Low impact] This description-only change appears safe to merge.

Summary

Adds one sentence to search_strings pointing to Ghidra search_bytes for known encoded bytes.

  • String searches now point to Ghidra byte search for known encoded bytes.

Reviews (1) · Last reviewed commit: "fix(mcp): surface byte search for encode..." · Reviewed by Greptile

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T03:51:57.135238Z 50ba6cb 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.

@morluto
morluto merged commit 5a11bf0 into main Nov 4, 2026
52 checks passed
@morluto
morluto deleted the codex/string-search-byte-discovery branch November 4, 2026 03:53
@morluto morluto added area: mcp MCP server, transport, and tool registration bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant