Back to skill

Security audit

EasyEDA Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its EasyEDA design purpose, but it includes a helper that can change or delete open schematic content through a less controlled path.

Install only if you trust this publisher and are comfortable giving the skill live control over EasyEDA projects. Before use, remove or avoid artifact/scripts/sch.py unless its debug.exec_js mutation path is replaced with typed actions, and review installer scripts instead of piping them directly to a shell.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sch.py:60
Finding

Unsafe schematic mutation through unrestricted debug.exec_js helper

Content
View full analysis

Vulnerability Details

File Location: scripts/sch.py:60-140
Vulnerability Type: Bypass of typed design-write controls through arbitrary JavaScript execution
Risk Level: High

Vulnerable Code

python
def ejs(code, timeout=90):
    return _cli(['call', 'debug.exec_js', '--payload', json.dumps({'code': code})], timeout)
python
def place(lib, uuid, x, y, designator):
    return ejs(f"const c=await eda.sch_PrimitiveComponent.create({{libraryUuid:'{lib}',uuid:'{uuid}'}},{int(x)},{int(y)});"
               f"const pid=c.getState_PrimitiveId();try{{await eda.sch_PrimitiveComponent.modify(pid,{{designator:'{designator}'}});}}catch(e){{}}return pid;")


def move(designator, x, y):
    return ejs(f"for(const c of await eda.sch_PrimitiveComponent.getAll())if(c.getState_Designator()==='{designator}')"
               f"{{await eda.sch_PrimitiveComponent.modify(c.getState_PrimitiveId(),{{x:{int(x)},y:{int(y)}}});return 1;}}return 0;")


def delete(designators):
    return ejs("const D=" + json.dumps(designators) + ";const ids=[];for(const c of await eda.sch_PrimitiveComponent.getAll())"
               "if(D.includes(c.getState_Designator()))ids.push(c.getState_PrimitiveId());"
               "if(ids.length)await eda.sch_PrimitiveComponent.delete(ids);return ids.length;")


def clear_wires_flags():
    return ejs("const w=[];for(const x of await eda.sch_PrimitiveWire.getAll())w.push(x.getState_PrimitiveId());"
               "if(w.length)await eda.sch_PrimitiveWire.delete(w);const f=[];"
               "for(const c of await eda.sch_PrimitiveComponent.getAll()){const t=c.getState_ComponentType();"
               "if(t!=='part'&&t!=='sheet')f.push(c.getState_PrimitiveId());}"
               "if(f.length)await eda.sch_PrimitiveComponent.delete(f);return [w.length,f.length];")

Technical Analysis

The helper exposes ejs() as a generic bridge to the EasyEDA daemon's `debug.exec_j ...[truncated 2603 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove mutation through debug.exec_js from the distributed Skill.
  2. Reimplement placement, movement, wiring, and deletion using typed EasyEDA actions or easyeda apply.
  3. Require callers to provide and verify the expected project, document UUID, and page identity before every mutation.
  4. Add a mandatory dry-run that returns the exact object IDs and operation plan before destructive changes.
  5. Require an explicit confirmation token tied to the generated plan for bulk deletion or clearing operations.
  6. Replace clear_wires_flags() with a scope-limited operation that accepts an explicit allowlist of object IDs and rejects empty, wildcard, or whole-document targets by default.
  7. Preserve a pre-mutation snapshot and perform fresh readback after each operation, failing closed if document identity or state changed.
  8. If the helper is needed only for legacy development, exclude it from the packaged Skill and prevent Agent workflows from invoking it.
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (158)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the real workflow is a narrow CAN-route or candidate validator rather than general EasyEDA project design, the skill is being represented too broadly for its actual behavior. That can lead to incorrect operator trust, inappropriate deployment contexts, and accidental disclosure of project data to tooling that is not necessary for the stated task.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

md
完成前按[布局规则](references/pcb-layout.md)通过连续两轮自检,第二轮包含保存重载和新回读;修复后重来。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

md
完成前按[布局规则](references/pcb-layout.md)通过连续两轮自检,第二轮包含保存重载和新回读;修复后重来。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 57)May include surrounding context.

