Back to skill

Security audit

Travel Outfit Planner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent travel outfit planner with a disclosed local lookbook generator, but users should understand the optional third-party image/search features and a limited HTML-safety caveat.

Install this only if you are comfortable with a Chinese-language travel styling skill that creates a local HTML lookbook. Do not provide a Pexels API key unless you accept sending destination/style search keywords to Pexels, and avoid opening lookbooks generated from untrusted JSON until the item-ID escaping bug is fixed.

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

Warning
Location
scripts/fetch_lookbook_images.py:513
Finding

Stored HTML Injection Through Unescaped Item IDs

Content
View full analysis
搜索同款' li_html += f'''
  • {num}
    {name}
    {cm} · {sc}
    {action}
  • ''' ``` ### Technical Analysis The generator reads `items[].id` from an input JSON document and interpolates it directly into the generated HTML. Unlike adjacent text fields, the value is neither type-validated nor passed through the `esc()` HTML-encoding function. Although the documented schema describes the ID as a number, JSON parsing does not enforce that requirement. A malicious or untrusted input document can supply an arbitrary string containing HTML markup. The supplied markup will be stored in the output file and interpreted when a user opens the generated lookbook in a browser. For example, an attacker-controlled value could contain an element with an event handler: ```json { "items": [ { "id": "", "name": "Example", "color_material": "Example", "scenes": "Example" } ] } ``` This is a stored HTML injection vulnerability and may become script execution depending on the injected markup and the browser's treatment of local HTML files. ### Attack Path 1. An attacker creates or modifies a `wardrobe_data.json` file. 2. The attacker places malicious HTML in an `items[].id` value. 3. A victim runs the documented generator against that file ...[truncated 1308 chars]
    Remediation
    View remediation
    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
    • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
    • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
    Findings (16)

    Tp4

    High
    Category
    MCP Tool Poisoning
    Confidence
    96% confidence
    Finding

    The documented behavior materially exceeds the declared purpose by introducing third-party media retrieval, outbound search-link generation, optional API-key handling, and HTML rendering workflows. This mismatch can mislead users and host systems into granting trust or execution to a skill that actually performs broader external interactions, increasing the risk of data exfiltration, unsafe content embedding, or policy bypass.

    Content

    No source excerpt is available for this finding.

    Undeclared Tool Scope

    Medium
    Category
    MCP Least Privilege
    Confidence
    89% confidence
    Finding

    The skill advertises only a simple wardrobe-planning function, yet the instructions and metadata imply capabilities for reading local reference files, writing output files, and potentially using networked image sources without any explicit tool/permission scoping. This creates unnecessary ambient authority: an agent executing the skill may access files or external services beyond what a user would reasonably expect from a styling assistant.

    Content

    No source excerpt is available for this finding.

    Description-Behavior Mismatch

    Medium
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The manifest frames the feature as a 'visual lookbook,' but the body escalates that into mandatory file generation and script-driven image retrieval. That gap matters because consumers may approve a presentational output feature while unknowingly enabling code execution and external content acquisition.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    98% confidence
    Finding

    Line L012 states that all output must use Simplified Chinese, including every part of the response. This is a natural-language locale policy constraint applied unconditionally, and the file does not offer the user any language choice or opt-in.

    Content

    No source excerpt is available for this finding.

    Context-Inappropriate Capability

    Medium
    Category
    Not specified by scanner
    Confidence
    92% confidence
    Finding

    The skill mandates executing a local Python script to transform JSON into an HTML file, even though the primary user-facing purpose is generating wardrobe advice. Requiring script execution expands the attack surface from text generation into code execution and file creation, which is risky because referenced local assets or scripts could be modified, malicious, or simply outside the user's expectations.

    Content

    No source excerpt is available for this finding.

    Context-Inappropriate Capability

    Medium
    Category
    Not specified by scanner
    Confidence
    93% confidence
    Finding

    Directing the agent to use external image services and optionally supply a Pexels API key introduces network communication and secret handling unrelated to a minimally scoped outfit-planning task. This can expose API credentials, create unreviewed third-party dependencies, and cause unanticipated outbound requests based on user content.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    90% confidence
    Finding

    The file presents all instructions, field descriptions, and usage guidance exclusively in Chinese, with no indication that the user can choose another language. Under SQP-3, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly documented and justified.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    91% confidence
    Finding

    This markdown file contains natural-language instructions that require image search queries to be written specifically for 小红书 and states that Chinese users commonly use that platform, with examples and priority rules centered on it. That effectively imposes a Chinese-language/platform preference without user opt-in or a documented region-specific justification, which is a locale-policy concern.

    Content

    No source excerpt is available for this finding.

    Description-Behavior Mismatch

    Medium
    Category
    Not specified by scanner
    Confidence
    90% confidence
    Finding

    The skill sends translated user/content-derived keywords to the Pexels API, creating an external data transmission path not disclosed in the skill description. In a wardrobe-planning context, trip destinations, preferences, or itinerary-derived terms may be sensitive enough to reveal user interests or travel plans to a third party.

    Content

    No source excerpt is available for this finding.

    External Transmission

    Medium
    Category
    Data Exfiltration
    Confidence
    89% confidence
    Finding

    The script transmits search queries to the external Pexels service over the network. Even though HTTPS is used and the functionality is image retrieval, the query may encode user-derived travel destinations, style preferences, or scene descriptions, which is a privacy-relevant outbound data flow in a skill whose description does not disclose such transmission.

    Content

    Scanner excerpt · scripts/fetch_lookbook_images.py (reported line 106)May include surrounding context.

    python
    def fetch_pexels(query: str, api_key: str, per_page: int = 3) -> list[dict]:
        url = "https://api.pexels.com/v1/search?" + urllib.parse.urlencode(
            {"query": query, "per_page": per_page, "orientation": "landscape"}
        )
        req = urllib.request.Request(url, headers={
    

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    95% confidence
    Finding

    The generated document sets <html lang="zh-CN">, which forces a specific language/locale for all output. In this codebase there is no visible user opt-in, configurable locale selection, or documented region-specific justification, so this is a natural-language locale policy concern.

    Content

    No source excerpt is available for this finding.

    Tainted flow: 'html' from pathlib.Path.read_text (line 607, file read) → pathlib.Path.write_text (file write)

    Medium
    Category
    Data Flow
    Confidence
    65% confidence
    Finding

    Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

    Content

    Scanner excerpt · scripts/fetch_lookbook_images.py (reported line 610)May include surrounding context.

    python
    html = generate_html(data, api_key=args.pexels_key)
    
        output_path = Path(args.output)
        output_path.write_text(html, encoding="utf-8")
        print(f"Generated: {output_path}")
        print(f"File size: {output_path.stat().st_size / 1024:.1f} KB")
    

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    91% confidence
    Finding

    The README states that the skill generates a local HTML file and may use the Pexels API, but it does not clearly warn users that content may be written to disk or that prompts/search terms could be sent to an external service. This is a real transparency and consent issue: users may unknowingly trigger local file creation or third-party data transmission, which can expose sensitive trip details or workspace data in some environments.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Low
    Category
    Not specified by scanner
    Confidence
    78% confidence
    Finding

    The README presents only Chinese prompt examples for invoking the skill, which can imply a language-specific usage expectation. Because there is no accompanying statement that other languages are supported or that Chinese is optional, this may violate the language/locale policy requirement.

    Content

    No source excerpt is available for this finding.

    Missing User Warnings

    Low
    Category
    Not specified by scanner
    Confidence
    84% confidence
    Finding

    This markdown explains that the skill uses the Pexels API for scene images and provides Xiaohongshu search links/buttons, but it does not warn users that using those features may send destination/style keywords to third-party services. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user privacy or network data sharing.

    Content

    No source excerpt is available for this finding.

    Description-Behavior Mismatch

    Low
    Category
    Not specified by scanner
    Confidence
    86% confidence
    Finding

    The manifest says the skill generates wardrobe plans and a visual lookbook, but this code also embeds third-party Xiaohongshu search links for color, scene, and item inspiration. Linking users out to an external shopping/social search site changes the skill from a self-contained planner/lookbook generator into a traffic-directing experience not described in the manifest.

    Content

    No source excerpt is available for this finding.