Back to skill

Security audit

AI纹身设计指南

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent tattoo advice guide, but its generated HTML reports can expose embedded personal consultation details to unverified third-party JavaScript.

Before installing, confirm you want a Chinese/China-localized tattoo consultant and avoid embedding sensitive medical, identity, or workplace details in generated reports unless the Chart.js dependency is bundled locally or protected with SRI and a restrictive CSP.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Warning
Location
assets/report-template.html:7
Finding

Third-Party JavaScript Executed Without Subresource Integrity

Content
View full analysis

Vulnerability Details

File Location: assets/report-template.html:7
Vulnerability Type: Unverified third-party dependency loaded at runtime
Risk Level: Medium

Vulnerable Code

html
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>

Technical Analysis

The generated HTML report loads and executes Chart.js directly from the jsDelivr CDN. Although the dependency is pinned to version 4.4.0, the script element does not include a Subresource Integrity (integrity) hash or the corresponding crossorigin="anonymous" attribute.

Consequently, the browser trusts and executes whatever JavaScript the external endpoint returns when a report is opened. The effective code is retrieved after the Skill package has been reviewed and can therefore differ from the content considered during this static audit.

The project also states that report data is embedded in the HTML. Malicious code executing in the report's origin could read rendered or embedded consultation information, modify the report, and initiate external network requests, subject to browser origin and local-file security restrictions.

Attack Path

  1. The Skill generates an HTML consultation report from the supplied template.
  2. A user opens that report in a browser with network connectivity.
  3. The browser requests chart.umd.min.js from jsDelivr.
  4. An attacker who has compromised the CDN asset, its upstream package, or another relevant delivery component causes the endpoint to return modified JavaScript.
  5. Because no SRI hash is present, the browser cannot detect that the response differs from the reviewed asset.
  6. The malicious JavaScript executes in the report's browser context.
  7. It may alter consultation recommendations, read information embedded in the report, or attempt to transmit that information to an attacker-controlled endpoint.

Impact Assessment

Successful exploitation provides arbitrary JavaScript execution withi ...[truncated 778 chars]

Remediation
View remediation

Remediation Suggestions

  1. Preferred approach: bundle the dependency locally

    • Download Chart.js from its authoritative release source.
    • Verify its release checksum or signature.
    • Review and store the fixed asset inside the Skill package.
    • Reference the local copy so the audited package contains all executable code.
    html
    <script src="./vendor/chart.umd.min.js"></script>
    
  2. If CDN loading is necessary, enforce Subresource Integrity

    • Generate or obtain the official SHA-384 or SHA-512 digest for the exact Chart.js asset.
    • Add the verified digest and crossorigin="anonymous":
    html
    <script
      src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"
      integrity="sha384-REPLACE_WITH_VERIFIED_DIGEST"
      crossorigin="anonymous"></script>
    

    The placeholder must not be deployed; it must be replaced with a digest independently verified against the intended file.

  3. Add a restrictive Content Security Policy

    • Restrict scripts to the report itself and the explicitly approved dependency source.
    • Restrict outbound connections with connect-src.
    • If feasible, move inline JavaScript into a local file so script-src 'self' can be used without allowing unsafe inline execution.
  4. Maintain dependency controls

    • Continue pinning exact versions.
    • Periodically review Chart.js security advisories.
    • Record the dependency source and verified checksum.
    • Re-audit and update the bundled asset through a controlled process.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (11)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger scope is very broad, including essentially any discussion related to tattoo design, placement, safety, aftercare, or even vague idea-sharing. In an agent environment, this can cause the skill to activate in loosely related conversations and take over responses with unnecessary workflow steps, HTML generation, or localized advice, increasing the chance of irrelevant guidance or context hijacking.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill hard-codes China-specific language, pricing, regulatory assumptions, and legal guidance without asking for the user's jurisdiction or preferred language. If used for users outside China, this can produce incorrect compliance, safety, or pricing advice, which is especially risky in a body-modification context where legal age, hygiene standards, and practitioner regulation vary by region.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML root declares lang="zh-CN", which hard-codes a specific language/locale for the generated report. Under the policy, forcing a specific locale without user opt-in or clear region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The footer content shown to users is written entirely in Chinese, which enforces a single language experience. The file does not indicate that users can choose another language or that the skill is restricted to a Chinese-language context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

该文档写明当用户询问“纹在哪里合适”或需要身体部位推荐时加载本文档,触发条件偏宽,容易与普通关于位置、审美或护理的对话重叠,导致不必要地激活该技能上下文。误触发本身不是传统代码执行问题,但会带来策略偏移、无关内容注入和错误路由风险,尤其在多技能环境中可能影响回答准确性与安全边界。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation rule '当用户讨论纹身安全、护理、遮盖或修改时加载本文档' is broad and lacks exclusion criteria, so the document may be loaded in loosely related conversations without clear scope control. Over-broad activation increases the chance of irrelevant or premature safety/medical-style guidance being surfaced, which can misroute the agent and cause it to provide domain-specific advice outside appropriate context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s natural-language content and activation description are exclusively in Chinese, which effectively forces a specific language for users of the skill. The policy requires flagging language or locale constraints when the skill does not offer user opt-in or explain a justified regional scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The trigger examples are phrased in everyday language without corresponding non-trigger examples or limiting conditions. This makes the routing boundary ambiguous, which can lead to accidental activation on casual or partial matches and degrade safety by applying specialized advice where it was not requested.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template loads Chart.js from a third-party CDN at runtime, which introduces a supply-chain and privacy/dependency risk for an otherwise local HTML report. If the CDN resource is unavailable, tampered with, or blocked, report rendering can fail or execute untrusted JavaScript in the viewer's browser.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

整份技能文档以中文撰写,且未说明是否支持根据用户偏好切换语言;在技能说明层面,这可能导致默认强制特定语言输出而未获得用户选择或明确告知。根据 SQP-3,若技能未提供语言/locale 选择或合理限定,属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title, body, and activation guidance are all in Chinese, and the file does not indicate that the user opted into Chinese or that the skill is intentionally restricted to a Chinese-speaking or China-specific audience. This can violate language/locale policy when a skill implicitly forces one language without user choice.

Content

No source excerpt is available for this finding.