Back to skill

Security audit

一键生成高互动文案视觉封面

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent, but its generated HTML can include unescaped user or web-sourced text that may run JavaScript when opened.

Review this skill before installing. Its core workflow is understandable, but only use it with trusted text or fix the generator to HTML-escape all inserted content and add a restrictive Content Security Policy. Be aware it writes files to a fixed OpenClaw workspace output folder and instructs the agent to open that folder automatically.

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/generate-cover-html.py:79
Finding

Stored HTML and JavaScript Injection Through Unescaped Cover Content

Content
View full analysis
{word}' ) # Use the supplied emoji or the style's default emoji display_emoji = emoji if emoji else style_config["emoji"] # Build interaction-guide HTML when supplied guide_html = "" if guide_text: guide_html = f'''
{guide_text}
''' ``` The resulting values are inserted directly into the generated document: ```python 笔记封面 - {text[:20]}... ``` ```python {display_emoji}
{highlighted_text}
{guide_html} ``` ### Technical Analysis The command-line arguments `--text`, `--guide`, `--highlight`, and `--emoji` are treated as trusted HTML. They are interpolated into element content without HTML escaping or sanitization. Because browsers parse these values as markup rather than plain text, an attacker can inject arbitrary elements and event-handler attributes. For example, the following guide value creates an image whose error handler executes JavaScript when the generated file is opened: ```bash python scripts/generate-cover-html.py \ --text "Cover text" \ --guide '' \ --output malicious-cover.html ``` The generated document contains: ```html
``` The same injection principle applies to text, highlighting terms, and custom emoji. The title insertion is also unsafe because a value containing `` can leave the title context and inject elements i ...[truncated 2018 chars]
Remediation
View remediation
` wrapper. 3. Escape title content separately: ```python safe_title = escape(text[:20], quote=True) ``` 4. Do not use a general HTML sanitizer unless formatted HTML is intentionally supported. These arguments are documented as plain text, so encoding all markup characters is the safer design. 5. Add a restrictive Content Security Policy to generated pages as defense in depth: ```html ``` If external images or other resources become necessary, allow only specifically required sources. 6. Add automated tests for all input fields using payloads containing: - `
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description promises a broader social-media content creation tool: generating high-interaction copy, a 3:4 visual cover, and complete posting content with hashtags for multiple content themes. The supplied code only creates an HTML cover layout from user-provided text and optional guide/highlight parameters. It does not analyze topics, generate copy, produce hashtags, or assemble full publish-ready posts. The cover-generation aspect is consistent with part of the description, but the primary described capability is materially broader than the actual implementation. Therefore this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs the agent to write HTML files into a local workspace, which is a state-changing capability, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, undeclared write capability increases the chance of unexpected filesystem modification and weakens user awareness and policy enforcement around what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill directs the agent to write files to a fixed workspace path and automatically open the output directory, but it does not clearly disclose these side effects as actions requiring consent. Hidden or insufficiently disclosed filesystem writes and local command execution can surprise users and normalize silent state changes on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Including an open ... shell command to launch the output directory without prominent disclosure introduces implicit local command execution. Even though the command is not inherently destructive, executing host commands without explicit user awareness or consent is dangerous in agent contexts because it broadens the operational boundary from content generation to system interaction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and core rule require all copywriting to follow Chinese-language constraints such as a 15-50 character sentence format, but the document provides no opt-in or alternative for other languages. This is a natural-language policy concern because it imposes a specific language/locale by default rather than letting the user choose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generated document hard-codes <html lang="zh-CN">, which enforces a specific language/locale in the output regardless of user preference. The file also presents the tool generally as an HTML cover generator rather than a clearly region- or compliance-specific utility that would justify this restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file’s natural-language content is fully Chinese and does not indicate that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.