You may have wondered where a desktop app you use stores its files, or through what channel it passes data between windows.
Without the source code, that is usually where you stop.
Fortunately, an Electron app ships bundled JavaScript as is rather than machine code, so you can read its structure without a decompiler engine.
In this post I statically analyze a public Electron sample with REA and check directly how well the results match the real source.
Static analysis is a way of understanding a program's structure by reading its files without running it.
The target is the official sample electron/electron-quick-startโ, fetched at commit 54cbebf2f3a831edb72c6fc31ed9a602df453e69.
The commands in this post are written so you can follow along by copying and pasting them from top to bottom.
๐จโ๐ป
The lab environment, as of November 23, 2026, is macOS 26.3.1 (arm64), Node 26.13.0, rea-agents 6.10.1, and Electron 45.3.1.
All output and screenshots in this post come from running things myself in this environment.
Field names and numbers may differ as versions change.
.
You can only judge a tool's accuracy if you can compare REA's results directly with the original source.
If you start with an app whose source you cannot see, there is no way to tell whether the results are right or wrong.
To analyze a commercial app, first check its EULA (end user license agreement).
REA's DISCLAIMERโ also states that
being publicly available does not mean you have permission to analyze it
.
Permissions and legal issues will be covered separately in this series.
Create a working folder separate from your blog or other project folders.
์์ ํด๋ ๋ง๋ค๊ธฐ
mkdir -p ~/rea-lab && cd ~/rea-lab
๐
The reason to fetch the target into ~/rea-lab, outside the project folder you are working in, is to keep configuration files inside the target from affecting the agent or package runner.
REA's installation guideโ also says to fetch REA from a trusted directory outside the target project.
Part 9 explains this reason again.
Installing rea-agents and checking its status ๐
Before installing, I first checked that the package points to the official repository.
Some of the commands below use jq (a command line tool for filtering JSON), so if you do not have it, install it first with brew install jq on macOS.
On Linux use your distribution's package manager, such as sudo apt install jq, and on Windows use winget install jqlang.jq.
However, the awk, column, and sed combinations in this post assume a POSIX shell, so on Windows it is easier to run them in WSL or Git Bash.
ํจํค์ง ํ์ธ
npm view rea-agents name version repository.url
Terminal window running npm view rea-agents, printing name rea-agents, version 6.10.1, and repository.url git+https://github.com/morluto/rea.git
The version was 6.10.1 and the repository URL was git+https://github.com/morluto/rea.git.
Install only after confirming that the name and repository URL match the official README.
์ค์น
npm install --global rea-agentsrea --version
Log of npm install --global rea-agents: a prebuild-install deprecated warning, a warning that the frida@17.23.2 install script is not in allowScripts, changed 43 packages in 8s, and rea --version printing 6.10.1
There was one warning worth noting in the install log.
It said the install script of the dependency frida@17.23.2 was not in npm's allowScripts setting and so was not run.
npm suggested allowing it with --allow-scripts=frida, but I did not allow it in this lab.
That is because it was
a script not needed for static analysis
.
On the first install the log said added 30 packages in 17s, and the screenshot was taken while reinstalling over an existing install, so it shows changed 43 packages in 8s.
Next is the status check.
The output is long, so I took it with --json and extracted only the names and classifications.
rea doctor (์ด๋ฆ๊ณผ ๋ถ๋ฅ๋ง)
rea doctor --json | jq -r '"healthy: \(.healthy)", (.scope_checks[] | [.name, .classification] | @tsv)' | column -t
rea doctor results. healthy false. node, host, and hopper are healthy; ghidra, ida-registration, jadx, and kuna-installation are missing_analysis_engine; skill:identity and 7 registration entries are config_drift; registration:codex is unknown
The result was healthy: false, and the exit code was 1 as well.
Node, the host, and Hopper came out healthy, while the Ghidra, IDA, JADX, and Kuna engines were not configured (missing_analysis_engine).
The agent client registration entries show config_drift because I did not run rea setup.
Even if the overall status is false, JS static analysis works without an engine
Before analyzing it, I ran the sample myself to see what kind of app it is.
You need to pin the commit when fetching it to see the same results as this post.
์ํ ๋ฐ๊ธฐ์ ์์กด์ฑ ์ค์น
cd ~/rea-labgit clone https://github.com/electron/electron-quick-start.gitcd electron-quick-startgit checkout 54cbebf2f3a831edb72c6fc31ed9a602df453e69npm install
Cloning the electron-quick-start repository, checking out commit 54cbebf (chore: bump electron from 45.3.0 to 45.3.1), and running npm install, which prints added 13 packages, found 0 vulnerabilities
The checked-out commit is chore: bump electron from 45.3.0 to 45.3.1.
npm install fetched 13 packages in under a second and found 0 vulnerabilities.
์ฑ ์คํ
npm start
Terminal after running npm start, showing the minimal-repro@1.0.0 start and electron . log lines and returning to the prompt after quitting the app with Cmd+Q
The first time you run npm start, it prints Downloading Electron binary... and downloads the Electron binary.
From the second run on, the window opens right away.
On macOS close the app with Cmd+Q, and on Windows and Linux close the window or press Ctrl+C in the terminal.
Electron app window titled Hello World! showing the text We are using Node.js 24.22.2, Chromium 156.0.8078.96, and Electron 45.3.1
The window shows We are using Node.js 24.22.2, Chromium 156.0.8078.96, and Electron 45.3.1.
If you remember that
the code that fills in this version string lives in preload.js
, the analysis results later will be easier to read.
A preload script runs before the page (renderer) opens and is Electron's connection point for handing the features the page needs over to it.
Running analyze-javascript-application on eqs-src prints exit=0, js-analysis.json 271K, 20 graph nodes, 26 edges, and node kinds artifact, browser-window, electron-main, electron-preload, electron-renderer, javascript-asset, javascript-module, package
The result is a JSON file of about 271KB (per ls -lh).
There are three main parts.
graph
The app structure graph.
In this lab it had 20 nodes and 26 edges.
summary
Summary figures from an Electron perspective.
semantic_graph
A detailed graph of functions and call relationships.
It contained 58 unknowns, meaning parts not yet resolved.
As a data structure, graph is a
directed graph
with files, windows, and modules as nodes and import and assignment relationships as edges.
So a question like "which window uses which preload" can be answered by a graph traversal that follows the edges.
๐
If you run it as is on the electron-quick-start folder after npm install, it analyzes node_modules too.
That result was 196MB, with 2,547 nodes and 4,840 edges.
If you only want to look at the app code, most of that is noise, so it is better to pass a folder without node_modules.
View summary and the statistics with the following command.
The statistics show it found 6 relevant files, parsed 3 JavaScript files among them, and had no parse failures.
It read 9,183 bytes of text, visited 160 AST nodes, and produced 9 findings.
An AST (abstract syntax tree) is a data structure that breaks code into grammatical units and represents it as a tree.
The graph node kinds included electron-main, browser-window, electron-preload, electron-renderer, and javascript-module.
What stands out is that
it shows Electron's three boundaries, main, preload, and renderer, separately
Lines 7 to 16 of main.js with new BrowserWindow (width 800, height 600, webPreferences.preload) and loadFile('index.html'), a grep result matching one contextBridge guidance comment on line 5 of renderer.js, and the full preload.js that puts process.versions values on the page
All three are there as described.
Lines 7 to 16 of main.js create an 800x600 window, specify preload.js, and load index.html.
grep matched one line, line 5 of renderer.js, which is a
comment
suggesting the use of contextBridge.
Here matches=0 is grep's exit code 0, which means a matching line was found.
There is no code that actually uses ipcMain, ipcRenderer, or contextBridge.
preload.js only reads process.versions and shows the versions on the page, and the sentence seen in the app window comes from here.
In this sample, the structure REA found matched the real source.
That said, you should not overrate this result.
The sample is very small and has no IPC, so there is little room to get it wrong in the first place.
REA also lists limitations alongside its results.
Here are some of the graph's limitations.
JavaScript and HTML were parsed as text without being executed.
Static imports and entry points are not evidence that they actually run.
Dynamic or obfuscated expressions may leave paths and relationships unresolved.
Not finding something does not mean it is absent.
Of these, keep the last one in mind.
"0 IPC operations" means "none" only when you can confirm it against the source, and for an app without source it only means "not found statically."
REA does the tracing quickly, but
the verification that decides whether to trust the results is up to a person
.
I did not cover rea trace-application-feature, which has an agent trace a feature in natural language, or the MCP integration step in this post, because they require rea setup, which changes client registrations.
The command formats are documented in the official CLI guideโ.
Checking a release with the release exposure audit ๐
There is also a feature you can use right away on the defensive side.
rea audit-release-exposure checks whether a release leaks source maps, secrets, or debug information.
I ran it on the same source folder.
audit-release-exposure results: exit=0, a list of the ids and statuses of 15 checks, and counts by status exposed 0, not_observed 3, not_applicable 3, unknown 6, not_assessed 3
The summary results are as follows.
Status
Count
exposed
0
not_observed
3
unknown
6
not_applicable
3
not_assessed
3
The not_observed items were secret markers (text.credential_markers), extractable payloads, and native debug files.
The unknown items are 2 for source maps and 4 related to Electron fuses.
The fuse items are unknown because
it was a source folder before packaging, so there was no ASAR file
.
ASAR is the archive format that bundles an Electron app's source into one file for distribution, and fuses are security switches baked into the release binary.
This audit
is most meaningful when run on a packaged release.
The examples in the CLI guideโ also target a .app, an install directory, an ASAR, or an executable, and adding --fail_on high returns exit code 3 when there is an exposure at or above that severity.
In CI you can fail the build on this exit code.
๋ฐฐํฌ๋ณธ ๊ฐ์ฌ์ CI ์คํจ ๊ธฐ์ค (ํ์)
rea audit-release-exposure ./dist/MyApp.app --fail_on high --json
๐
unknown and not_assessed items do not affect the exit code.
REA also writes in the report that "this report only states what static analysis found and does not mean the app is safe."
Do not read 0 exposed items as a guarantee of safety.
On a small Electron sample, REA accurately found the relationships between main, preload, and renderer, and it listed limitations and unknowns alongside every result.
Here is what this lab confirmed.
You can get a structure graph of a JS or Electron app right away without an engine.
Pass a folder without node_modules so the results focus on the app code.
"Not found" and "absent" are different, so read results you cannot check against the source together with their evidence and limitations.
Run the release exposure audit on a packaged release, and set a threshold with --fail_on in CI.
In the next post I analyze a native binary written in C with the Ghidra backend.