Логотип Auditing Electron Ipc Trust

Auditing Electron Ipc Trust

Организация
UnboundCompute
auditing-electron-ipc-trust

Проверьте, может ли недоверенное содержимое рендерера в настольном приложении Electron получить доступ к возможностям Node или операционной системы после определения настроек webPreferences и поверхности моста preload. Проверяйте, включён ли nodeIntegration при выключенном contextIsolation; не предоставляет ли preload прямой доступ к ipcRenderer или универсальную передачу вызовов; не доверяет ли обработчик ipcMain входным данным рендерера, когда они используются как путь, команда или URL; не загружается ли удалённое или контролируемое злоумышленником содержимое через loadURL при незаблокированной навигации; не вызывается ли shell.openExternal со строкой, контролируемой рендерером; не направляется ли пользовательский протокол или deeplink на привилегированное действие без проверки. Используйте этот навык при проверке webPreferences, поверхности preload и contextBridge, обработчиков IPC и загрузки удалённого содержимого. Он не охватывает внедрение разметки на стороне рендерера — этим занимается навык client-side DOM. Источник — недоверенное содержимое рендерера, точка приёма — возможность Node или операционной системы; ошибка — передача входных данных через мост без проверки при отключённой изоляции.

Обзор

ИздательUnboundCompute
Репозиторийsecurity-agent-skills
Название навыкаauditing-electron-ipc-trust
Звёзды
27
Форки
8
Файлы в комплекте
Только инструкции
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — UnboundCompute. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Auditing Electron Ipc Trust в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-electron-ipc-trust
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-electron-ipc-trust .claude/skills/auditing-electron-ipc-trust
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Auditing Electron Ipc Trust в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Auditing Electron Ipc Trust, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Auditing Electron Ipc Trust не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Auditing Electron IPC trust: when renderer content reaches a native capability

An Electron app is dangerous where content in a renderer, whether remote, injected through a cross-site-scripting, or arriving over a custom protocol, reaches a Node or operating-system capability. The marquee chain is a renderer bug escalating to code execution because the renderer can require Node directly, or because the preload bridge hands untrusted input to a native call. You audit it by resolving, per native sink, whether context isolation and the sandbox stand between the renderer and Node and whether the preload and IPC surface validate what they pass. The single most important false-positive killer is that context isolation and the sandbox being on make an otherwise alarming exposed symbol harmless, so resolve those two settings before judging any bridge. Renderer-side markup injection itself belongs to the client-side DOM skill; this skill owns the bridge and the IPC substrate.

When to use

  • You are reviewing an Electron app's window configuration, its preload scripts, and its IPC handlers.
  • You see webPreferences, a contextBridge exposure, an ipcMain handler, or a loadURL or openExternal call.
  • You want to know whether untrusted renderer content can reach a Node or operating-system capability.

Scope check

Audit only apps you own or are authorized to assess, and drive a renderer-to-main path only against a build in scope, an IPC handler that reaches a shell or the filesystem acts on your host. Adjudicate on the window configuration and the handlers. If you can't name the authorization, stop.

The loop

  1. Resolve context isolation and the sandbox first. Read the webPreferences for each window: is nodeIntegration off, is contextIsolation on, is the sandbox on. These settings decide whether the renderer can reach Node at all, so an exposed require or a Node symbol is only exploitable when they are off. Settle them before judging any exposed surface, because they are the killer for most leads.

  2. Check node integration and isolation. Look for nodeIntegration enabled with contextIsolation off, which lets any renderer, including one hosting an attacker's script, require a Node module such as the child-process module and execute a command directly.

  3. Check the preload bridge surface. Look for a preload that exposes the raw ipcRenderer object, or a generic invoke-any-channel passthrough, or the filesystem or child-process modules over the contextBridge. A bridge that hands the renderer an open channel to every IPC handler, rather than named argument-typed functions, gives the renderer the whole main-process surface.

  4. Check the IPC handlers. Look for an ipcMain handler that trusts renderer-supplied input as a filesystem path, a command, or a URL (path traversal, argument injection, server-side request forgery) without validating it against an allowlist or a normalized base.

  5. Check remote content, navigation, and protocol handlers. Look for loadURL or loadFile pointed at remote or attacker-influenced content, navigation left unlocked (no will-navigate or window-open guard), shell.openExternal called on a renderer-controlled string (a file or protocol URL reaching a local handler), and a custom protocol or deeplink routed into a privileged action without parsing and validating the URL.

  6. Confirm and record. Confirm by showing renderer-reachable content drives a Node or operating-system sink, because isolation or the sandbox is off, or because the preload or IPC surface passes untrusted input to a native capability. Kill the lead if contextIsolation and the sandbox are on so an exposed require or Node symbol is unreachable from the renderer, if the preload exposes only named typed functions over the contextBridge with no raw ipcRenderer and no filesystem or child-process module, if the IPC handler validates or normalizes the path or allowlists the channel and action, if the renderer only ever loads bundled local content and navigation is locked, if the openExternal argument is a constant or scheme-allowlisted to a safe scheme, or if the app runs a current Electron with the sandbox on by default and no legacy remote module. Record the renderer source, the native sink, and the settings that gate the path.

