Back to skill

Security audit

premium-html-studio

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent HTML document-generation skill, but generated documents can load remote scripts/fonts and include an unsafe search snippet, so users should review it before use with sensitive content.

Install only if you are comfortable reviewing or editing the generated HTML before sharing it. For sensitive proposals, internal architecture docs, offline use, or documents hosted under an authenticated origin, remove or self-host CDN scripts and fonts, pin dependencies with integrity checks, and replace the search result innerHTML code with safe DOM construction.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:479
Finding

Generated Documents Execute Mutable Third-Party JavaScript Without Integrity Verification

Content
View full analysis
``` ```html ``` Additional remote executable dependencies include: ```html ``` ```html ``` ```html ``` ### Technical Analysis The Skill directs generated HTML documents to retrieve and execute JavaScript from public CDNs. None of the demonstrated script elements use Subresource Integrity through an `integrity` attribute, and no restrictive Content Security Policy is specified. The Prism autoloader also retrieves additional executable components dynamically from a remote directory. The Mermaid reference uses the mutable major-version selector `@10` instead of an immutable, exact rele ...[truncated 1972 chars]
Remediation
View remediation
``` 4. Avoid runtime dependency autoloaders. Bundle only the language components required by the document. 5. Add a restrictive Content Security Policy that limits scripts and outbound connections to explicitly approved sources. Prefer external, hashed scripts over inline scripts. 6. Maintain an inventory of dependency names, exact versions, hashes, licenses, and review dates. 7. Periodically scan the pinned dependencies for known vulnerabilities and update them through a controlled review process. 8. For sensitive or offline technical documents, self-host fonts and scripts and disable unnecessary outbound network requests entirely. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:785
Finding

Client-Side Search Can Reinterpret Document Text as Executable HTML

Content
View full analysis
{ const query = e.target.value; if (query.length < 2) { searchResults.classList.remove('active'); return; } const results = index.search(query); searchResults.innerHTML = results.map(r => { const section = document.querySelectorAll('section')[r.id]; const title = section.querySelector('h2').textContent; return `
${title}

${section.textContent.substring(0, 100)}...

`; }).join(''); searchResults.classList.add('active'); }); ``` ### Technical Analysis The search implementation reads section titles and content through `textContent`, inserts those values into template-literal HTML, and assigns the resulting string to `searchResults.innerHTML`. Using `textContent` when extracting a value does not make that value safe for later insertion into an HTML parser. Text containing markup characters or HTML entities can be interpreted as active markup when it is subsequently passed to `innerHTML`. This creates a DOM-based cross-site scripting sink when document content is untrusted or can be influenced by an attacker. The implementation also creates inline `onclick` attributes. Although the displayed result ID is expected to originate from the search index, inline handlers increase reliance on permissive script policy and unnecessarily mix data with executable markup. ### Attack Path 1. An attacker supplies or influences source material used to generate a document. 2. The attacker places a payload in a section heading or body so that it is initially represented as visible text rather than active HTML, for example through encoded markup. 3. The generated ...[truncated 1339 chars]
Remediation
View remediation
= sections.length) continue; const section = sections[id]; const item = document.createElement('div'); item.className = 'search-result-item'; const heading = document.createElement('strong'); heading.textContent = section.querySelector('h2')?.textContent || ''; const preview = document.createElement('p'); preview.textContent = `${section.textContent.substring(0, 100)}...`; item.append(heading, preview); item.addEventListener('click', () => scrollToSection(id)); searchResults.appendChild(item); } ``` If formatted snippets are required, use a carefully configured HTML sanitizer with an allowlist. Plain `textContent` rendering remains the preferred approach for search previews. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 238)May include surrounding context.

ARIA Labels

html
<!-- Tab buttons -->
<button class="tab active" data-tab="en" 
        aria-selected="true" 
        aria-controls="tab-en"

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 594)May include surrounding context.

✅ Bezier curves (complex flows):

svg
<!-- Organic flows, S-curves -->
<path d="M100 100 C150 150, 200 50, 250 100" stroke="#000" stroke-width="2" fill="none"/>

Unvalidated Output Injection

High
Category
Output Handling
Confidence
98% confidence
Finding

The client-side search example constructs HTML with template literals and assigns it directly to searchResults.innerHTML. Even though current values come from DOM text, this pattern is unsafe in a skill that encourages arbitrary document generation because any future untrusted section content, title text, or modified index data could become a DOM XSS sink.

Content

Scanner excerpt · SKILL.md (reported line 819)May include surrounding context.

