Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    electron-ai-agent-security-v2

    View as Markdown

    7 rules · Keryn Software Licence · rules 0.8.0 · all packs

    How to read a rule
    Severity
    How bad the finding is if it is real: error fails a default gate, warning and info do not.
    Confidence
    P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
    False-positive risk
    low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
    Edge
    The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
    Taxonomy chips
    References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

    seceng.electron.nodeintegration-enabled-ai-app

    Section titled “seceng.electron.nodeintegration-enabled-ai-app”

    warning typescript, javascript electron

    Electron BrowserWindow enables nodeIntegration in an AI/agent app context. This increases impact of prompt-mediated XSS or renderer compromise.

    Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: grants authority is given or left unchecked.

    CWE-79 LLM05 LLM06 ASI05 ASI02

    seceng.electron-context-isolation-disabled-ai-app

    Section titled “seceng.electron-context-isolation-disabled-ai-app”

    warning typescript, javascript electron

    Electron BrowserWindow disables contextIsolation in an AI/agent app context.

    Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: grants authority is given or left unchecked.

    CWE-653 LLM05 LLM06 ASI02

    warning typescript, javascript electron

    Electron IPC handler executes shell command from event/model/tool arguments without visible validation or approval.

    Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: calls one thing invokes another; it crosses the model->code boundary (model output reaching code, a shell, a query or a page).

    CWE-78 LLM06 ASI05 ASI01 ASI02

    warning typescript, javascript electron

    Electron IPC handler reads or writes file path from renderer/model/tool arguments without visible path validation.

    Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-22 CWE-73 LLM02 LLM06 ASI02

    warning typescript, javascript electron

    Electron IPC handler fetches URL from renderer/model/tool arguments without visible allowlist.

    Confidence P2: a heuristic or a posture check: confirm by reading the code. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-918 LLM06 ASI02

    seceng.electron-preload-exposes-ai-tool-api

    Section titled “seceng.electron-preload-exposes-ai-tool-api”

    warning typescript, javascript electron

    Electron preload exposes AI/tool API broadly through contextBridge. Verify channel allowlists and argument validation.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-749 LLM06 LLM07 ASI02

    seceng.electron-renderer-ai-output-to-shell-openexternal

    Section titled “seceng.electron-renderer-ai-output-to-shell-openexternal”

    warning typescript, javascript nextjs, electron

    AI/model output appears to control Electron shell.openExternal or navigation without visible URL validation.

    Confidence P1: dangerous in context. False-positive risk high: it finds a lead to confirm, so expect benign hits.

    Edge inspected: reaches content or traffic gets to a thing; it crosses the user->prompt boundary (untrusted input reaching a prompt).

    CWE-601 LLM05 LLM06 ASI05 ASI02