Back to skill

Security audit

Font Pairing

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a font-design helper, but one bundled script quietly saves user command arguments locally and exposes broader design commands than the skill description discloses.

Review this before installing if you might pass client names, project codenames, or other sensitive text as command arguments. The font guidance itself is simple and local, but scripts/script.sh retains argument history under the user's data directory and the package includes broader design-helper behavior than the font-focused description suggests.

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

Note
Location
scripts/script.sh:5
Finding

Undisclosed Persistent Logging of User-Supplied Command Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 5-8 and 31-78
Vulnerability Type: Undisclosed plaintext storage of user input
Risk Level: Low

The script creates a persistent data directory when it starts and records the first user-supplied argument for multiple commands in history.log.

bash
DATA_DIR="${FONT_PAIRING_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/font-pairing}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"

_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

cmd_palette() {
    echo "  Primary: #2563EB | Secondary: #7C3AED | Accent: #F59E0B"
    _log "palette" "${1:-}"
}

cmd_font() {
    echo "  Heading: Inter/Poppins | Body: Open Sans/Lato"
    _log "font" "${1:-}"
}

cmd_layout() {
    echo "  Grid: 12-col | Spacing: 8px base | Max-width: 1200px"
    _log "layout" "${1:-}"
}

cmd_icon() {
    echo "  Libraries: Heroicons | Lucide | Phosphor | Tabler"
    _log "icon" "${1:-}"
}

cmd_spacing() {
    echo "  xs:4 sm:8 md:16 lg:24 xl:32 2xl:48"
    _log "spacing" "${1:-}"
}

cmd_breakpoint() {
    echo "  sm:640 md:768 lg:1024 xl:1280 2xl:1536"
    _log "breakpoint" "${1:-}"
}

cmd_contrast() {
    echo "  Check: webaim.org/resources/contrastchecker"
    _log "contrast" "${1:-}"
}

cmd_shadow() {
    echo "  sm: 0 1px 2px | md: 0 4px 6px | lg: 0 10px 15px"
    _log "shadow" "${1:-}"
}

cmd_mockup() {
    echo "  Tool: Figma | Sketch | Adobe XD"
    _log "mockup" "${1:-}"
}

cmd_checklist() {
    echo "  [ ] Consistent spacing | [ ] Color contrast | [ ] Mobile responsive"
    _log "checklist" "${1:-}"
}

Technical Analysis

The _log function appends raw command arguments to a persistent plaintext file. Logging is automatic, is not disclosed by SKILL.md or the command help, and has no opt-in control, redaction, retention policy, or cleanup mechanism.

The script also does not ex ...[truncated 1627 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove argument logging because the commands can return their static guidance without retaining user input.
  2. If logging is operationally necessary, make it explicitly opt-in and document the behavior, location, content, and retention period.
  3. Do not record raw arguments. Log only non-sensitive event identifiers or redact user-controlled content.
  4. Establish restrictive permissions before creating storage:
    bash
    umask 077
    mkdir -p -- "$DATA_DIR"
    touch -- "$DATA_DIR/history.log"
    chmod 600 -- "$DATA_DIR/history.log"
    
  5. Validate that DATA_DIR resolves to an expected user-owned location, particularly when FONT_PAIRING_DIR is supplied.
  6. Add log rotation, expiration, and a command that allows users to inspect and delete retained records.
  7. Add automated tests verifying that sensitive command arguments are not written to persistent storage by default.
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 (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a font-centric tool, but the code is broader and materially different in purpose: it acts as a generic design helper with many non-font commands. While it does include a simple font pairing output, most functionality is unrelated to the stated scope. It also lacks implementation of several specifically declared features, including Chinese font guidance, web font loading, system font stacks, and HTML preview generation. Additionally, it persists command history under the user's data directory, which is behavior not suggested by the description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The phrase '完全适配中文用户习惯' indicates a locale-specific behavior preference in natural language. The file does not mention any user opt-in or alternative language/locale modes, so it appears to privilege a specific locale by default.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a font-focused skill: font pairing recommendations, Chinese font guidance, web fonts, heading fonts, system font stacks, and preview HTML generation. However, the exposed commands include color palettes, layout templates, icons, spacing, breakpoints, contrast, shadows, mockups, and checklists, which make this a general design helper rather than a font-pairing skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script logs command usage and any provided argument text to a local history file without user disclosure or consent. If users pass project names, client identifiers, internal design terms, or other sensitive strings as arguments, this creates an unexpected local data retention channel that may later be exposed to other local users, backups, or support collections.

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 nearly all instructional content in Chinese, but it does not tell the user that the skill is Chinese-language only or offer any opt-in or alternative language. Under the language/locale policy, forcing a specific language without user choice is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt explicitly instructs the model to respond in Chinese with "用中文。" This is a natural-language locale policy constraint that does not offer the user a language choice or indicate any opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This instruction requires the generated solution to be in Chinese via "用中文。" Because it imposes a specific language without user selection or documented justification, it matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The line ends with "用中文。", which requires Chinese output regardless of user preference. The file does not provide an explicit opt-in or alternative language selection.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest promises Chinese fonts guidance, web font loading, heading fonts, system font stacks, and preview HTML generation. The implemented font command only prints a single hardcoded heading/body pairing and does not implement the other described behaviors, creating a mismatch between the advertised skill and actual functionality.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.