Configure persistent portable Java and Ghidra for Jean-Luc REA

This commit is contained in:
Mikei386 committed 2026-10-20 17:16:38 +02:00
1 parent 29fa6a7ba2
commit 9572d9f680
5 files changed
+2274

No files matched your search

@@ -0,0 +1,86 @@
# REA native decompilation: portable packages (2026-10-20)
User decision: no derived Docker image, no image rebuild maintenance, no custom
startup installer, no container changes. The official Hermes image remains in use.
Ghidra 12.1.4 and Temurin JDK21 official archives were downloaded, SHA256 checked
against published checksums, and extracted unchanged by Hermes UID99/GID100:
- `/opt/data/tools/rea/ghidra-12.1.4`
- `/opt/data/tools/rea/jdk21`
The existing `/opt/data` bind is on the NAS at
`/mnt/nvme-storage/appdata/Hermes-Agent-Desktop`. These files survive container
recreation; include them in appdata backup or restore from packages.json.
No binary archives or credentials are stored in Git. Ghidra officially supports
extracting a distribution and pointing JAVA_HOME at an extracted JDK.
This is operator-provided software in the data volume, not bundled Hermes code.
Future upstream image ABI/architecture changes still require revalidation.
Only `jean-luc-picode` currently enables the REA plugin. Its config.yaml has the
same-name `mcp_servers.rea` engine-location override prescribed by the plugin's
connection-and-recovery guide, preserving `npx -y rea-agents@6.7.0 mcp`,
REA_GHIDRA_STARTUP_TIMEOUT_MS=900000, optional REA_PWNTOOLS_PYTHON forwarding,
and timeout=1000. JAVA_HOME and GHIDRA_INSTALL_DIR point to the directories above.
Plugin workflow skills remain enabled. Revisit the command pin with plugin updates.
No secrets are needed for these paths. Other profiles are not changed.
A new session/reconnection is needed for an already running REA process to use
the changed environment. No gateway or container restart is performed.
Official references:
- https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/GhidraDocs/GettingStarted.md
- https://hermes-agent.nousresearch.com/docs/plugins/rea
Own synthetic verification target and responses are under
`/opt/data/tools/rea/verification`. The binary is compiled from a tiny local C
function and analyzed statically, never executed. Test results are recorded
separately; open_binary alone is not decompilation proof.
## Verified result
Official Ghidra 12.1.4 returned REA analyze_function Evidence for hermes_probe,
including an int signature, branch x<11, x-5, x*7+13, assembly, and main as caller.
The first query took 150.16 seconds including first-start import; open_binary
alone took 7.43 seconds. Target never executed. See synthetic-evidence.json and
decompilation-result.json. This verifies x86_64 ELF, not arbitrary DOS targets.
## Resolved npm project-policy interaction
The normal launcher inherited /opt/hermes as cwd, where the upstream repository
.npmrc sets min-release-age=14 for its project dependencies. npm config reports
14 there and null in /opt/data. This was not a global npm rule. An approved
package-specific exception did not fix npx and has been removed.
With the user's explicit approval, Jean-Luc's mcp_servers.rea now has:
```yaml
command: npx
args: ["-y", "rea-agents@6.7.0", "mcp"]
cwd: /opt/data/tools/rea
timeout: 1000
env:
GHIDRA_INSTALL_DIR: /opt/data/tools/rea/ghidra-12.1.4
JAVA_HOME: /opt/data/tools/rea/jdk21
REA_GHIDRA_STARTUP_TIMEOUT_MS: "900000"
```
Existing optional REA_PWNTOOLS_PYTHON forwarding was preserved. cwd is supported
by tools/mcp_tool_transport.py::_stdio_launch and propagated into the stdio child.
The repo .npmrc was not edited, no global npm setting changed, and no direct
Node/cache-path launcher or copy of REA was installed. Starting outside that
project means its age rule does not cover this REA invocation; this is a policy
scope change, not an equivalent package-age guarantee.
Fresh launch tested as UID99 using Jean-Luc's actual saved configuration,
Hermes' own _connect_inputs environment filtering and _preflight_stdio_command,
then real MCP initialize/list_tools: 207 tools, analyze_function present.
See native-launch-result.json. No new LLM turn or production session was run.
Earlier direct REA test produced actual Ghidra pseudocode (above); these are two
separate checks, not a claimed capture of a live user session.
For updates, keep the package pin in this intentional override aligned with the
reviewed REA plugin. The override is persistent; plugin updates must not be
assumed to rewrite it. Java/Ghidra archives need no Hermes image rebuild.
Recreation survival follows from existing /opt/data bind and unchanged image;
a forced recreation was not performed just to test it. No services restarted.
@@ -0,0 +1,13 @@
{
"open_binary": {
"seconds": 7.43,
"mcp_error": false
},
"analyze_function": {
"seconds": 150.16,
"mcp_error": false
},
"decompiled_function_named": true,
"has_arithmetic": true,
"has_pseudocode": true
}
@@ -0,0 +1,6 @@
{
"hermes_native_env": true,
"hermes_preflight": true,
"rea_tool_count": 207,
"analyze_function_present": true
}
@@ -0,0 +1,7 @@
{
"jdk_url": "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.12.1%2B1/OpenJDK21U-jdk_x64_linux_hotspot_21.0.12.1_1.tar.gz",
"jdk_sha256": "ce79869e1307ed8ee1e2baa86a412b1eb5b75d10a01006d788a6f968bcfaee94",
"jdk_version": "jdk-21.0.12.1+1",
"ghidra_url": "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_12.1.4_build/ghidra_12.1.4_PUBLIC_20260921.zip",
"ghidra_sha256": "ddac49f903da9d5bac833e5cc79395098b9c33cfd3279be5f31bd00387d2d4db"
}
File diff suppressed because it is too large. Load diff