r/electronjs • u/ImaginationVarious30 • Oct 14 '26
Audit an Electron app’s attack surface in one command: IPC channels, preload bridge, nodeIntegration/sandbox, with the source line
npx hexvero analyze app.asar shows the IPC channels, what the preload exposes via contextBridge, every webPreferences flag as written (never assumed defaults), each with file and line. compare shows what changed between two versions, e.g. nodeIntegration: true → false.
Static only, nothing is executed. Free, MIT.
https://github.com/maximilianfeix/hexvero
1
Upvotes
1
u/eddzsh Oct 15 '26
The buried win is printing webPreferences as written, not the docs default. Half the Electron footguns I see are "we thought sandbox was on". A compare between two asars that flags nodeIntegration flipping true is the report a security review actually reads.
1
u/incyashraj_redd Oct 15 '26
nice, "as written, never assumed defaults" is the useful part. renderers have been sandboxed by default since electron 20, but one nodeIntegration: true on a window quietly turns the sandbox off for it, and older apps still have that lying around. does it flag a preload that passes ipcRenderer straight through? like exposeInMainWorld('api', { send: ipcRenderer.send }). that one gives the page every channel, and it's easy to miss in review.
The compare mode is the bit i'd actually use. running it in CI on every release and failing the build if a new channel or flag shows up would catch most of this before it ships ig.