[PR #7239] feat(ghidra): accept Ghidra 12.2.x as a compatible, unverified release line #7738

Open
opened 2026-11-03 13:40:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/7239
Author: @skagneTTY
Created: 10/26/2026
Status: 🔄 Open

Base: main ← Head: feat/ghidra-12.2


📝 Commits (1)

  • 1fee2ba feat(ghidra): accept Ghidra 12.2.x as a compatible, unverified release line

📊 Changes

5 files changed (+67 additions, -11 deletions)

View changed files

📝 docs/installation.md (+3 -2)
📝 docs/native-investigation.md (+1 -1)
📝 docs/testing.md (+1 -1)
📝 src/ghidra/GhidraInstallation.test.ts (+30 -2)
📝 src/ghidra/GhidraReleasePolicy.ts (+32 -5)

📄 Description

PR title: feat(ghidra): accept Ghidra 12.2.x as a compatible, unverified release line

Summary

REA 6.8.0 refuses Ghidra 12.2, the current Ghidra release line, at the
installation version check (unsupported_version, "accepted releases are
12.1.x"), even though the bridge compiles and runs on it. This change admits
12.2.x builds as compatible (not verified), so sessions on 12.2 work and
every result keeps the existing unverified-build limitation.

Problem and expected behavior

Trigger: GHIDRA_INSTALL_DIR points to an extracted Ghidra 12.2 with its
required JDK (25+). rea doctor --provider ghidra and open_binary with
provider_id: "ghidra" reject it:

"code":"unsupported_version","detail":"12.2; accepted releases are 12.1.x (verified build 12.1.4)"

Expected: 12.2.x is admitted as a compatible build, like 12.1.x builds other
than 12.1.4 already are, with the observed version and the unverified-build
limitation reported. Releases outside the listed lines (12.0.x, 12.3+, 13.x)
remain unsupported.

Change and scope

GhidraReleasePolicy.ts owns release admission; GhidraInstallation.ts,
GhidraProviderClient.ts and scripts/verify-ghidra-bridge-sources.mjs
consume it. The change adds an explicit list of additional compatible release
lines ({ major: 12, minor: 2 }) beside the verified build's line, rather
than accepting every newer minor, so admission stays fail-closed for
untested lines. ghidraReleaseLine() now names every accepted line
("12.1.x or 12.2.x"), so doctor details, remediation and the session
limitation text stay accurate without further changes.

Intentionally not included:

  • SUPPORTED_GHIDRA_VERSION stays 12.1.4: 12.2 is not claimed as verified,
    and the CI SDK pin and real-provider verifier scripts are unchanged.
  • scripts/build-ghidra-nativeaot.mjs keeps its own 12.1-only check, since
    its comment describes it as a separately pinned NativeAOT integration.

Contribution scope: an ordinary change within the existing Ghidra provider
boundary; no new provider or capability. Maintainer scope decision: not
applicable, unless maintainers prefer to keep admission to verified lines only.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/ghidra/GhidraReleasePolicy.ts
    (release admission); consumers unchanged.
  • Contribution scope fit and linked maintainer decision: see above.
  • CLI and MCP/tool-catalog contract: no schema change. Version-check detail,
    remediation text and the session limitation now read "12.1.x or 12.2.x".
  • Provider, bridge, target-format, or platform compatibility: admits Ghidra
    12.2.x installations as compatible. Bridge sources unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged; the
    provider identity carries the observed version (e.g. "12.2") and the
    unverified-build limitation is recorded as before.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package, or installation impact: none; docs updated
    (docs/installation.md, docs/native-investigation.md, docs/testing.md).

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.
  • 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.

(No new effects: the change only widens which installations pass the
existing version check.)

Evidence and regression coverage

  • Tests added or updated (src/ghidra/GhidraInstallation.test.ts):
    • accepts 12.2 and 12.2.1 as compatible builds with a "verified build"
      version detail;
    • rejects 12.0.4, 12.3 and 13.1.4 with a detail naming
      "12.1.x or 12.2.x";
    • the existing "different Ghidra line" case now uses 12.3.0 instead of
      12.2.0, which is newly accepted.
  • Base reproduction: on rea 6.8.0 (unpatched npm package), macOS arm64 with
    Ghidra 12.2 and JDK 27.0.1, open_binary with provider_id: "ghidra"
    failed with the unsupported_version rejection quoted above.
  • Real-provider evidence (executed, single target): with the equivalent
    admission change applied locally to the installed rea 6.8.0 package, on the
    same host:
    • open_binary on a thin arm64e slice of macOS /bin/ls (extracted with
      lipo -thin) succeeded with Ghidra 12.2;
    • headless auto-analysis succeeded (about 6 s); ReaGhidraNoReturnFix.java
      and ReaGhidraBridge.java compiled and ran;
    • procedure_pseudo_code for entry returned complete pseudocode, with
      provider version "12.2" and the unverified-build limitation;
    • close_binary succeeded.
      Ghidra's native decompiler was built locally from the 12.2 release
      (the release ships no macOS native components).
  • Remaining proof gaps: no full real-provider verification lane
    (scripts/verify-real-ghidra*.mjs) was run against 12.2; only one target
    and a few operations were exercised; Linux and macOS x64 were not tested.
    The 12.2 run left the getopt_long jump table in entry unresolved
    (shown as an indirect call); this was not compared against 12.1.4 on the
    same target, so it is unknown whether it is 12.2-specific.

For evidence-bearing changes:

  • 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

  • npx vitest run src/ghidra/ tests/boundary/providers/ghidra tests/boundary/filesystem/ghidraJavaProbe.test.ts
    — 41 files passed; 2 files failed only because dist/ was not built yet.
  • npx tsc -p tsconfig.build.json — passed.
  • npx vitest run tests/boundary/providers/ghidra/addressBoundaryRestoration.test.ts tests/boundary/providers/ghidra/ghidraVerifierTimeouts.test.ts tests/boundary/filesystem/ghidraBridgeSources.test.ts
    (after the build) — 3 files, 22 tests passed.
  • tsc --noEmit on the changed test and policy files — passed. (A full-project
    tsc --noEmit -p tsconfig.json ran out of memory in the authoring sandbox.)
  • npx oxlint and npx oxfmt --check on the changed files — passed.
  • Real Ghidra 12.2 workflow on macOS arm64 — see Evidence above.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Previously rejected 12.2.x
    installations are now admitted as compatible.
  • Real Hopper/Ghidra, browser, or OS coverage: Ghidra 12.2 on macOS 27.0.1
    arm64 (VM), JDK 27.0.1, single target; see proof gaps.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change to process
    launch, bridge, or containment; only the version admission rule.

Author readiness

Human owner: @skagneTTY

  • 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.
  • The 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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/7239 **Author:** [@skagneTTY](https://github.com/skagneTTY) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/ghidra-12.2` --- ### 📝 Commits (1) - [`1fee2ba`](https://github.com/morluto/rea/commit/1fee2bad3c851b407894ef43a3c71281544f26e8) feat(ghidra): accept Ghidra 12.2.x as a compatible, unverified release line ### 📊 Changes **5 files changed** (+67 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/installation.md` (+3 -2) 📝 `docs/native-investigation.md` (+1 -1) 📝 `docs/testing.md` (+1 -1) 📝 `src/ghidra/GhidraInstallation.test.ts` (+30 -2) 📝 `src/ghidra/GhidraReleasePolicy.ts` (+32 -5) </details> ### 📄 Description PR title: feat(ghidra): accept Ghidra 12.2.x as a compatible, unverified release line ## Summary REA 6.8.0 refuses Ghidra 12.2, the current Ghidra release line, at the installation version check (`unsupported_version`, "accepted releases are 12.1.x"), even though the bridge compiles and runs on it. This change admits 12.2.x builds as `compatible` (not `verified`), so sessions on 12.2 work and every result keeps the existing unverified-build limitation. ## Problem and expected behavior Trigger: `GHIDRA_INSTALL_DIR` points to an extracted Ghidra 12.2 with its required JDK (25+). `rea doctor --provider ghidra` and `open_binary` with `provider_id: "ghidra"` reject it: ``` "code":"unsupported_version","detail":"12.2; accepted releases are 12.1.x (verified build 12.1.4)" ``` Expected: 12.2.x is admitted as a compatible build, like 12.1.x builds other than 12.1.4 already are, with the observed version and the unverified-build limitation reported. Releases outside the listed lines (12.0.x, 12.3+, 13.x) remain unsupported. ## Change and scope `GhidraReleasePolicy.ts` owns release admission; `GhidraInstallation.ts`, `GhidraProviderClient.ts` and `scripts/verify-ghidra-bridge-sources.mjs` consume it. The change adds an explicit list of additional compatible release lines (`{ major: 12, minor: 2 }`) beside the verified build's line, rather than accepting every newer minor, so admission stays fail-closed for untested lines. `ghidraReleaseLine()` now names every accepted line ("12.1.x or 12.2.x"), so doctor details, remediation and the session limitation text stay accurate without further changes. Intentionally not included: - `SUPPORTED_GHIDRA_VERSION` stays 12.1.4: 12.2 is not claimed as verified, and the CI SDK pin and real-provider verifier scripts are unchanged. - `scripts/build-ghidra-nativeaot.mjs` keeps its own 12.1-only check, since its comment describes it as a separately pinned NativeAOT integration. Contribution scope: an ordinary change within the existing Ghidra provider boundary; no new provider or capability. Maintainer scope decision: not applicable, unless maintainers prefer to keep admission to verified lines only. ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/ghidra/GhidraReleasePolicy.ts` (release admission); consumers unchanged. - Contribution scope fit and linked maintainer decision: see above. - CLI and MCP/tool-catalog contract: no schema change. Version-check detail, remediation text and the session limitation now read "12.1.x or 12.2.x". - Provider, bridge, target-format, or platform compatibility: admits Ghidra 12.2.x installations as `compatible`. Bridge sources unchanged. - Evidence, artifact, provenance, or reconstruction contract: unchanged; the provider identity carries the observed version (e.g. "12.2") and the unverified-build limitation is recorded as before. - Target selection, authority, upstream behavior, and cleanup details: unchanged. - Generated metadata, package, or installation impact: none; docs updated (`docs/installation.md`, `docs/native-investigation.md`, `docs/testing.md`). 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. - [ ] 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. (No new effects: the change only widens which installations pass the existing version check.) ## Evidence and regression coverage - Tests added or updated (`src/ghidra/GhidraInstallation.test.ts`): - accepts `12.2` and `12.2.1` as compatible builds with a "verified build" version detail; - rejects `12.0.4`, `12.3` and `13.1.4` with a detail naming "12.1.x or 12.2.x"; - the existing "different Ghidra line" case now uses `12.3.0` instead of `12.2.0`, which is newly accepted. - Base reproduction: on rea 6.8.0 (unpatched npm package), macOS arm64 with Ghidra 12.2 and JDK 27.0.1, `open_binary` with `provider_id: "ghidra"` failed with the `unsupported_version` rejection quoted above. - Real-provider evidence (executed, single target): with the equivalent admission change applied locally to the installed rea 6.8.0 package, on the same host: - `open_binary` on a thin arm64e slice of macOS `/bin/ls` (extracted with `lipo -thin`) succeeded with Ghidra 12.2; - headless auto-analysis succeeded (about 6 s); `ReaGhidraNoReturnFix.java` and `ReaGhidraBridge.java` compiled and ran; - `procedure_pseudo_code` for `entry` returned complete pseudocode, with provider version "12.2" and the unverified-build limitation; - `close_binary` succeeded. Ghidra's native decompiler was built locally from the 12.2 release (the release ships no macOS native components). - Remaining proof gaps: no full real-provider verification lane (`scripts/verify-real-ghidra*.mjs`) was run against 12.2; only one target and a few operations were exercised; Linux and macOS x64 were not tested. The 12.2 run left the `getopt_long` jump table in `entry` unresolved (shown as an indirect call); this was not compared against 12.1.4 on the same target, so it is unknown whether it is 12.2-specific. For evidence-bearing changes: - [ ] 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 - `npx vitest run src/ghidra/ tests/boundary/providers/ghidra tests/boundary/filesystem/ghidraJavaProbe.test.ts` — 41 files passed; 2 files failed only because `dist/` was not built yet. - `npx tsc -p tsconfig.build.json` — passed. - `npx vitest run tests/boundary/providers/ghidra/addressBoundaryRestoration.test.ts tests/boundary/providers/ghidra/ghidraVerifierTimeouts.test.ts tests/boundary/filesystem/ghidraBridgeSources.test.ts` (after the build) — 3 files, 22 tests passed. - `tsc --noEmit` on the changed test and policy files — passed. (A full-project `tsc --noEmit -p tsconfig.json` ran out of memory in the authoring sandbox.) - `npx oxlint` and `npx oxfmt --check` on the changed files — passed. - Real Ghidra 12.2 workflow on macOS arm64 — see Evidence above. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Previously rejected 12.2.x installations are now admitted as compatible. - Real Hopper/Ghidra, browser, or OS coverage: Ghidra 12.2 on macOS 27.0.1 arm64 (VM), JDK 27.0.1, single target; see proof gaps. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no change to process launch, bridge, or containment; only the version admission rule. ## Author readiness Human owner: @skagneTTY - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] 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. - [x] The 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. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7738
No description provided.