Back to skill

Security audit

Design Spec Personal

Security checks for vulnerabilities and agentic risk

Overview

This is a UI design-generation skill, but it asks agents to use under-scoped runtime behaviors that can expose generated files, execute mutable browser code, and retain user-derived design artifacts across sessions.

Review this skill before installing if you work with private designs, repositories, or customer product plans. Use it only in an isolated workspace, bind preview servers to localhost and the active project folder, avoid remote CDN imports for sensitive prototypes, and do not enable cross-session approved-design storage or external sync unless you are comfortable retaining those artifacts.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
system-prompt.md:107
Finding

Generated Prototypes Execute Mutable Third-Party Code from a Remote CDN

Content
View full analysis
import React from 'https://esm.sh/react@18.3.1'; import { createRoot } from 'https://esm.sh/react-dom@18.3.1/client'; import { Button } from 'https://esm.sh/@?deps=react@18.3.1,react-dom@18.3.1&bundle-deps'; ``` ### Technical Analysis The Skill directs generated prototypes to import and execute JavaScript from `esm.sh` at page-load time. Although some package versions are shown, the component-library version remains a placeholder, and none of the remote resources are protected by a locally audited bundle, cryptographic integrity check, or immutable artifact policy. JavaScript imported as an ES module executes in the security context of the generated prototype. Consequently, a compromised CDN response, malicious package release, dependency-confusion event, or compromised transitive dependency can inspect and modify the page DOM, read prototype data available to the page, alter validation results, and issue outbound network requests. The `bundle-deps` option changes dependency delivery behavior but does not establish trust or integrity. Because the effective code is retrieved after the Skill package has been reviewed, its behavior can change independently of the audited artifact. ### Attack Path 1. The Skill generates a prototype containing the prescribed `esm.sh` imports. 2. The agent starts the local preview server and opens the generated page in a browser. 3. The browser requests executable modules from `esm.sh`. 4. An attacker compromises the CDN response, publishes or substitutes a malicious dependency version, or compromises a transitive package. 5. The malicious module executes in the generated page's origin. 6. The module reads or modifies prototype cont ...[truncated 823 chars]
Remediation
View remediation
` or any other unresolved dependency placeholder remains in an executable URL. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
system-prompt.md:126
Finding

Prototype HTTP Server Is Exposed on All Network Interfaces

