Skip to main content
Glama

electron_audit_security

Read-onlyIdempotent

Audit an Electron app's static inputs against the official security checklist, detecting misconfigurations like nodeIntegration, contextIsolation, sandbox, CSP, and IPC sender validation.

Instructions

Audit an Electron app against the official security checklist. Covers 19 of the items that can be detected from static inputs (BrowserWindow configuration, main process code, package.json, preload, HTML): HTTPS-only content, nodeIntegration, contextIsolation, sandbox, webSecurity, CSP, allowRunningInsecureContent, experimentalFeatures, enableBlinkFeatures, raw ipcRenderer exposure, direct window assignment, @electron/remote, supported Electron version, shell.openExternal validation, file:// usage, tag, will-navigate handler, setWindowOpenHandler, and IPC sender validation. The remaining checklist items (session permissions, fuse configuration) require runtime / packaging context and are flagged in the report's footer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "electron_audit_security"
  }
}

Input Schema

NameRequiredDescriptionDefault
mainCodeNoMain process code -- used to detect non-HTTPS URLs in loadURL/loadFile calls
htmlContentNoContent of the main HTML file to check CSP meta tags
packageJsonNoContent of package.json to check Electron version and dependencies
preloadCodeNoContent of the preload script
electronVersionNoElectron major version if not in package.json (e.g. '45')
browserWindowConfigNoBrowserWindow constructor options as a JSON string or code snippet

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuine context beyond that: this is static-only analysis, coverage is 19 of the checklist items, and uncovered items are surfaced in the report footer rather than silently dropped. It does not describe report severity structure or how partial inputs affect results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and limits in the first clause, then a compact enumeration of checks that carries real information about coverage. The 19-item list is long but each item earns its place by telling the agent exactly what will be detected; no filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description appropriately gestures at a report with a footer for flagged items, but leaves the report's shape and severity output unexplained. It also never states that all six parameters are optional or what happens when inputs are omitted (partial coverage), which is material for a zero-required-parameter audit tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter already documents its purpose (e.g. mainCode 'used to detect non-HTTPS URLs in loadURL/loadFile calls'), so the description adds little per-parameter meaning. The parenthetical input list maps roughly onto the six fields but is redundant with the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a concrete verb and resource ('Audit an Electron app against the official security checklist') and enumerates the exact 19 checks performed, which is unusually specific. It stops short of distinguishing itself from siblings like electron_lint_security or electron_audit_ipc_security, despite overlapping subject matter (raw ipcRenderer exposure, IPC sender validation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It defines a scope boundary by stating what it covers (static inputs: BrowserWindow config, main code, package.json, preload, HTML) and what it cannot cover (session permissions, fuses), which implies when it is the right tool. It never names an alternative tool or says when to use a different sibling, so selection guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools