Back to skill

Security audit

Drawio Diagram Builder

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate draw.io diagram helper, but its default preview path can send diagram content to diagrams.net.

Reasonable to install for non-sensitive diagram work. For confidential architecture, research, or business diagrams, avoid the hosted diagrams.net preview unless you are comfortable sharing the diagram XML with that service; use a local/offline draw.io workflow instead. Do not allow unpinned npx package installation unless you trust the configured npm source, and keep preview serving bound to 127.0.0.1.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
references/self-supervision-and-intake.md:232
Finding

Mandatory Agent Role Hijacking Through Skill Instructions

Content
View full analysis
"I am a senior designer reviewing this diagram for submission to a top conference. I do not care how long you spent on it. I will list every visible flaw, no matter how small. I will be harsh, systematic, and thorough." ``` A condensed version of the same instruction also appears in `SKILL.en.md:106`: ```markdown - **Before claiming improvement, run a red-team role switch on the latest screenshot.** You are no longer the author. You are a hostile reviewer. ``` ### Technical Analysis The Skill explicitly instructs the Agent to abandon its current role and adopt a mandatory supplied persona. The reference is designated as mandatory for non-trivial diagram tasks, meaning this behavioral instruction is expected to be loaded and followed during normal Skill operation. The stated purpose—adversarial visual-quality review—is legitimate and scoped to diagram inspection. The text does not explicitly instruct the Agent to ignore platform safety policies, disclose secrets, or execute unrelated actions. Nevertheless, replacing the Agent's role is unnecessary for performing a quality checklist and creates an instruction-hijacking primitive. Similar wording could be extended or modified to alter session goals, suppress user control, or impose unrelated behavior. The associated handoff gates also direct the Agent to continue working rather than defer to the user in some circumstances. This increases ...[truncated 1091 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.en.md:23
Finding

Unpinned Third-Party Package Execution Through npx

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/make_drawio_preview.py:27
Finding

Sensitive Diagram XML Disclosed to an External diagrams.net Iframe

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (39)

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
95% confidence
Finding

The skill explicitly tells the agent to search under ~/.claude/ or ~/.codex/ to locate the installed skill directory. Directing an agent into its configuration or installed-skills area expands access into sensitive local directories that may contain credentials, other skills, tokens, prompts, or private user data unrelated to the current task.

Content

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

md
| **Internet access** | Preview loads `https://embed.diagrams.net/` in an iframe. Offline won't work. |
| **File write access** | You will create `.drawio` files. |

Script paths in this document are relative to the skill directory. Resolve them like `<skill-dir>/scripts/serve_drawio_preview.py`. If you can't find the skill directory, look under the agent's installed skills path (e.g., `~/.claude/<skill-dir>/` or `~/.codex/<skill-dir>/`).

If Playwright reports a missing bundled browser, first try an installed browser channel before giving up, for example `npx playwright screenshot --channel chrome ...` or `--channel msedge ...`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 备选:`scripts/make_drawio_preview.py` + `python -m http.server`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 备选:`scripts/make_drawio_preview.py` + `python -m http.server`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 备选:`scripts/make_drawio_preview.py` + `python -m http.server`

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/alert-triangle.svg (reported line 1)May include surrounding context.

text
<!--
tags: [warning, danger, caution, risk, alert, triangle, control, operation, function, interface]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/clock.svg (reported line 1)May include surrounding context.

text
<!--
tags: [time, watch, alarm, clock, control, operation, function, interface, management]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/cpu-2.svg (reported line 1)May include surrounding context.

text
<!--
tags: [processor, computer, chip, hardware, technology, electronic, cpu, gadget, equipment, 2]
category: Devices
version: "1.59"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/cpu.svg (reported line 1)May include surrounding context.

text
<!--
tags: [processor, computer, chip, hardware, technology, electronic, cpu, gadget, equipment]
category: Devices
version: "1.47"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/device-desktop.svg (reported line 1)May include surrounding context.

text
<!--
tags: [monitor, computer, imac, device, desktop, hardware, technology, electronic, gadget, equipment]
category: Devices
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/device-mobile.svg (reported line 1)May include surrounding context.

text
<!--
tags: [iphone, phone, smartphone, cellphone, device, mobile, hardware, technology, electronic, gadget]
category: Devices
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/dots.svg (reported line 1)May include surrounding context.

text
<!--
tags: [hellip, more, ellipsis, dots, control, operation, function, interface, management]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/eye-off.svg (reported line 1)May include surrounding context.

text
<!--
tags: [view, watch, eye, off, control, operation, disabled, inactive, function, interface, visibility, accessibility, a11y, hidden]
category: System
version: "1.22"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/eye.svg (reported line 1)May include surrounding context.

text
<!--
tags: [view, watch, eye, control, operation, function, interface, management, visibility, accessibility, a11y, vision]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/filter.svg (reported line 1)May include surrounding context.

text
<!--
tags: [funnel, hopper, filtration, filter, control, operation, sort, organize, arrange, select]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/graph.svg (reported line 1)May include surrounding context.

text
<!--
category: System
tags: [analytics, raport, statistics, chart, graph]
version: "1.78"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/hourglass.svg (reported line 1)May include surrounding context.

text
<!--
tags: [time, timer, sand, clock, hourglass, control, operation, function, interface, management]
category: System
version: "1.47"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/info-circle.svg (reported line 1)May include surrounding context.

text
<!--
tags: [information, advice, news, tip, sign, info, circle, control, operation, round]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/lock.svg (reported line 1)May include surrounding context.

text
<!--
tags: [security, password, secure, lock, private, control, operation, protected, closed, function]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/plug.svg (reported line 1)May include surrounding context.

text
<!--
tags: [electricity, charger, socket, connection, plug, hardware, technology, electronic, gadget, equipment]
category: Devices
version: "1.6"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/scale.svg (reported line 1)May include surrounding context.

text
<!--
category: System
tags: [weigh, balance, amount, heavy, light, libra, scale]
version: "1.1"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/search.svg (reported line 1)May include surrounding context.

text
<!--
category: System
tags: [find, magnifier, magnifying glass, search, look, seek, query, browse]
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/server.svg (reported line 1)May include surrounding context.

text
<!--
tags: [storage, hosting, www, server, hardware, technology, electronic, gadget, equipment]
category: Devices
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/settings.svg (reported line 1)May include surrounding context.

text
<!--
tags: [cog, edit, gear, preferences, tools, settings, config, options, control, operation]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/shield-check.svg (reported line 1)May include surrounding context.

text
<!--
tags: [safety, protect, protection, "yes", add, shield, check, control, operation, confirm]
category: System
version: "1.0"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/icons/tabler/outline/sparkles.svg (reported line 1)May include surrounding context.

text
<!--
category: System
tags: [star, light, fire, shine, sparkles]
version: "2.1"

Static analysis

No suspicious patterns detected.