Back to skill

Security audit

CTQ分析技能

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent VOC/CTQ analysis tool, but users should review it because generated HTML reports can include unescaped user-controlled CTQ names and customer-feedback outputs may persist sensitive data locally.

Review before installing if you will process real customer or business feedback. Keep input and output paths in a controlled workspace, avoid opening or publishing reports generated from untrusted CTQ files, and treat exported JSON/HTML as potentially sensitive until reviewed or redacted.

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/voc_analyzer.py:560
Finding

Stored HTML Injection Through Unsanitized CTQ Names in Generated Reports

Content
View full analysis

CTQ优先级评分表

{''.join(f'''''' for s in scored_data['ctq_scores'])}
排名CTQ名称频率评分情感评分权重评分综合评分优先级
{s['priority_rank']}{s['ctq_name']}{s['frequency_score']:.2f}{s['sentiment_score']:.2f}{s['importance_score']:.2f}{s['final_score']:.3f}{s['priority_level']}
``` ### Technical Analysis The report generator constructs HTML with an f-string and directly inserts `s['ctq_name']` into a table cell without HTML escaping or sanitization. CTQ names can originate from a user-supplied CTQ JSON file. The value is copied into mapping data at `scripts/voc_analyzer.py:271`, propagated into scoring data at lines 316 and 355, and finally inserted into the generated HTML report at line 570. No validation restricts the field to plain text, and no output encoding is applied at the HTML sink. An attacker-controlled value such as: ```html ``` is therefore interpreted as markup rather than displayed as text. Event-handler attributes can execute JavaScript when a user opens the generated report. ### Attack Path 1. An attacker creates or modifies a CTQ definition containing a malicious `name` value: ...[truncated 1640 chars]
Remediation
View remediation
{int(score['priority_rank'])} {ctq_name} {float(score['frequency_score']):.2f} {float(score['sentiment_score']):.2f} {float(score['importance_score']):.2f} {float(score['final_score']):.3f} {priority_level} """) table_rows = ''.join(rows) ``` 3. Prefer an HTML template engine with automatic escaping enabled rather than manually assembling HTML with f-strings. 4. Validate CTQ input data before processing: - Require `name` to be a string. - Enforce a reasonable maximum length. - Reject control characters. - Restrict priority levels to the explicit allowlist `P0`, `P1`, `P2`, and `P3`. 5. Treat all labels passed to Pyecharts as untrusted data. Confirm that the library safely serializes chart labels, and sanitize or encode them before use if required. 6. Add regression tests using payloads containing HTML elements, quotes, event handlers, and closing tags. Verify that generated reports display these values as literal text and do not create executable DOM elements. 7. If reports are served over HTTP, deploy a restrictive Content Secur ...[truncated 179 chars]
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 (6)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill clearly instructs reading user-supplied local files and writing analysis outputs, but it does not declare any explicit tool scope or permission boundaries. This can lead to over-broad file access at runtime and makes it harder for the platform or user to understand and constrain what filesystem operations the skill may perform.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are broad enough to overlap with many generic text-analysis or requirements-analysis requests, which can cause unintended activation. Mis-triggering a skill that reads local feedback files and produces outputs increases the chance of processing sensitive customer data without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill processes customer feedback and writes results to local JSON/HTML outputs, yet it does not warn users about privacy, sensitive data handling, or persistence of exported reports. Because customer feedback may include personal or confidential business information, silent local storage and report generation can create avoidable data exposure risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language descriptions and CLI prompts exclusively in Chinese, including the module description and supported modes. Because the skill does not offer user opt-in for language selection or explain that it is intentionally limited to a Chinese-only context, it violates the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire specification is written in Chinese and includes Chinese-only field descriptions and examples, but it does not state that the skill is region-specific or offer an alternative language/locale option. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.