Back to skill

Security audit

screenshot-ux-auditor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local screenshot UX-audit helper with a small CSV-export risk users should handle carefully.

Install only if you are comfortable with a local Python helper that converts issue JSON into CSV. Treat input issue data as untrusted, and avoid opening generated CSV files in spreadsheet software when the issue text may come from an attacker unless formula-prefixed cells have been sanitized first.

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/generate_issue_log.py:15
Finding
CSV Formula Injection in Generated Issue Logs## Vulnerability Details **File Location**: `scripts/generate_issue_log.py`, lines 15–16 **Vulnerability Type**: CSV formula injection **Risk Level**: Medium ### Vulnerable Code ```python for issue in issues: w.writerow({k: issue.get(k, "") for k in w.fieldnames}) ``` ### Technical Analysis The script copies user-controlled values from the input JSON directly into CSV cells without neutralizing spreadsheet formula prefixes such as `=`, `+`, `-`, or `@`. CSV quoting performed by Python's `csv` module provides structural CSV escaping, but it does not prevent spreadsheet software from interpreting cell contents as formulas. An attacker who controls any `title`, `category`, `severity`, or `fix` value can therefore place a spreadsheet formula in the generated issue log. For example, an input field could contain: ```text =HYPERLINK("https://attacker.example/collect","Open") ``` When the CSV is opened in a spreadsheet application, that application may interpret the value as a formula rather than inert text. Exact behavior depends on the spreadsheet product and its security configuration. ### Attack Path 1. An attacker prepares or influences an issues JSON file containing a formula-prefixed value in one of the supported fields. 2. The user invokes `generate_issue_log.py` with that JSON file. 3. The script reads the value and writes it unchanged into the output CSV. 4. The user or another recipient opens the generated CSV in spreadsheet software. 5. The spreadsheet interprets the attacker-controlled cell as a formula. 6. Depending on the application and security configuration, the formula may display a deceptive link, initiate an external request, expose data through formula behavior, or trigger other application-specific actions. ### Impact Assessment Successful exploitation occurs in the context of the user who opens the CSV, not under elevated privileges obtained directly by the Python script. Potential impact includes: - Deceptive links or spreadshe ...[truncated 557 chars]
Remediation
## Remediation Suggestions Sanitize every value before passing it to `csv.DictWriter`. Treat cells beginning with `=`, `+`, `-`, or `@` as potentially executable spreadsheet formulas and prefix them with a single quote so spreadsheet applications interpret them as text. A possible hardening approach is: ```python FORMULA_PREFIXES = ("=", "+", "-", "@") def sanitize_csv_cell(value): if value is None: return "" value = str(value) if value.startswith(FORMULA_PREFIXES): return "'" + value return value for issue in issues: w.writerow({ key: sanitize_csv_cell(issue.get(key, "")) for key in w.fieldnames }) ``` Additional hardening measures: 1. Validate that the top-level JSON value is a list and that every entry is an object. 2. Enforce expected types and reasonable length limits for all fields. 3. Document that input JSON must be treated as untrusted. 4. Warn users against opening unsanitized exports in spreadsheet applications. 5. Add regression tests covering values beginning with `=`, `+`, `-`, and `@`. 6. Test the resulting CSV in supported spreadsheet applications to confirm that sanitized fields are displayed as literal text.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose claims screenshot-based UX auditing, but the detected behavior only reformats existing issue data from JSON to CSV and does not actually analyze screenshots. This mismatch can mislead users and downstream systems into trusting outputs as if they came from image analysis, creating integrity and decision-risk issues when the skill is used for design, product, or accessibility reviews.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger examples include very broad natural-language phrases such as '审查这个界面' and '页面哪里有问题', which can plausibly appear in ordinary conversation and cause accidental or over-eager skill activation. In an agent environment, unintended activation can redirect the workflow, process screenshots or files the user did not mean to audit, and produce actions or analysis outside user intent.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file is written entirely in Chinese and does not offer any language or locale choice. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares a local script and resource usage that imply file read/write capability, but it does not define any explicit tool scope such as permissions or allowed-tools. This can lead to overbroad runtime access, making it easier for the skill to read or write files beyond the minimum needed if the surrounding agent platform grants default filesystem privileges.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger list includes phrases like '审查这个界面', '页面哪里有问题', and 'audit this UI screenshot', which can plausibly occur in normal conversation without clearly signaling this specific skill. The file does not provide exclusion conditions or scope limits beyond the general topic, so unintended invocation is more likely.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The example trigger phrases are generic requests such as '审查这个界面', '页面哪里有问题', and 'audit this UI screenshot', which can overlap with ordinary user intent outside this specific skill. In agent environments that route tools or skills based on trigger similarity, this can cause unintended invocation, misrouting user requests, or over-collection of screenshot data into this skill when the user did not explicitly intend to use it.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The document presents key headings, trigger descriptions, and examples in both Chinese and English, but does not state whether the skill will default to one language or allow the user to choose. This can create an implicit language/locale behavior without explicit opt-in or justification.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
The natural-language interface is partially language-specific, listing fixed trigger phrases in Chinese and English, but it does not clarify whether users may interact in any language or choose their preferred locale. This can create an implicit language expectation without documented opt-in.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This markdown file is primarily written in Chinese, but the required output items are specified as English phrases like "audit summary" and "fix priority list." That creates an implicit language requirement for outputs without documenting user choice or opt-in, which may conflict with language/locale policy expectations.

Static analysis

No suspicious patterns detected.