md
| 原理图检查或局部修复 | [原理图](references/schematic.md)、[放置](references/schematic-placement.md)、[连接](references/schematic-wiring.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

md
| PCB 布局与机械 | [PCB](references/pcb.md)、[布局](references/pcb-layout.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 59)May include surrounding context.

md
| PCB 布线、铺铜与禁布区 | [布线](references/pcb-routing.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
| 连接、升级或保存异常 | [环境配置](references/environment-setup.md)、[Action 边界](references/actions.md) |

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The | bash pattern is a classic unsafe execution chain because it removes the opportunity for users or tooling to inspect the downloaded content before execution. In the context of an agent skill that manages local tooling and can influence operator behavior, this guidance materially increases supply-chain and command-execution risk.

Content

Scanner excerpt · references/environment-setup.md (reported line 58)May include surrounding context.

发布版安装 CLI 和 Skill:

bash
curl -fsSL https://raw.githubusercontent.com/zhoushoujianwork/easyeda-agent/main/install.sh | bash
easyeda update --check
easyeda update

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/pcb-layout.md (reported line 382)May include surrounding context.

md
- `easyeda pcb stackup` — **board stackup: copper layer count + inner-layer types** (`pcb.stackup.set` / read via `pcb layers`). `pcb stackup set --layers 4` sets the count (2|4|6|…|32, `eda.pcb_Layer.setTheNumberOfCopperLayers`); `--plane 15 --plane 16` / `--signal 15` set inner layers' type (SIGNAL↔PLANE/内电层, `modifyLayer` — only INNER layers accept a type change). Set the layer count BEFORE routing/pouring inner layers. **A net-bound 内电层 (PLANE) IS achievable via API** — verified recipe: pour the net on the inner layer **while it is still SIGNAL** (`pcb pour`/`power-planes`), THEN flip the type (`--plane 15`), THEN `pcb pour-rebuild`. The net-bound fill survives the flip and DRC stays clean (0 Plane-Zone/via clashes). Doing it in the other order (flip type first, then pour on a PLANE layer) is the path that breaks — the pour lands netless on L1. `power-planes` does this for you (`--gnd-plane`, on by default).
- `easyeda pcb power-planes` — **4-layer power distribution (the proper fix for the 2-layer pour conflict)**. Requires a verified ≥4-layer board by default; a confirmed 2→4 upgrade needs `--allow-stackup-change`, and unknown layer evidence always refuses. Existing 6+ layer boards retain their layer count. Assigns GND + power nets to inner layers, **via-stitches every power/ground pad DOWN to its plane** (the connection point the inner pour needs — without it the inner pour is all isolated islands and deposits nothing), then pours each net on its inner layer, then **flips the GND inner layer to 内电层/PLANE** (`--gnd-plane`, on by default) and rebuilds. **Order matters: vias BEFORE the pour** (empty otherwise), and the plane-flip AFTER the pour (the verified pour-while-SIGNAL → flip → rebuild recipe keeps the fill and DRC clean). The power layer stays 信号层 so its pour is an ordinary positive plane — matching the common customer stackup **GND=内电层 / VCC(3V3)=信号层** (e.g. `esp32MiniRequire.md`). `--gnd-layer 15 --power-layer 16` (defaults); `--gnd-plane=false` keeps 
...[truncated 26 chars]

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/reusable-module-library.md (reported line 48)May include surrounding context.

md
### 从已完成原理图直接提取

优先使用现场 `sch read --no-check` 的制造网表,不再从 PDF 重猜连接;再用 `lib by-lcsc`
将每个供应商编号解析成 32 位 Device UUID。公开 `*.topology.json` 必须把原位号转换为模块内
角色、把匿名网改为 `internal.*`、把跨模块网改为 `port.*`,并保留全部物理引脚。只有
`sch read.floatingPins` 明确列出的脚才能记录为 `connectionState:"unconnected"`;字段缺失不能

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares broad operational behavior involving local CLI, daemon, file access, and connector-driven project modification, but it does not define an explicit tool scope such as allowed-tools or permissions. In an agent setting, missing scope boundaries can permit unintended shell, file, environment, or network use beyond what users expect, increasing the blast radius if prompts or downstream content are adversarial.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language content of the skill, including its description and operating instructions, is entirely in Chinese. Under the policy, forcing a specific language without giving the user a language or locale choice is a reportable natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JSON catalog contains user-facing natural-language fields such as titles and constraints almost entirely in Chinese, and the file does not indicate that the skill is region-specific or that users can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.