Back to skill

Security audit

网站开发辅助决策

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated purpose, but its HTML report generator can embed untrusted text as active HTML or JavaScript in generated reports.

Install only if you are comfortable with a skill that searches the web and creates local HTML reports. Treat generated reports as untrusted files: avoid opening reports made from untrusted inputs, do not host them under an authenticated site, and prefer a fixed output folder. The publisher should HTML-escape all dynamic fields before this is considered low-risk.

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

Error
Location
scripts/report_generator.py:296
Finding

Unescaped Input Enables Persistent HTML and JavaScript Injection in Generated Reports

Content
View full analysis

🔍 一、搜索热度分析

{make_score_bar(sh_score)}
搜索趋势
{trend_icon} {sh_trend}
月搜索量
{sh_volume}

{sh_detail}

""" if sh_keywords: html += '
关联关键词: ' for kw in sh_keywords: html += f'{kw} ' html += '
' ``` The CLI accepts JSON data without applying output encoding: ```python data = { "name": args.name, "category": args.category, ...[truncated 3414 chars]
Remediation
View remediation
{html_text(kw)}' html += f'

{html_text(sh_detail)}

' ``` 2. Prefer an auto-escaping template engine such as Jinja2 instead of manually constructing HTML with f-strings: ```python from jinja2 import Environment, select_autoescape env = Environment(autoescape=select_autoescape(["html", "xml"])) template = env.from_string(template_source) html = template.render(**data) ``` Do not use a template engine's `safe` filter for web-search or user-controlled data. 3. Validate data types and ranges before rendering. In particular: - Require scores to be finite numeric values. - Restrict scores to the range `0` through `100`. - Require expected list and object fields to have the documented structure. - Reject unexpectedly nested objects where plain text is required. - Limit field lengths to prevent excessively large output. 4. Keep trusted presentation markup separate from untrusted report content. Dynamic values should be treated as plain text unless a field explicitly requires sanitized rich text. 5. If rich HTML must be supported, sanitize it with a maintained allowlist-based HTML sanitizer. Allow only required elements and attributes, and reject scripts, event-handler attributes, dangerous URLs, embedded frames, and active content. 6. Add automated security tests covering: - `
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger examples use broad natural-language phrases such as '帮我评估…可行吗' and '分析…的可行性', which can overlap with ordinary conversation and may cause unintended activation of the skill. In an agent environment, ambiguous activation boundaries can route unrelated user requests into this skill, leading to prompt hijacking opportunities, incorrect tool usage, or accidental disclosure of user context to the skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill invokes a Python report generator and writes an HTML file, but it does not declare any explicit tool scope such as allowed-tools or permissions. That mismatch weakens least-privilege guarantees and can let the runtime grant broader file-write capability than reviewers or users expect, especially because the output path is parameterized.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill says usage is '触发词 + 产品类型 + 产品名称', but the examples include broad natural requests like '帮我评估做在线教育平台网站可行吗' and '分析宠物社交网站的可行性'. These phrases resemble everyday conversation and the file does not provide exclusion conditions or a bounded trigger list, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file is a code file, so SQP-3 applies to its natural-language strings. The docstring and generated report content consistently enforce Chinese-language output and a zh-CN HTML locale, but the skill does not provide any user opt-in, fallback, or explanation that it is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The report template sets lang="zh-CN" and the surrounding report content is written in Chinese throughout, creating a fixed locale behavior. Under SQP-3, forcing a specific language/locale without offering a 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
94% confidence
Finding

The skill description is written as a Chinese-only instruction and presents the skill behavior in Chinese without indicating that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless the constraint is documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.