Where IPC trust leaks

  • Isolation and the sandbox are the killer, so resolve them first. With contextIsolation and the sandbox on, an exposed require or Node symbol is harmless; with them off, a renderer bug reaches Node.
  • A raw ipcRenderer bridge exposes every handler. Handing the renderer the raw object or a generic invoke passthrough gives it the whole IPC surface; named typed functions expose only what you intend.
  • An IPC handler that trusts a renderer path is a native sink. Renderer-supplied paths, commands, and URLs must be validated in the main process; the renderer is the untrusted side of the bridge.
  • Remote content in a renderer is the on-ramp. loadURL of remote content, or unlocked navigation, puts attacker-influenced script one bug away from the bridge; bundled local content with locked navigation does not.
  • openExternal and custom protocols route to the OS. A renderer-controlled string handed to openExternal or a deeplink handler reaches a local protocol handler; the argument has to be validated or scheme-allowlisted.

Worked example (a confirm and a kill)

Confirm. A window is created with nodeIntegration on and contextIsolation off, and it loads a remote page for a live feature. A cross-site-scripting in that page runs require('child_process').exec with an attacker command. Confirmed renderer-to-Node code execution through a non-isolated window loading remote content, critical, remediation = enable contextIsolation and the sandbox, disable nodeIntegration, expose only named typed functions over a preload bridge, and stop loading remote content in a privileged window.

Kill. Another window has contextIsolation and the sandbox on, nodeIntegration off, and a preload that exposes a single readConfig() function returning a fixed file's contents; no raw ipcRenderer, no child-process or filesystem module crosses the bridge, and it loads only bundled local content with navigation locked. A renderer bug reaches no Node capability. Killed, kill_reason = "context isolation and the sandbox are on, the preload exposes only a typed read function, and no untrusted input reaches a native sink."

Rationalizations to reject

  • "We expose require, but it is behind the bridge." -> Are contextIsolation and the sandbox on? With them on, the renderer cannot reach that require; with them off, the bridge is not a barrier.
  • "The preload just forwards IPC." -> Forwarding raw ipcRenderer or a generic invoke exposes every handler; expose named typed functions, not an open channel.
  • "The handler takes a path from the renderer." -> Then validate it in the main process; the renderer is untrusted, and an unvalidated path is traversal or argument injection.
  • "It only opens a link." -> With openExternal on a renderer-controlled string, a file or protocol URL reaches a local handler; constant or scheme-allowlist the argument.
  • "It is our own deeplink." -> Is the URL parsed and validated before it drives an action? An unvalidated custom-protocol route is the desktop analogue of an open redirect into a privileged call.

Executing this in practice

You need each window's webPreferences (nodeIntegration, contextIsolation, sandbox), the preload scripts and exactly what they expose over the contextBridge, the ipcMain handlers and what they do with renderer input, the loadURL and loadFile targets and the navigation guards, and the openExternal and custom-protocol handlers. For each native sink, decide whether isolation and the sandbox gate the renderer and whether the bridge validates what it passes. Reading webPreferences tells you whether the barrier is up; reading the preload and handlers tells you what crosses it.

Related

  • auditing-browser-extension-trust - the browser-extension sibling with the same untrusted-content-to- privileged-capability shape, across a message boundary rather than the Electron preload bridge.
  • auditing-editor-extension-workspace-trust - the editor-extension sibling, where the untrusted source is a cloned workspace rather than renderer content.
  • auditing-mobile-deeplink-trust - the mobile analogue of the custom-protocol and deeplink bug shape; the parsing logic rhymes, the Electron IPC and native substrate is owned here.
  • FINDING-SCHEMA.md - source = untrusted content in a renderer, sink = a Node or operating-system capability, evidence = the isolation and sandbox settings, the bridge surface, and the input crossing to the native call.

Часто задаваемые вопросы

Что делает навык ИИ Auditing Electron Ipc Trust?

Проверьте, может ли недоверенное содержимое рендерера в настольном приложении Electron получить доступ к возможностям Node или операционной системы после определения настроек webPreferences и поверхности моста preload. Проверяйте, включён ли nodeIntegration при выключенном contextIsolation; не предоставляет ли preload прямой доступ к ipcRenderer или универсальную передачу вызовов; не доверяет ли обработчик ipcMain входным данным рендерера, когда они используются как путь, команда или URL; не загружается ли удалённое или контролируемое злоумышленником содержимое через loadURL при незаблокиро...

Зачем использовать Auditing Electron Ipc Trust в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Auditing Electron Ipc Trust — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Auditing Electron Ipc Trust в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-electron-ipc-trust. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Auditing Electron Ipc Trust?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Auditing Electron Ipc Trust?

С любым количеством. В TypingMind вы можете использовать Auditing Electron Ipc Trust с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Auditing Electron Ipc Trust?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — UnboundCompute. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