Back to skill

Security audit

awesome-design-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a design-style library that is broadly coherent, but users should be careful because its copy helper can overwrite a project DESIGN.md file.

Install only if you are comfortable with a skill that can copy a design guidance file into your project. Before applying a style, check whether your project already has a DESIGN.md, and avoid passing path-like style names such as values containing slashes or '..'.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get-design.sh:12
Finding
Style Name Path Traversal Can Escape the Trusted Design Library<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/get-design.sh:12-20` - `scripts/copy-design.sh:14-24` **Vulnerability Type**: Path traversal and insufficient input validation **Risk Level**: Medium ### Vulnerable Code `scripts/get-design.sh:12-20`: ```bash style="$1" design_file="$DESIGN_MD_DIR/$style/DESIGN.md" if [ -f "$design_file" ]; then echo "$design_file" else echo "错误:未找到风格 '$style'" >&2 exit 1 fi ``` `scripts/copy-design.sh:14-24`: ```bash STYLE="$1" TARGET_DIR="${2:-.}" # 获取 DESIGN.md 路径 DESIGN_FILE="$DESIGN_MD_DIR/$STYLE/DESIGN.md" if [ ! -f "$DESIGN_FILE" ]; then echo "错误:未找到风格 '$STYLE'" >&2 echo "可用风格请运行: scripts/list-styles.sh" >&2 exit 1 fi ``` ### Technical Analysis Both scripts insert an untrusted style-name argument directly into a filesystem path. They do not reject path separators, `..` traversal components, absolute paths, or symbolic-link escapes. Quoting the variable prevents shell word splitting and command substitution, but it does not prevent filesystem path traversal. An input containing traversal components can cause the constructed path to resolve outside the intended `design-md` directory. The only security check is whether the resulting path points to a regular file named `DESIGN.md`. This is particularly relevant to the Skill workflow because `SKILL.md` directs the Agent to read the selected `DESIGN.md` as authoritative design guidance. An external attacker-controlled `DESIGN.md` could therefore be introduced into the Agent context and potentially contain prompt-injection instructions. The flaw does not provide unrestricted arbitrary-file reading: the resolved source must be a file named `DESIGN.md`. It also does not independently grant operating-system code execution. Its scope is limited by the filesystem permissions of the process running the Skill. ### Attack Path 1. An attacker causes a crafted style value containing traversal components to be supplied, such as a path ...[truncated 1399 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict style names to one safe directory component: ```bash if [[ ! "$style" =~ ^[A-Za-z0-9._-]+$ ]] || [[ "$style" == "." || "$style" == ".." ]]; then echo "Invalid style name" >&2 exit 1 fi ``` 2. Canonicalize the library root and candidate file, then enforce containment: ```bash DESIGN_ROOT="$(realpath "$SCRIPT_DIR/../design-md")" CANDIDATE="$(realpath -e "$DESIGN_ROOT/$style/DESIGN.md")" || exit 1 case "$CANDIDATE" in "$DESIGN_ROOT"/*) ;; *) echo "Style path escapes the design library" >&2 exit 1 ;; esac ``` 3. Reject symbolic-link escapes. Containment validation must occur after resolving symbolic links with `realpath`. 4. Prefer an allowlist generated from direct child directories of `design-md` that contain `DESIGN.md`. Require the requested value to exactly match an allowlisted name. 5. Apply identical validation in both `get-design.sh` and `copy-design.sh`, ideally through a shared helper to prevent inconsistent fixes. 6. Add regression tests for: - `../` and nested traversal. - Absolute paths. - `.` and `..`. - Embedded path separators. - Symbolic links pointing outside `design-md`. - Valid names containing dots or hyphens, such as `linear.app` and `together.ai`. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/copy-design.sh:26
Finding
Existing DESIGN.md Files Are Overwritten Without Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/copy-design.sh:26-31` **Vulnerability Type**: Unsafe file overwrite **Risk Level**: Low ### Vulnerable Code ```bash # 确保目标目录存在 mkdir -p "$TARGET_DIR" # 复制文件 TARGET_FILE="$TARGET_DIR/DESIGN.md" cp "$DESIGN_FILE" "$TARGET_FILE" ``` ### Technical Analysis The copy operation always writes to `DESIGN.md` in the selected target directory. A normal `cp` invocation replaces an existing destination file without confirmation or backup. Copying a selected design file is part of the declared Skill functionality, so the write is neither hidden nor unrelated to the Skill. However, silently destroying an existing project file is unnecessary and violates safe file-handling practices. The script provides no `--force` option to make replacement explicit, no precondition check, and no backup or atomic update procedure. The target directory is also accepted from a command-line argument. Consequently, the overwrite can occur in any directory writable by the process, although exploitation requires the script to be invoked with that target or the current directory to contain the file. ### Attack Path 1. A project or selected target directory already contains a valuable `DESIGN.md`. 2. The Agent or user invokes `scripts/copy-design.sh <style> [target-directory]`. 3. The script creates the target directory if needed but does not check whether `DESIGN.md` already exists. 4. `cp` replaces the existing file with the selected style definition. 5. The previous project-specific content is lost unless it is recoverable from version control or a separate backup. ### Impact Assessment A successful or accidental trigger can: - Destroy an existing project-specific `DESIGN.md`. - Replace project instructions or design requirements with bundled style content. - Cause integrity loss within any writable target directory selected by the caller. The operation is limited to a destination named `DESIGN.md` and to the filesystem p ...[truncated 116 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Refuse to overwrite an existing destination by default: ```bash TARGET_FILE="$TARGET_DIR/DESIGN.md" if [ -e "$TARGET_FILE" ]; then echo "Refusing to overwrite existing file: $TARGET_FILE" >&2 exit 1 fi cp -- "$DESIGN_FILE" "$TARGET_FILE" ``` 2. If replacement is required, introduce an explicit `--force` option and clearly report that the existing file will be replaced. 3. Alternatively, create a timestamped backup before replacement: ```bash cp -- "$TARGET_FILE" "$TARGET_FILE.bak" ``` 4. Consider writing to a temporary file in the same directory and using `mv` for an atomic final update. 5. Enable stricter shell error handling: ```bash set -euo pipefail ``` 6. Validate the target directory and clearly display the resolved destination before performing a destructive write. 7. Add tests confirming that: - Existing files are preserved by default. - Overwrite occurs only with explicit authorization. - Copy failures return a nonzero status. - Paths containing spaces and leading hyphens are handled safely. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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
Findings (399)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The declared description says this skill is triggered only when a user explicitly names a design style, or when asking for the list of styles or details of a particular style. However, the supplied code only scans the design-md directory and returns a random style directory name. That is a materially different primary behavior: it ignores any user-specified style, provides no style metadata/details, and does not list all styles. Random choice is also not described as part of the skill’s purpose. Therefore, the code does not accurately represent the declared functionality.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description says this skill is a style picker that only applies when the user explicitly names a design style, and explicitly says it should not trigger for unspecified general design requests. The code does the opposite: it accepts arbitrary query text, scans for many thematic/product/domain keywords (e.g. 支付, 项目管理, 开发者, 音乐, AI), chooses the best-matching style, and if there is no input or no match, calls a random-style selector. That is a materially different trigger model and behavior from a strict explicit-style selector. Additionally, the description mentions listing available styles and viewing specific style details, but this script only outputs a chosen style identifier and validates that its DESIGN.md exists; it does not list styles or display style details. Therefore the implementation does not accurately match the declared purpose.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand"><span class="logo-mark">C</span> Claude</div>
  <div class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand"><span class="logo-mark">C</span> Claude</div>
  <div class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<button class="btn-ghost">View Source</button>
  </div>

  <!-- Performance Stats Bar (ClickHouse distinctive) -->
  <div class="stats-bar">
    <div class="stat-item">
      <div class="stat-number">1000<span class="accent">x</span></div>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand"><span class="icon">CH</span> ClickHouse</div>
  <div class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand"><span class="icon">CH</span> ClickHouse</div>
  <div class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- DARK MODE BADGE -->
