Back to skill

Security audit

Book Infographic

Security checks for vulnerabilities and agentic risk

Overview

The skill is broadly aligned with PDF-to-infographic generation, but its generated HTML can run remote JavaScript and may insert PDF-derived text into active HTML or JavaScript without safeguards.

Review before installing or using with sensitive documents. Prefer only opening generated HTML locally, avoid processing untrusted PDFs unless the template generation escapes HTML and serializes chart data safely, and consider vendoring ECharts or adding SRI/CSP before sharing generated infographics.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
assets/templates/infographic_template.html:203
Finding

Unescaped PDF-Derived Content Can Cause HTML and JavaScript Injection

Content
View full analysis

{{BOOK_TITLE}}

{{AUTHOR}} | {{PUBLICATION_YEAR}} | {{CORE_THEME}}

{{CONCEPT_TAGS}}
{{CHAPTER_CARDS}}
``` ```javascript xAxis: { type: 'category', data: {{CHAPTER_NAMES}}, axisLabel: { interval: 0, rotate: 30, fontSize: 11 } }, series: [{ name: '字数', type: 'bar', data: {{CHAPTER_WORDS}}, itemStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: '#2196F3' }, { offset: 1, color: '#64B5F6' } ]), borderRadius: [4, 4, 0, 0] }, barWidth: '50%' }] ``` ```javascript data: {{KNOWLEDGE_NODES}}, links: {{KNOWLEDGE_LINKS}}, ``` ```javascript data: {{CONTENT_TYPES}} ``` ### Technical Analysis The template places generated values directly into two security-sensitive contexts: 1. HTML document content, including `BOOK_TITLE`, `AUTHOR`, `CORE_THEME`, `CONCEPT_TAGS`, and `CHAPTER_CARDS`. 2. Executable JavaScript expressions, including chapter names, chart values, graph nodes, graph links, and content types. The documented workflow derives infographic content from user-supplied PDF documents. Neither the template nor the accompanying workflow defines contextual escaping, HTML sanitization, strict schema validation, or safe JSON serialization. Consequently, content originating in a crafted PDF can be carried into the generated infographic. For HTML placeholders, attacker-controlled markup could introduce elements, event-handler attributes, deceptive links, or other active content. For JavaScript placeholders, a value t ...[truncated 2072 chars]
Remediation
View remediation
` sequences, and JavaScript expression termination. ]]>

T08 · Insecure Dependencies

Warning
Location
assets/templates/infographic_template.html:7
Finding

Remote ECharts Script Is Loaded Without Subresource Integrity Verification

Content
View full analysis
``` ### Technical Analysis The generated infographic loads executable JavaScript from a third-party CDN whenever the document is opened. Although the dependency URL pins ECharts to version `5.4.3`, the element does not include a Subresource Integrity (`integrity`) hash. The browser therefore verifies transport security through HTTPS but does not verify that the returned file matches a specific reviewed artifact. If the CDN, upstream package artifact, or relevant delivery infrastructure is compromised, modified JavaScript can be returned and executed in every generated infographic that references this URL. The remote dependency also means the effective executable content of the output is not fully contained in the audited project. ### Attack Path 1. The Skill generates an infographic containing the remote ECharts script reference. 2. A victim opens the generated HTML while connected to the network. 3. The browser requests `echarts.min.js` from jsDelivr. 4. A compromise affecting the CDN delivery path or hosted package artifact causes altered JavaScript to be returned. 5. Because no integrity hash is specified, the browser accepts and executes the altered response. 6. The malicious script runs in the generated document's browser context. ### Impact Assessment A compromised dependency can execute arbitrary client-side JavaScript in the infographic. This may allow an attacker to: - Read or modify all content in the generated document. - Display deceptive or malicious UI. - Redirect the viewer. - Issue outbound requests and exfiltrate information accessible to the page. - Affect every generated infographic that loads the compromised remote asset. The is ...[truncated 190 chars]
Remediation
View remediation
``` 4. Do not insert a placeholder integrity value in production; calculate and independently verify the exact hash for the distributed artifact. 5. Apply a restrictive Content Security Policy that permits scripts only from explicitly approved locations. 6. Establish a dependency update process that includes version review, checksum verification, vulnerability scanning, and regression testing. 7. Consider producing a fully self-contained offline infographic to eliminate runtime CDN availability and privacy dependencies. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

描述将该技能定位为一个能够把PDF书籍内容转化为高质量、可编辑信息图和图表的可视化生成工具,并强调核心知识点提取与章节摘要。实际代码是一个命令行PDF解析器:使用 pdfplumber 提取每页文本、页面宽高和表格,依据正则匹配检测章节标题,然后将章节全文按长度截断形成 summary,最后输出JSON。这与声明相比,主能力明显偏向“结构化提取/解析”,而不是“信息图或可编辑图表生成”。其中章节摘要功能部分匹配,但所谓‘核心知识点提取’也未见真正的语义分析或要点抽取,仅是简单截断文本。因此声明对技能能力有明显夸大,属于描述与实际行为不一致。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill instructs the agent to run a parser and write extracted results to disk, but it declares no explicit tool scope or permissions boundaries. In an agent environment, missing scope declarations can allow broader-than-necessary file write behavior, increasing the chance of unintended overwrites or abuse if inputs or downstream paths are changed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document declares lang="zh-CN" and the visible interface text throughout the template is written in Chinese, which enforces a specific language/locale by default. Under the stated policy, this is a natural-language policy violation unless the skill offers user opt-in or clearly documents a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template loads ECharts from a third-party CDN at render time, which creates a supply-chain and privacy risk: if the CDN is compromised, blocked, or serves modified content, the generated infographic will execute untrusted JavaScript in the viewer's browser. This is especially relevant because the skill's stated purpose is local PDF/book analysis and infographic generation, which does not inherently require remote code execution from an external domain.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The generated HTML depends on remote JavaScript from jsDelivr to function, so opening the infographic triggers execution of code outside the skill author's control. That expands the trust boundary unnecessarily for a book-summary artifact and can expose users to supply-chain compromise, tracking, or failure in restricted/offline environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language strings that force a specific language for documentation and user messages. Under the policy, locale constraints should either be optional for the user or clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill processes user-supplied PDFs and generates output artifacts, yet it provides no warning about sensitive document handling, storage of extracted content, or generated files remaining on disk. This can lead to accidental exposure of confidential material in shared workspaces, logs, or retained output files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that users may choose another language or locale. Under the policy rule for natural-language constraints, forcing a specific language without user opt-in can be a policy violation.

Content

No source excerpt is available for this finding.