Content
View full analysis
Remediation
View remediation
``` 2. Serve only the active project directory rather than the parent directory containing all designs. 3. Prefer an ephemeral available port rather than a fixed predictable port where the browser harness supports it. 4. Record the server process ID and terminate it immediately after screenshot and acceptance validation. 5. Disable directory listing or use a minimal preview server that permits only known output files. 6. Do not place secrets, credentials, or unrelated files beneath the served directory. 7. In shared or containerized environments, additionally restrict inbound network access through sandbox or firewall controls. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
design-system/universal/interaction-patterns.md:811
Finding

Toast Helper Inserts Untrusted Text Through innerHTML

Content
View full analysis
t.remove()); const t = document.createElement('div'); t.className = 'toast toast-success'; t.innerHTML = `...${message}`; document.body.appendChild(t); ``` ### Technical Analysis The helper interpolates `message` directly into an `innerHTML` assignment. No escaping, validation, or sanitization is applied. If the message can contain user-controlled, server-controlled, imported, or otherwise untrusted text, the browser parses it as HTML rather than displaying it as plain text. An attacker can provide markup containing an event handler or another script-capable HTML construct. Script elements inserted through `innerHTML` are subject to browser-specific execution restrictions, but event-handler attributes and other active markup can still create exploitable DOM-XSS conditions. The pattern is especially risky because this document is intended to guide generated implementation code, so the unsafe sink can be reproduced in multiple prototypes or downstream applications. ### Attack Path 1. A generated prototype or downstream implementation copies the prescribed `showSuccessToast` helper. 2. Application logic passes user-controlled or server-returned content as `message`. 3. The helper interpolates that value into the `innerHTML` string. 4. The browser parses the attacker-controlled value as markup. 5. An injected event handler or other active element executes when its trigger condition occurs. 6. The payload runs in the page's origin and accesses data or performs actions available to that origin. For example, a message containing an image element with an error handler could execute JavaScript when ...[truncated 624 chars]
Remediation
View remediation
toast.remove()); const toast = document.createElement('div'); toast.className = 'toast toast-success'; toast.setAttribute('role', 'status'); toast.setAttribute('aria-live', 'polite'); const icon = createApprovedSuccessIcon(); const label = document.createElement('span'); label.textContent = String(message); toast.append(icon, label); document.body.appendChild(toast); } ``` Additional hardening: 1. Treat all runtime messages as untrusted unless their provenance is explicitly guaranteed. 2. Avoid `innerHTML`, `outerHTML`, and `insertAdjacentHTML` for dynamic text. 3. If rich HTML is an actual requirement, sanitize it with a maintained sanitizer and a restrictive element-and-attribute allowlist. 4. Add tests using HTML elements, event-handler attributes, malformed markup, and encoded payloads. 5. Apply a restrictive Content Security Policy as defense in depth, while not treating CSP as a replacement for safe DOM construction. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (17)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill metadata and usage guidance are written to target Chinese-language behavior and Chinese phrasing without any opt-in, while also binding activation to broad multilingual keywords. This can override the user’s preferred locale or cause the agent to respond in Chinese unexpectedly, which is a form of instruction overreach that can reduce usability, mislead users, and interfere with downstream tooling or review workflows expecting another language.

Content

No source excerpt is available for this finding.

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · design-system/universal/interaction-patterns.md (reported line 385)May include surrounding context.

Gesture Conflict Rules (Apple HIG)

Never override system gestures:

text
Swipe up from bottom     → Home / App Switcher (iOS)
Swipe down from top      → Notification Centre / Control Centre

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 · design-system/universal/references/anti-examples.md (reported line 199)May include surrounding context.

Good:

html
<!-- Choose ONE style and apply it everywhere -->
<!-- Outline (recommended for macOS/web apps): -->
<svg width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.5">...</svg>

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 · system-prompt.md (reported line 92)May include surrounding context.

Component semantic tagging — every component element must carry:

html
<!-- ═══ ComponentName ═══
     size: WxH | padding: var(--...) | bg: var(--...)
     states: default, hover, [others] -->
<div

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 · system-prompt.md (reported line 209)May include surrounding context.

md
[~] prefix = estimated, verify before use
         Full state specs in spec.json
-->
<!-- ═══ Navbar ═══
     size: 375×56px | padding: 0 var(--spacing-md)
     bg: var(--color-surface) | border-bottom: 1px solid var(--color-border) -->
<header

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 · system-prompt.md (reported line 209)May include surrounding context.

md
[~] prefix = estimated, verify before use
         Full state specs in spec.json
-->
<!-- ═══ Navbar ═══
     size: 375x56px | padding: 0 var(--spacing-md)
     bg: var(--color-surface) | border-bottom: 1px solid var(--color-border) -->
<header

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger description is extremely broad, covering many common design-related terms across multiple languages and tool ecosystems, which can cause the skill to activate in situations where the user did not clearly request it. Over-broad activation increases the chance that the agent will follow this skill’s workflow instead of the user’s intended task, creating scope hijack and unexpected file generation or tool usage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all operational instructions exclusively in Chinese, which can constitute a language/locale policy violation when no user opt-in or alternative language path is provided. The file does not indicate that the skill is intentionally region-specific or that users may choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file imposes a universal ban on visible em-dashes/en-dashes as a hard rule, even though this is a stylistic language constraint rather than a security or functional requirement. In a design-generation skill, such blanket hidden style policies can override user intent, reduce output fidelity for legitimate typography/localization needs, and act as covert steering not disclosed as optional guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The content rules prohibit certain wording and require specific English replacements such as using plain-language labels like "Install, Configure, Ship" and replacing phrases like "Quietly trusted by" with "Trusted by." This imposes an English-language/copy policy in natural language without offering a user language choice or documenting a locale-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions mandate "ZERO TOLERANCE" for em dashes and require outputs containing them to be rejected. This is a natural-language style policy constraint applied categorically, but the file does not provide user opt-in or a documented business/compliance justification for enforcing this writing rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains a large block of required design guidance written in Chinese, while the rest of the skill is in English. That creates a de facto language constraint for users or agents consuming the skill, but the document does not state that Chinese is required, optional, or provide an opt-in/alternative language path.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The prompt directs the skill to persist approved designs and anti-examples across sessions, creating cross-session memory artifacts unrelated to the immediate user request. This introduces data retention and possible leakage risks, since user content or derived artifacts may be stored and later surfaced in other sessions without clear consent boundaries.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to use gh api against arbitrary GitHub repositories when given a URL, which expands the skill from design-spec generation into external repository enumeration and content retrieval. This can expose private repository metadata or enable unintended data access if the runtime has authenticated GitHub credentials, making the capability broader than necessary for the stated task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Select/Dropdown section uses Chinese text in the label trigger(触发器,外观同 Input) while the rest of the document is in English. This introduces a locale/language inconsistency without any indication that the skill is intended for Chinese-speaking users or that multilingual output is optional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The comment assigns --line-height-relaxed to 'body CJK', which embeds a locale/language-specific directive in a universal design token file. Because the file is presented as a default fallback design system and does not document user opt-in or a region-specific scope, this can be read as forcing locale-specific behavior by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Lines L194-L195 prescribe different line-height rules based on language, explicitly calling out CJK text versus English body text. This is a natural-language locale policy embedded in the file, but the document does not indicate that language choice is user-selectable or limited to a justified region-specific context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.