<div class="dark-badge">Dark Mode</div>

<!-- NAV -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">Composio</div>
  <div class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- FORMS -->
<section class="section" id="forms">
  <div class="section-title">05 / Form Elements</div>
  <h2 class="section-heading">Inputs & Forms</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- FORMS -->
<section class="section" id="forms">
  <div class="section-title">05 / Form Elements</div>
  <h2 class="section-heading">Inputs & Forms</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 38 57" fill="none" xmlns="http://www.w3.org/2000/svg">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <div class="nav-brand">
    <svg viewBox="0 0 38 57" fill="none" xmlns="http://www.w3.org/2000/svg">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- COLORS -->
<section class="section" id="colors">
  <div class="section-title">01 / COLOR PALETTE</div>
  <h2 class="section-heading">Color Palette & Roles</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- COLORS -->
<section class="section" id="colors">
  <div class="section-title">01 / COLOR PALETTE</div>
  <h2 class="section-heading">Color Palette & Roles</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- BUTTONS -->
<section class="section" id="buttons">
  <div class="section-title">03 / BUTTON VARIANTS</div>
  <h2 class="section-heading">Buttons</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- BUTTONS -->
<section class="section" id="buttons">
  <div class="section-title">03 / BUTTON VARIANTS</div>
  <h2 class="section-heading">Buttons</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- SPACING -->
<section class="section" id="spacing">
  <div class="section-title">05 / SPACING SCALE</div>
  <h2 class="section-heading">Spacing System</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<hr class="section-divider">

<!-- SPACING -->
<section class="section" id="spacing">
  <div class="section-title">05 / SPACING SCALE</div>
  <h2 class="section-heading">Spacing System</h2>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- DARK MODE BADGE -->
<div class="dark-badge">Dark Mode</div>

<!-- NAV -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <span class="nav-brand">awesome-design-md</span>
  <ul class="nav-links">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Static analysis

No suspicious patterns detected.