electron / electron/devtron

Intercept and track `MessagePort` traffic

Open
#301 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.8k
Forks
110
Avg merge
1h 54m
Merged PRs (30d)
7

Description

The current electron documentation suggests implementing communication between the main world and context isolated renderer worlds via `MessageChannel`s / `MessagePort`s[^1].

However, this extension isn't really helpful if we apply the above advice as all relevant IPC traffic does not flow through the `ipcMain` / `ipcRenderer` interfaces.

Therefore I suggest additionally tracking all `MessagePort` instances which have been transferred through the relevant ipc interfaces. This would require either intercepting the `postMessage` calls or the `message` events.

[^1]: https://www.electronjs.org/docs/latest/tutorial/message-ports#communicating-directly-between-the-main-process-and-the-main-world-of-a-context-isolated-page

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.