md
}
  
  const results = index.search(query);
  searchResults.innerHTML = results.map(r => {
    const section = document.querySelectorAll('section')[r.id];
    const title = section.querySelector('h2').textContent;
    return `<div class="search-result-item" onclick="scrollToSection(${r.id})">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 849)May include surrounding context.

md
<input type="text" id="input-name" class="form-input" placeholder="输入名称">
</div>

<!-- Select -->
<div class="form-group">
  <label for="select-lang">语言</label>
  <select id="select-lang" class="form-select">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1014)May include surrounding context.

md
</select>
</div>

<!-- Multi-language content -->
<section>
  <h2>
    <span data-lang="en">Background</span>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1200)May include surrounding context.

Code Splitting

html
<!-- Defer non-critical CSS -->
<link rel="preload" href="critical.css" as="style">
<link rel="stylesheet" href="critical.css">
<link rel="stylesheet" href="non-critical.css" media="print" onload="this.media='all'">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1370)May include surrounding context.

md
<a href="#features" class="btn">Learn More</a>
  </section>
  
  <!-- Features -->
  <section id="features">
    <h2>Features</h2>
    <div class="grid-3">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1508)May include surrounding context.

md
<!-- Timeline arrow with phase markers -->
<line x1="100" y1="500" x2="1100" y2="500"
      stroke="url(#g-arrow)" stroke-width="3"/>
<!-- Phase markers -->
<g>
  <circle cx="200" cy="500" r="8" fill="url(#g-brand)"/>
  <text x="200" y="530" text-anchor="middle" class="mono" font-size="11">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1892)May include surrounding context.

md
<button class="tab" data-tab="option2">选项 2</button>
</div>

<!-- Tab content panels -->
<div class="tab-content active" data-group="unique-group-name" data-tab="option1">
  选项 1 的内容
</div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1966)May include surrounding context.

html
<!-- ✓ CORRECT: Each nesting level has unique data-group -->
<div class="tab-content" data-group="examples" data-tab="ex1">
  <div class="tabs" data-group="example1-lang">  <!-- Unique group name -->
    <button class="tab active" data-tab="en">EN</button>
    <button class="tab" data-tab="zh">中文</button>
  </div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 2170)May include surrounding context.

md
fill="url(#g-brand-card)" stroke="#c7d2fe" stroke-width="1"/>

  <!-- ⚠️ CRITICAL: Use SINGLE <path> for title bar — NEVER two stacked <rect> -->
  <!-- Two stacked rects create a visible seam line at their boundary -->
  <!-- Path formula for top-rounded rect: -->
  <!--   M x y+h  V y+r  Q x y x+r y  H x+w-r  Q x+w y x+w y+r  V y+h  Z -->
  <path d="M {x} {y+h} V {y+r} Q {x} {y} {x+r} {y} H {x+w-r}

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 2359)May include surrounding context.

  1. Timeline bar — Use TWO stacked rects: light background + gradient progress:
svg
<!-- Background (entire timeline, muted) -->
<rect x="100" y="178" width="1000" height="6" rx="3" fill="#e0e7ff"/>
<!-- Progress (completed portion, gradient from brand to success) -->
<rect x="100" y="178" width="850" height="6" rx="3" fill="url(#g-timeline)"/>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/svg-components.svg (reported line 1)May include surrounding context.

text
<!-- ===========================================
     PREMIUM SVG COMPONENTS TEMPLATE
     Reusable SVG pieces for flow diagrams.
     Copy & adapt for your document.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill metadata and front matter advertise a very broad trigger list including generic phrases like 'proposal', '漂亮的页面', and 'generate a doc', which can cause the skill to activate in contexts unrelated to this specialized HTML generator. Over-broad activation increases the chance of accidental invocation, prompt hijacking into unrelated workflows, and exposure of users to risky HTML/JS-generating behavior when they did not explicitly request it.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The SVG imports fonts from Google Fonts, which causes outbound network requests when the asset is rendered in supporting environments. This leaks viewer metadata such as IP address and user agent to a third party and can break offline, air-gapped, or privacy-sensitive document generation workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This SVG template includes visible text content in Chinese such as "阶段标题", "任务描述", and "交付物". Because the template does not indicate that it is region-specific or offer users a language/localization choice, it creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file’s descriptive comments frame the template as optimized for Chinese technical deep-dives and explicitly label fonts and usage as Chinese-first. This can be a natural-language locale preference embedded in the skill asset without any indication that users may choose another language or locale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The stylesheet imports fonts from Google Fonts, which causes clients rendering the HTML to make external network requests. In a single-file documentation template, this introduces privacy leakage, third-party dependency, and reliability risk because viewing the document reveals metadata to Google and rendering can fail or change when offline or under restricted networks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The stylesheet imports Google Fonts from an external origin, so generated 'single-file HTML' documents are not actually self-contained and will trigger outbound requests when viewed. This can leak reader IP address, user-agent, referrer, and viewing timing to a third party, and it can also break in offline or restricted environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The external font import causes an undisclosed network request to Google Fonts whenever the document is loaded. Even though the request is not code execution, it creates a privacy and supply-chain dependency that is inconsistent with the stated purpose of generating standalone documents.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.