Back to skill

Security audit

Kindle知识卡片生成器

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent card-generation purpose, but it writes and auto-opens HTML that can execute unescaped user content and unpinned remote JavaScript.

Review before installing. Use it only with trusted source material, avoid opening generated cards from untrusted inputs, and consider removing the Tailwind CDN script plus escaping all inserted text before relying on the output. Also confirm before overwriting an existing index.html in a working directory.

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)

T09 · Insecure Skill Coding Practices

Error
Location
references/card-template.html:350
Finding

Unescaped user-controlled content permits persistent HTML and script injection

Content
View full analysis
NO.{{NUMBER}}
{{TAG}}
{{TITLE}}
{{SUBTITLE}}

{{SUMMARY}}

{{MECHANISM_BLOCK}}
{{BODY_CONTENT}} {{QUOTE_BLOCK}}

BY {{AUTHOR}}

``` ### Technical Analysis The Skill accepts user-provided material, including structured JSON or YAML, and transforms it into `cardData`. The resulting values are inserted into an HTML document through direct string replacement. No instruction requires HTML entity encoding, attribute encoding, URL validation, or sanitization of active HTML. Although `MECHANISM_BLOCK`, `BODY_CONTENT`, and `QUOTE_BLOCK` intentionally contain generated markup, the user-derived text embedded inside those blocks ...[truncated 2088 chars]
Remediation
View remediation
` as `>` - `"` as `"` - `'` as `'` 2. Treat `TAG`, `TITLE`, `SUBTITLE`, `SUMMARY`, `AUTHOR`, action fields, comparison fields, mechanism text, and quote text strictly as plain text. 3. Construct the optional structural blocks exclusively from trusted, fixed templates. Escape each nested text value before adding it to those blocks. 4. Enforce strict allowlists: - `body_type`: `process`, `compare`, or `concept` - `color`: `red`, `yellow`, `green`, `blue`, or `purple` - `tag`: only the documented tag values - `number`: exactly three decimal digits - `step`: only the supported step symbols 5. Prefer DOM construction with `textContent` over HTML string concatenation when implementation constraints permit. 6. Add a restrictive Content Security Policy after removing remote executable dependencies. For a fully self-contained static card, consider: ```html ``` 7. Do not automatically preview the output until validation and sanitization have completed successfully. 8. Add regression tests containing payloads in every user-controlled field, including: ```html

``` ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
references/card-template.html:7
Finding

Generated cards execute mutable JavaScript from an unversioned external CDN

Content
View full analysis
{{TITLE}} — 知识卡片 @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700&display=swap'); ``` The security-relevant executable dependency is: ```html <script src="https://cdn.tailwindcss.com"></script> ``` ### Technical Analysis Each generated card loads and executes JavaScript from `cdn.tailwindcss.com` whenever the file is opened. The URL is not pinned to a reviewed version, and the document provides no Subresource Integrity hash or restrictive Content Security Policy. Consequently, the effective JavaScript payload can change after the Skill package has been audited. Execution depends on the CDN account, CDN infrastructure, DNS and certificate trust chain, and future upstream behavior. This conflicts with the project's claim that output has zero dependencies: the generated file requires a third-party executable resource at runtime. The Google Fonts import is an additional external request and privacy/offline-availability concern, although it does not itself execute JavaScript. ### Attack Path 1. The Skill generates an `index.html` containing the external Tailwind CDN script. 2. The Skill automatically opens the generated card, or a user opens it later. 3. The browser requests JavaScript from `https://cdn.tailwindcss.com`. 4. If the upstream resource, CDN account, delivery infrastructure, or trusted network path serves modified JavaScript, the browser executes it automatically. 5. The remote payload runs in the generated page's browser context without an integrity check or user confirmation. No modification to the locally reviewed Skill files is necessary after initial installation; ...[truncated 808 chars]
Remediation
View remediation
``` 6. Add an offline test that fails if the generated card attempts any external network request. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list is broad and ambiguous, including generic phrases like '知识卡片' and related variants without clear activation boundaries. In an agent environment, this can cause unintended invocation on ordinary user requests, leading the skill to take over workflows or alter outputs when the user did not explicitly intend to use it.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The Chinese trigger list includes "生成卡片" (generate card), which is broad and could overlap with ordinary requests unrelated to this specific Kindle-style knowledge-card skill. The file does not provide exclusion conditions or negative examples to clarify when this trigger should or should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file mandates title to be "≤8个汉字", imposing a Chinese-language-specific output constraint. This is a natural-language policy concern because the skill does not offer users a language or locale choice, nor does it justify the restriction as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to write an index.html file into the user's working directory without requiring confirmation or warning the user. Any skill that performs filesystem writes can create or overwrite local files unexpectedly, and in this case the output is HTML that may later execute active content when opened.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML root sets lang="zh-CN", and the template content is written entirely in Chinese, which indicates the skill output is fixed to a specific language/locale. The policy allows locale constraints only when users can opt in or when the regional limitation is clearly documented and justified, neither of which appears in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire skill reference is written in Chinese and does not indicate that language selection is optional or limited to a justified region-specific use case. Under the policy, forcing a specific language without user opt-in 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
71% confidence
Finding

The skill README is entirely written in Chinese and all example trigger phrases are Chinese-only, which suggests a language constraint without stating that users may choose another language. This can conflict with language/locale choice expectations when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

Automatically launching a browser preview causes the agent to open an external application without an explicit opt-in at execution time. Because the generated artifact is HTML and the skill also references a Tailwind CDN, previewing can trigger local rendering plus network activity, making this more sensitive than a passive text output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all user-facing instructional content in Chinese, while the applicable policy requires flagging language or locale constraints that are imposed without opt-in. There is no indication that the user can choose another language or that the file is intended for a clearly documented region-specific use case.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.