Back to skill

Security audit

smart personal fashion assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent wardrobe assistant, but it handles sensitive body, appearance, photo, and routine data while also persisting untrusted model-generated HTML and model-derived profile updates.

Review this skill before installing. It is not clearly malicious, but it asks for and stores sensitive appearance data and photos, may send them to an external model service, and saves model-generated HTML that should be treated as untrusted. Only use it with non-sensitive photos/data, inspect generated dashboard files before opening them, and prefer a version that validates model output, sanitizes HTML, and requires explicit consent before uploads or persistent profile writes.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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
TOOLS/wardrobe_analysis_tool.py:140
Finding

Unsanitized Model-Generated HTML Is Persisted and Delivered to Users

Content
View full analysis
start_idx = html_content.find("") if start_idx != -1: html_content = html_content[start_idx:] current_date = datetime.now().strftime("%Y-%m-%d") filename = f"{current_date}个人电子衣橱看板.html" filepath = os.path.join(self.dashboard_dir, filename) try: with open(filepath, "w", encoding="utf-8") as f: f.write(html_content.strip()) ``` The affected workflow is explicitly reachable through: - `smart_wardrobe_analysis.md:31-38,45-47`, which requires the Agent to save and deliver the generated dashboard. - `PROMPT/wardrobe_analysis_prompt.md:12,35`, which permits Chart.js or native HTML but does not prohibit remote resources or executable scripts. ### Technical Analysis `save_html_dashboard()` treats the language model's response as trusted HTML. It removes Markdown fences and optionally discards content preceding ``, but it performs no security validation or sanitization. The method does not reject or neutralize: - Executable `
Remediation
View remediation
... ``` 4. **Prohibit remote resources.** - Bundle visualization libraries locally or replace them with static CSS/SVG generated by trusted code. - Reject all external `src`, `href`, CSS `url()`, and similar resource references. 5. **Apply a restrictive Content Security Policy.** - Use a policy such as `default-src 'none'`. - Add only the minimum directives needed for embedded styles and local images. - Do not enable arbitrary inline or remote JavaScript. 6. **Validate before delivery.** - Parse the finished dashboard and fail closed if prohibited tags, attributes, protocols, or remote origins are present. - Record validation failures without sending the unsafe file to the user. ]]>

T02 · Agent Memory Poisoning

Warning
Location
TOOLS/wardrobe_analysis_tool.py:167
Finding

Model-Controlled Statistics Can Poison Persistent Agent Context

Content
View full analysis
\s*(.*?)\s*', html_content, re.DOTALL | re.IGNORECASE ) if stats_match: try: stats_data = json.loads(stats_match.group(1)) self._update_user_stats(stats_data, preferences) except Exception as e: print(f"[警告] 解析或写入统计数据失败: {str(e)}") ``` The extracted values are then written into persistent Markdown without type validation or output encoding: ```python def _update_user_stats(self, stats_data: dict, preferences: dict = None): """将统计的实际色彩比例、实际总件数以及各目标写入 USER.md""" if not os.path.exists(self.user_file): return with open(self.user_file, "r", encoding="utf-8") as f: content = f.read() actual_total = stats_data.get("actual_total_items", "-") actual_color = stats_data.get("actual_color_ratio", "-") preferences = preferences or {} item_limit = preferences.get("custom_item_limit", "35") color_ratio = preferences.get( "custom_color_ratio", "60%主色/30%辅助色/10%提亮色" ) target_limit = item_limit target_color = color_ratio current_date = datetime.now().strftime("%Y-%m-%d") stats_section = ( f"\n\n## 衣橱实时统计与目标 (Dashboard Stats)\n\n" f"> 最后更新:{current_date}\n\n" ) stats_section += "| 指标项 | 实际当前值 | 设定的管理目标 |\n" stats_section += "|---|---|---|\n" stats_section += ( f"| **总件数** | {actual_total} 件 | {target_limit} 件 |\n" ) stats_section += ( f"| **色彩矩阵比例** | {actual_color} | {target_color} |\n" ) if "## 衣橱实时统计与目标 (Dashboard Stats)" in content: content = re.sub( r"\n*## 衣橱实时统计与目标 \(Dashboard Stats\ ...[truncated 2698 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared skill purpose presents a broad personal-fashion assistant, but the described/observed behavior includes multimodal payload construction, external prompt loading, image ingestion, and archival workflows that are more operationally sensitive than the top-level description suggests. This mismatch can mislead users and reviewers about what data is processed and stored, undermining informed consent and making risky behaviors like persistent image archival appear less significant.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · TOOLS/wardrobe_analysis_tool.py (reported line 77)May include surrounding context.

python
# 兼容直接使用的字面常量
        prompt = prompt.replace("{{2026-03-31}}", current_date)
        
        return prompt

    def build_analysis_payload(self, preferences: dict, inventory_md: str, model: str = "MiniMax-M2.7", max_tokens: int = 4000) -> dict:
        """

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes assembling user profile data, weather, schedule, and filtered wardrobe inventory into a prompt that is sent to a large language model, yet it does not disclose that potentially sensitive schedule and lifestyle data will be shared with an external model service. This creates a significant privacy and confidentiality risk because daily routines, clothing inventory, and personal preferences can reveal location patterns, habits, and socioeconomic details when transmitted off-system.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description does not clearly disclose that highly personal attributes and uploaded OOTD photos are persisted to USER.md and transmitted to a model API for evaluation. That lack of upfront transparency undermines informed consent and increases privacy risk, especially given the collection of biometric-adjacent appearance data and images.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow instructs the agent to directly send user photos to an external multimodal model service for feature extraction, but provides no notice or consent mechanism for network transmission. Since clothing photos may contain sensitive personal information, surroundings, or biometric-adjacent data, undisclosed third-party sharing materially increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The entire prompt is written to operate in Chinese and does not indicate that users may choose another language or that the Chinese-only constraint is intentional and justified. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The prompt requests and processes detailed body measurements and physical traits, which are sensitive personal data in this context, yet it provides no privacy notice, consent language, minimization guidance, or handling restrictions. In a fashion-assistant skill, collecting such data may be functionally relevant, but the absence of user-facing safeguards increases privacy risk from oversharing, unintended retention, or secondary use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt states in Chinese that the assistant is a fashion analysis expert and continues the entire skill specification in Chinese, including output expectations. This imposes a specific language/locale on users without opt-in or justification, which matches the policy category for language or locale constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt defines the assistant role and task entirely in Chinese, effectively constraining interaction output to a specific language. This is a natural-language policy concern because no user opt-in, language selection mechanism, or region-specific justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The prompt content is written as a direct instruction in Chinese and does not provide any option for the user to choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The prompt explicitly defines the role and task entirely in Chinese, effectively forcing a specific language/locale for the skill's behavior. Under the policy, language constraints should either be optional, user-selected, or clearly justified as region-specific; no such opt-in or justification is present here.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill describes file-reading and file-writing behavior across multiple subskills, including initializing directories, updating USER.md, writing inventory records, and generating HTML dashboards, but it does not declare an explicit tool scope or permissions boundary. In a skill that persistently stores personal profile data and wardrobe images, missing scope declarations weakens least-privilege guarantees and can enable broader filesystem access than users or reviewers expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, triggers, and user-facing examples throughout the skill are exclusively in Chinese, including the main description and invocation guidance. This effectively forces a specific language/locale without user opt-in or an explicit statement that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill collects and persists highly sensitive personal data, including body measurements, body-shape inferences, skin-tone traits, style preferences, and possibly reference photos, yet the description does not present a clear up-front warning or consent notice. This increases privacy risk because users may disclose sensitive biometric-adjacent and lifestyle data without fully understanding that it will be stored long-term in USER.md.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill indicates that clothing photos and wardrobe records are archived persistently, but the warning is buried in workflow details and not surfaced as a clear user-facing storage notice before upload or ingestion. Because images can reveal personal possessions, habits, and indirectly identity or location cues, unclear disclosure of persistent storage creates meaningful privacy and data-retention risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language docstring presents the skill as a Chinese-only prompt generator and analysis workflow, with no indication that users may choose another language or that the restriction is region-specific and required. Under the policy, forcing a specific language without opt-in is a locale-policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code constructs outbound multimodal payloads containing highly sensitive personal data: body measurements, skin/appearance descriptors, and uploaded user photos encoded for transmission to an external model API. There is no consent gate, privacy notice, minimization control, or destination validation in this module, so a caller can easily send intimate biometric/appearance data off-device without any explicit user-facing disclosure or policy enforcement.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module header claims the tool reads USER.md and inventory.md to prepare prompts, but the implementation later writes back to USER.md. This mismatch weakens informed consent and security review, because operators may approve a seemingly read-only component that actually performs persistent modifications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The module title, docstrings, and user-facing messages are written exclusively in Chinese, indicating the skill is designed around a fixed language/locale with no visible option for user choice. Under the policy, forcing a specific language without opt-in is a natural-language policy concern unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code saves arbitrary LLM-produced HTML to disk and updates USER.md without any confirmation step or warning. In this skill context, that means untrusted model output can become persistent content and modify user-facing files silently, increasing the chance of stored malicious markup, misleading dashboards, or unwanted state changes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The tool is documented and positioned as a prompt-preparation utility, but it also mutates USER.md by persisting LLM-derived statistics. This creates an integrity risk because model output or embedded JSON can silently overwrite user state, expanding the tool from read/prepare into write-back behavior without clear trust boundaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The top-level docstring describes the tool entirely in Chinese, and the class/function comments and user-facing messages throughout the file also assume Chinese as the required interaction language. This creates a language/locale constraint without offering user choice or documenting a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly sends uploaded clothing images to a multimodal model API and also relies on local wardrobe/profile data, but it does not warn the user that their image-derived attributes and potentially sensitive wardrobe preferences may be transmitted to an external service. This creates a real privacy and consent issue because users may not realize personal images and associated data are leaving the local environment for third-party processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly collects and persists personal profile data such as resident city, body data, style preferences, and avoided colors into local files, but it provides no notice about data sensitivity, retention period, access controls, or user consent. In this context, the data is not only identifying and preference-rich, but also linked to wardrobe and future recommendation workflows, increasing privacy risk if the files are exposed or reused beyond the user's expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to invoke the skill on generic phrases or even automatically on installation, which can cause personal-data collection to begin without sufficiently specific user intent. In this skill’s context, that is more dangerous because it solicits sensitive body characteristics and photos, then persists them and may send them to an external model API.

Content

No source excerpt is available for this finding.