Open source contribution · TypeScript · MCP · AI Agents · Reverse Engineering
morluto/ rea
Open-source project that gives AI agents reverse engineering tools to understand how software works, from native binaries to websites.
- 18 merged PRs
- 1 PR under review
- 29 commits to the project
- +40 lines added
- 477.2k GitHub stars
The project
REA (Reverse Engineer Anything) connects coding agents such as Claude Code, Codex and Cursor to reverse engineering tools, which also work straight from the terminal. With it, an agent can examine apps without their source code: native executables, JavaScript and Electron apps, .NET programs, Android apps and websites.
Analysis runs on the user's own machine, and every answer carries the evidence and limitations behind its conclusion. The agent uses those results to ask follow-up questions, explain the behavior, or write and test an equivalent implementation. Published case studies include tracing how Notion handles the clipboard and rebuilding calculations from older games out of their original binaries.
How each PR was made
-
One problem per PR
Each PR fixes a single thing with the smallest possible change. That keeps reviews simple, lowers the risk of side effects and lets one change be reverted without taking others with it.
-
The problem becomes a test
Fixes come with automated tests that cover the case that used to fail, so the problem cannot come back unnoticed.
-
The project's own bar
Formatting, static analysis and the full test suite run in the project's continuous integration, and a change only lands after the maintainer's review.
-
Written for the reviewer
Each PR description explains the problem, the change and how it was tested, so the maintainer can decide with confidence.
Every PR, in business terms
Click a PR to see the problem, what was done and the value delivered. The link at the end of each one leads to the full technical discussion on GitHub.
-
#7360merged Nov 9, 2026 Native data type command validates options before opening the binary The data type inspection command accepted empty or conflicting options before opening the target binary, masking validation errors; the PR proposes validating the option choice immediately at admission.
- The problem
- Inspecting native data types and structures via the command line requires supplying either a type category path or a native address. Because the command forwarded its arguments directly to the analysis routine without upfront validation, the target binary was prepared before verifying the selectors. If the target did not exist or both selectors were missing, conflicting or empty, the command returned a target unavailable error instead of pointing to the malformed input, and spent time opening valid targets before failing.
- What was done
- The PR proposes validating the arguments at the command line adapter layer against the native schema before invoking analysis, immediately returning the canonical invalid request error. The command and option descriptions were updated to clarify that exactly one selector must be provided, and boundary tests ensure missing, empty or conflicting options are rejected prior to any file access.
- Value delivered
- Avoids opening files unnecessarily and returns actionable errors for malformed command line invocations right at admission.
-
#7139merged Nov 4, 2026 Command-line guide documents reading JSON requests from standard input The tool already accepted a dash in place of the file to read a JSON request from standard input, but the guide only showed file usage; it now explains the form, gives an example and lists the limits.
- The problem
- Since an earlier change, every rea command-line argument that accepts inline JSON or a file path also reads the request from standard input when given a dash. That change's acceptance criteria asked for per-command documentation, but none was written: the guide showed only the request file, and a search for standard input found only the note about signals. Anyone generating a request with another tool needed a temporary file without knowing it could be skipped, and did not know the 8 MiB limit or the refusal of a byte-order mark.
- What was done
- The guide gained a passage right after the request-file example, with an example piping jq output into the analysis view inspection command, and the list of limits: read once, a single UTF-8 JSON document, no byte-order mark, up to 8 MiB, with larger requests in a file. Every statement was checked against the code that handles the input.
- Value delivered
- Automations and agents can pipe requests to the tool without temporary files, knowing the limits up front.
-
#7058merged Oct 24, 2026 Markdown output no longer produces an invalid table for lists of empty objects When formatting a list of objects with no fields as Markdown, the command line produced a table with no columns, invalid for readers of the format; those lists now come out as JSON, like other non-tabular values.
- The problem
- The rea command line can deliver its results as Markdown, and lists of objects become tables. A list whose objects have no fields at all was classified as tabular, but the header list came out empty and the routine built a table with a blank header row and a delimiter row with no separators. In GitHub Flavored Markdown a table needs at least one column with a valid delimiter, so the result was broken markup.
- What was done
- The tabular-list check now requires at least one object with fields, and table rendering gained two guards: with empty headers the value is serialized as JSON, and a table with no columns is never emitted. Automated tests at both command-line output points cover lists of one and two empty objects, including one nested in a section.
- Value delivered
- Reports generated by the tool stay readable in any Markdown reader, with no broken markup in edge cases.
-
#6959merged Oct 24, 2026 Regex search cancellations preserve caller abort reasons in binary analysis Cancelling procedure and string searches discarded the abort reason; the cancellation error now forwards the caller cause to the interface.
- The problem
- During binary reverse engineering, analytical tools execute regular expression searches across compiled code to locate procedures, text strings, and symbol references. When cancelling an ongoing search due to a user action or timeout, the matching engine discarded the original abort reason object when constructing the typed error. As a result, integrated disassembly clients received generic cancellation notices without causal details, hindering session diagnostics and automation tracing.
- What was done
- Both the pre-execution check and the background worker abort listener now populate the error cause with the exact reason supplied by the caller signal. New automated boundary tests verify that cancellations triggered prior to execution or while matching is underway retain the exact reason object.
- Value delivered
- Ensures transparent diagnostics and complete session traceability across binary analysis and disassembly pipelines.
-
#6153merged Oct 22, 2026 Objective-C class analysis no longer hides that the search was cut short When an agent asked REA to examine references to Objective-C classes with an empty address list and flagged that the list came from an interrupted search, the answer said the analysis had not even been requested and lost the flag; the PR proposes keeping the coverage as partial, with the reason.
- The problem
- REA reports, alongside each result, how much of the analysis was actually covered, so the AI agent knows whether it can treat the answer as complete. One of its tools examines, in Mac and iPhone executables, the references a program makes to Objective-C classes from other libraries, based on a list of candidate addresses and a flag saying whether that list is complete or was cut by the record limit. With one address in the list and the cut flag, coverage correctly came back as partial, with the reason. With an empty list and the same flag, the tool answered that the analysis had not been requested, with no reason and zero addresses examined, and the interrupted search was indistinguishable from a complete request with nothing to examine. The case was reported with real calls to the REA server.
- What was done
- The proposed fix treats as not requested only an analysis with no list or with an empty list declared complete. An empty list declared incomplete now comes back as partial coverage, with the existing record-limit reason and zero addresses examined, as the tool's own documentation already stated. A new test covers both empty-list cases, incomplete and complete, and the project's continuous integration passed with the change.
- Value delivered
- With the change, the agent using REA still knows the analysis was incomplete and does not take an interrupted search for the conclusion that there was nothing to find.
-
#6152merged Oct 22, 2026 Single-architecture Mac executables without a false integrity error on extraction When extracting the contents of a Mac executable built for a single processor type, REA reported an integrity error that did not exist and suggested a retry that failed the same way; the PR proposes the same clear refusal that other formats without extraction already get.
- The problem
- Mac executables can bundle builds for several processors in one file, the universal ones, or carry the build for just one. REA has two operations on these files: the inventory, which lists what is inside, and the extraction, which writes that content to disk. For a single-processor executable, the inventory correctly recorded only the file itself, with no inner parts, but the extraction treated it as universal and created a part the inventory had never recorded. The extraction then reported that the bytes contradicted the declared integrity, although the file had not changed, and recommended retrying with a more lenient integrity policy, which returned the same failure. The case was reported with a copy of the macOS echo command reduced to its Apple Silicon build.
- What was done
- The proposed fix makes the extraction treat as universal only what the inventory also treats as universal. A single-processor executable gets the same clear refusal that other formats without an extraction reader already get, before any inventory or writing to disk, without claiming corruption or suggesting a useless retry. Executables of this kind that carry an embedded package, such as Python programs packed into a single file by PyInstaller and games made with Godot, stay extractable, as already happens with Linux and Windows executables. Two new tests cover the refusal, with no output folder created, and the extraction of an embedded package.
- Value delivered
- With the change, anyone analyzing Mac executables with REA gets a truthful answer about what extraction supports, instead of a false alarm about a corrupted file and a recommendation that does not help.
-
#4646merged Oct 22, 2026 REA no longer mistakes an HTML reference to a folder for a file When analyzing a JavaScript app, REA linked a folder-form HTML reference, such as worker.js/, to the file worker.js, even though the address points to a directory; the PR proposes leaving it unresolved, with the limitation explained.
- The problem
- When examining a JavaScript app, REA links each reference found in the HTML, such as a script address, to the matching app file. Folder-form addresses, ending in a slash, in /. or in /.., were normalized and ended up linked to the file with the same name, even though under web address rules they point to a directory. URL and module references already handled these cases correctly, but HTML ones, relative to the root, to the document or to a declared base, did not.
- What was done
- The PR proposes applying to HTML references the same exact-address check the other references already use: in folder form, the reference stays as not found, with the explanation that it points to a directory and not to an app file. The folder-form tests now cover HTML references, with and without a declared base.
- Value delivered
- With the change, the evidence REA delivers no longer attributes to a file a reference that, on the web, does not point to it, and the app analysis stays true to what would actually be loaded.
-
#4645merged Oct 21, 2026 Partial evidence from an IDA failure keeps the analysis profile used When an IDA operation failed after collecting part of the data, REA's partial evidence came without the session's analysis profile, which successful operations recorded; the PR proposes keeping it on failures too.
- The problem
- In REA, every result comes with the evidence behind it, including the analysis profile, the configuration the IDA session was opened with, so it is known under which conditions the conclusion was reached. When an operation failed partway, REA still delivered what it had observed, but that partial evidence came out with an empty profile even though the session had one. The provenance record was lost precisely in the results that call for the most care in interpretation.
- What was done
- The PR proposes passing the session profile also when building the evidence of a failed operation, as was already done for successful ones; sessions opened without a profile still report an empty profile. A new test simulates the failure of a function inspection with a profile set and checks the profile in the partial evidence and in the error details, plus the case without a profile.
- Value delivered
- With the change, anyone analyzing a partial REA result knows which configuration produced it and can reproduce or compare the analysis with confidence.
-
#4286merged Oct 21, 2026 REA no longer claims a path does not exist without seeing everything When IDA listed called functions without saying whether the list was complete, REA treated it as complete and concluded that the target function was unreachable; the PR proposes marking this case as unknown.
- The problem
- REA traces call paths in a binary, answering whether one function reaches another, and to do so asks IDA for the list of functions each one calls. IDA states whether the list was cut short, but when an answer came without that statement, REA considered it complete. A trace to a function outside the list therefore ended as not reached, a definitive negative conclusion with no open question recorded, even though the evidence was incomplete.
- What was done
- The PR proposes that a missing cut-off statement yield unknown coverage, with the reason recorded, while keeping the calls actually observed; a list declared complete stays complete, and a cut list stays partial. New tests check the unknown coverage with its reason and that a trace to an unlisted function now ends as unknown, with the open question pointed out.
- Value delivered
- With the change, anyone investigating a binary with REA no longer gets a definitive no backed by incomplete data, in line with the tool's promise to show the limitations behind each conclusion.
-
#2321merged Oct 13, 2026 Guaranteed CLI exit even on incomplete child process cleanup When operating system permissions block child process inspection, REA's CLI could hang indefinitely with an open event loop; the fix unreferences process handles and closes workers.
- The problem
- During binary inspection or JavaScript worker execution in REA, if child process cleanup reported uncertainty (for instance, when process table inspection was denied by the OS due to privilege boundaries), process and stdio handles remained referenced. This prevented the Node.js runtime from closing its event loop, causing the CLI tool to hang indefinitely in terminal sessions and automated AI pipelines after emitting its error report.
- What was done
- In the process supervisor and JavaScript analysis workers, the fix explicitly unreferences process handles (unref), ends standard input streams, and terminates workers even during incomplete cleanup, adhering to fail-closed safety (avoiding signaling unverified process groups) while ensuring deterministic CLI completion. Process supervision and boundary tests were added.
- Value delivered
- Ensures AI agents, automated workflows, and continuous analysis pipelines never hang waiting on REA's CLI, even in hardened environments with strict process inspection constraints.
-
#2292merged Oct 13, 2026 macOS dynamic library resolution with folder isolation for plugins When tracing dependencies in modular macOS apps, REA reused libraries by install name even for loader-relative paths; the fix limits that reuse to @rpath and resolves relative paths from each loader's own directory.
- The problem
- When reverse engineering macOS (Mach-O) applications with multiple plugins, REA resolved dynamic library dependencies by reusing already-loaded images based solely on their install name, even when a dependency used loader-relative paths (@loader_path/). If one plugin loaded a helper library from its directory, another plugin in a different folder mistakenly reused that same image, or generated a false-positive resolution when its own directory lacked the file on disk.
- What was done
- The fix restricts instant reuse by install name to @rpath/ requests only. Dependencies using @loader_path/ now evaluate their search candidates from each loader's own directory, preserving plugin isolation and correctly reporting missing dependencies when the target folder lacks them. The TypeScript test suite was expanded to cover isolated loader-relative dependencies.
- Value delivered
- With this change, AI agents and reverse engineers obtain the true dependency graph of modular macOS software, avoiding false positives and ensuring missing libraries are accurately reported.
-
#1984merged Oct 11, 2026 Regression test for Android class search on duplicate class inventories Following alignment with main after duplicate preservation and duplicate_names reporting landed upstream, the PR proposes regression assertions verifying that empty discovery queries on duplicate inventories work reliably without failing.
- The problem
- To examine an Android app, REA uses a decompiler that lists the package's classes page by page. In large apps split across multiple DEX files, class names can appear more than once. Once main was updated to preserve duplicates in the inventory, regression proof was needed to ensure empty discovery queries also handle duplicate inventories stably and return the right counts.
- What was done
- The PR adds assertions to the integration test suite covering duplicate class inventories for both empty and filtered queries, verifying that the total loaded class count is preserved and matches are returned predictably.
- Value delivered
- With the change, the test suite guards class discovery on empty queries against future regressions, giving maintainers confidence that further changes won't break class listing on large apps.
-
#1983merged Oct 11, 2026 REA setup for Hermes works with an empty config file The command that connects REA to the Hermes agent failed when Hermes's config file existed but was empty, a common first-run state; the PR treats it like a new file.
- The problem
- REA's setup command registers the tool in the configuration of each supported AI agent. For Hermes, an empty config file, a common state right after the first run, was read as malformed configuration and setup ended in failure. Uninstall, update maintenance and the shared configuration reader rejected the same file.
- What was done
- The proposed fix applies the empty-file rule, which already covered agents configured in JSON, before reading the Hermes file, so it is configured as if it did not exist. Other formats behave as before, and new tests configure empty and newline-only files and check what gets written.
- Value delivered
- With the change, anyone setting REA up for Hermes completes the configuration on the first try, as already happened when the file did not exist.
-
#1982merged Oct 11, 2026 Universal Mac apps read without a false integrity error When opening universal Mac apps, which hold Intel and Apple Silicon builds in one file, REA could report an integrity error that did not exist; the PR makes it read the Intel part correctly.
- The problem
- Universal Mac apps bundle an Intel build and an Apple Silicon build in a single file. When the Intel part carries a capability flag that is common in these executables, REA misread the description printed by Apple's tool, could not find the matching part in the file and reported an integrity failure. The case was observed with Sublime Text on macOS 26.
- What was done
- The proposed fix reads the capability flag Apple's tool prints, whether named or in hexadecimal, and when the flag is missing it matches the parts by name, processor type, position and size. New tests cover the flag formats and a universal file whose read fails on the current version.
- Value delivered
- With the change, anyone analyzing Mac apps with REA gets both builds of the program listed instead of a false alarm about a corrupted file.
-
#1981merged Oct 11, 2026 Valid WebAssembly modules analyzed instead of rejected REA's WebAssembly analysis rejects a valid module when one of its section names contains a null character; the PR makes it analyze the module normally. Validated with WABT and the test suite on Linux.
- The problem
- REA uses a set of external tools to examine WebAssembly modules and checks what one of them displays against what another decodes. When the name of a custom section contains a null character, which the format allows, the display cuts the name at that point and the comparison fails. The module, which is valid, comes back as "unreadable output" instead of producing the evidence report.
- What was done
- The proposed fix compares the displayed line with the decoded name only up to the first null character, the same rule the project already applies to module names since PR #1967. The other format, count and position checks on sections still apply, and a new test covers the case while still rejecting names that differ before the null character.
- Value delivered
- With the change, anyone analyzing a WebAssembly binary with this kind of name gets the evidence report instead of an error, without opening a gap: a forged name still cannot pass for another one.
-
#1925merged Oct 11, 2026 Invalid file paths rejected at the point of entry The PR makes binary analysis tools reject file paths containing characters no operating system accepts as soon as they arrive, with a clear error. Formally approved by project maintainers in source review.
- The problem
- REA takes requests from AI agents to analyze files. The tools that examine Windows executables, Linux binaries and crash recordings, WebAssembly modules and Ethereum smart contracts accept paths containing a null character, which no operating system allows in file names. The request passes the input check and only fails further in, at the disk or in external programs, with generic messages or ones that miss the real cause.
- What was done
- The proposed fix applies to these tools the same input rule other REA tools already follow: a path with a null character is turned away on arrival, with a clear message naming the offending field. The PR extends the input-rule tests to every changed field, and independent testing during review showed responses identical to before for valid paths.
- Value delivered
- Formally approved in source review by project maintainers (APPROVE verdict). With the change, the AI agent gets an error it can understand and fix, and no disk access or external program is triggered with an invalid path.
Other merged PRs 2 PRs
Not yet described in detail on this page; the title is the one on GitHub.
Other PRs under review 1 PR
Not yet described in detail on this page; the title is the one on GitHub.
- #14136 opened Nov 23, 2026 fix(devicetree): read later FDT versions backwards compatible with v17
Figures updated on Nov 24, 2026.
The same care in your system
The habits behind these PRs carry over to backends that move money: reproduce the problem before fixing it, prove the fix with a test and keep sensitive data from leaking.