Back to skill

Security audit

Xhs Html Cover

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local HTML-to-PNG image generator, with a real input-sanitization caution but no evidence of deception, persistence, credential access, or unrelated behavior.

Install this only if you are comfortable with a local browser rendering user-provided text into HTML. Avoid using untrusted raw HTML as input, and prefer adding HTML escaping, content limits, JavaScript-disabled rendering, and network request blocking before using it with arbitrary third-party content.

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
templates/horoscope-cover.html:60
Finding

Unescaped template interpolation permits HTML and active-content injection

Content
View full analysis
{{title}} ...
{{badge}}
{{lucky_char}}
{{date}}
宜 {{yi}}
忌 {{ji}}
财神方位 {{caishen}}
吉时 {{jishi}}
{{advice}}
``` `templates/horoscope-cover.html:5, 60-70`: ```html {{title}} ...
{{header}}
{{title}}
{{emoji}}
{{subtitle}}
{{content}}
{{footer}}
``` `templates/zodiac-cover.html:5, 62-70`: ```html {{title}} ...
{{badge}}
{{emoji}}
{{title}}
{{subtitle}}
{{content}}
{{footer}}
``` ### Technical Analysis The templates place variable values directly into HTML text and document-title contexts. The `{{conten ...[truncated 2942 chars]
Remediation
View remediation
`, `"`, and `'` before inserting titles, subtitles, dates, labels, footer text, advice, emoji values, and other user-controlled strings. 2. **Eliminate unrestricted `{{content}}` fragments.** Represent rankings and tips as structured arrays, then create the required elements using safe DOM APIs such as `document.createElement()` and `textContent`. Do not construct these sections through untrusted `innerHTML` or raw string concatenation. 3. **Apply strict sanitization if formatted HTML is required.** Use a maintained sanitizer with a minimal allowlist. Reject scripts, event-handler attributes, iframes, object/embed elements, SVG/MathML, forms, URL-bearing elements, CSS injection, and dangerous URL schemes. 4. **Harden Playwright rendering.** - Disable JavaScript when it is unnecessary. - Intercept requests and reject all network access, or allow only explicitly required local resources. - Use a fresh isolated browser context for every rendering operation. - Preserve Chromium sandboxing and run the renderer as a low-privilege account. - Apply navigation and rendering timeouts. 5. **Define field limits.** Enforce maximum lengths, expected data types, and character constraints where appropriate to reduce denial-of-service and layout-manipulation risks. 6. **Add security tests.** Test all placeholders with element-closing payloads, script tags, event handlers, external images, iframes, SVG payloads, malformed markup, and dangerous URL schemes. Verify that the generated document contains only encoded text and makes no outbound requests. 7. **Document the trust boundary.** Update `SKILL.md` to state that input is untrusted, define the required escaping process, and identify which fields—if any—may contain sanitized formatting. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Claiming the tool can generate images from '任意主题' makes the invocation boundary too permissive and underspecified. This broad scope can cause the agent to select the skill in unintended contexts and process arbitrary user-controlled content through HTML templating and browser rendering, which raises the risk of unsafe or inappropriate execution paths.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises activation on extremely broad phrasing such as '输入任意主题' and implies it should run for almost any image-related request. In an agent ecosystem, this can cause over-triggering, where the skill is invoked on ambiguous or unrelated prompts, increasing the chance of unintended file access, rendering of unsafe content, or misuse of the Playwright-based local execution path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The HTML root element is hard-coded with lang="zh-CN", which imposes a specific language/locale on all rendered output. Under the policy, locale constraints should either be optional for the user or clearly documented as region-specific and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy issues. This skill appears to force a specific language experience, and there is no indication that users may choose another language or that the Chinese-only presentation is required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This HTML template declares lang="zh-CN" and uses Chinese-only UI labels and typography, which imposes a specific language/locale in the rendered output. Under the policy, forcing a locale without offering user choice or documenting a justified region-specific constraint 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
92% confidence
Finding

The template declares lang="zh-CN", which hard-codes a specific language/locale in natural-language-facing output. Under the policy, forcing a locale without user opt-in can be a language policy violation unless it is clearly documented as region-specific, which is not evident in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.