Back to skill

Security audit

中文哈佛论文生成

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a Chinese Harvard-style paper formatter, but it should be reviewed because untrusted Markdown is passed to Pandoc without resource controls.

Install only if you want a Chinese Harvard-style DOCX paper workflow. Use trusted source files, or strip Markdown image/resource references before conversion; for untrusted submissions, run pandoc in a sandbox with no network and limited filesystem access. Also verify the generated DOCX, because the script may output placeholder sections unless the agent has already produced the polished paper text.

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
scripts/make_harvard_paper.sh:92
Finding

Untrusted Markdown May Cause Pandoc to Access Local or Remote Resources

Content
View full analysis
> "$TMP_MD" pandoc "$TMP_MD" \ -o "$OUT_DOCX" \ --toc \ --number-sections \ -V papersize:a4 \ -V fontsize=12pt \ -V geometry:margin=2.54cm ``` ### Technical Analysis The script appends the supplied source file directly to a temporary Markdown document and processes it with Pandoc without validating embedded resource references or restricting Pandoc's filesystem and network access. Markdown can contain image and other resource references. Depending on the installed Pandoc version, document content, and supported URI schemes, Pandoc may resolve these references by reading local resources or requesting remote URLs during DOCX generation. No sandbox, network isolation, resource allowlist, or input filtering is applied. This creates a potential local-file disclosure or server-side request forgery condition when an attacker can control the source document and subsequently obtain the generated DOCX. The behavior occurs with the privileges and network access of the process running the script. ### Attack Path 1. An attacker supplies a Markdown source file containing a crafted resource reference, such as an image pointing to a sensitive local path or an internal HTTP endpoint. 2. The script appends the attacker's Markdown unchanged to the temporary document. 3. Pandoc parses the document and attempts to resolve the referenced resource. 4. A remote reference may cause a request from the host running the skill, including requests to services not directly reachable by the attacker. 5. A readable local or remote resource may be embedded in the generated DOCX. 6. If the generated document is returned to the attacker, the attacker can inspect it for disclosed content or use request side effects to probe internal ser ...[truncated 783 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明强调该技能能把中文需求改写并排版成哈佛格式论文,并生成包含摘要、关键词、目录、分级标题、参考文献的 Word 文档,暗示存在内容生成/改写能力。实际代码只是一个 shell 脚本:校验参数和 pandoc 是否存在,创建一个预设 Markdown 模板,把输入素材原文附在模板后,再调用 pandoc 导出 docx。目录和编号由 pandoc 支持生成,但摘要、关键词、引言、文献回顾、方法、结果、结论、参考文献等内容均是静态占位文字或示例,并未从素材中提炼生成;“素材原文”甚至注明用于改写但实际被直接附加。故其主要行为是“套模板并导出 Word”,与“快速改写成完整哈佛格式论文”的核心描述存在实质不符。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description says to use the skill when the user mentions phrases like “写论文” and “学术润色,” which are common, broad requests rather than narrowly scoped triggers. It does not provide exclusion conditions or negative examples to distinguish this specific Harvard-format Word-paper skill from general writing assistance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The user-facing usage text and document metadata indicate the skill is fixed to Chinese, including lang: zh-CN in the generated document. This is a natural-language policy concern because the script imposes a specific language/locale without any opt-in or alternative path for users who may expect other languages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown content is entirely presented in Chinese, including the title and section headings, without offering an alternative language or indicating that the skill is intentionally region- or language-specific. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.