Back to skill

Security audit

paper-check

Security checks for vulnerabilities and agentic risk

Overview

This is a local thesis-formatting helper that reads user-provided documents and writes reports or repaired copies, with no hidden network, credential, or persistence behavior found.

Install and run this only in a virtual environment with pinned dependency versions when possible. Use copies of important thesis documents, choose explicit output filenames, and do not let repair operations overwrite the original file unless you have reviewed and confirmed the change.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding

Unpinned Third-Party Dependencies Allow Supply-Chain Substitution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15–17
Additional Location: README.md, lines 21–24
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code Snippet

markdown
- Python 3.7+
- Dependencies: `python-docx` (required), `pywin32` (required only for reading .doc files on Windows), `lxml`
- Installation command: `pip install python-docx lxml pywin32`

The same unpinned installation command is repeated in README.md:

bash
pip install python-docx lxml pywin32  # pywin32 is required only on Windows

Technical Analysis

The documented installation command resolves mutable third-party packages by name without version constraints or cryptographic hashes. It also does not specify a trusted package index. Consequently, the code installed by users can differ from the dependencies that were implicitly considered during this audit.

If the configured package index, a dependency release, or the dependency-resolution environment is compromised, pip may install attacker-controlled code. Such code can execute during package installation or when the project imports the package. The scripts directly import docx and lxml-backed functionality, making installed dependency code part of the Skill's effective execution path.

The command also installs pywin32 unconditionally even though it is documented as necessary only on Windows. This unnecessarily expands the dependency and attack surface on environments where it is not required.

This finding establishes unsafe dependency-management guidance. It does not establish that the currently published packages are malicious.

Attack Path

  1. A user loads the Skill and follows its prerequisite installation instructions.
  2. The user runs pip install python-docx lxml pywin32.
  3. pip resolves package versions from the user's configured package index without enforcing reviewed versions or hashes.
  4. An attacker compromises a resolved package ...[truncated 956 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every direct dependency to a reviewed version rather than allowing unconstrained resolution.

  2. Generate a lock or requirements file containing cryptographic hashes, and install it with hash verification:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Document and enforce a trusted package index, especially in automated environments.

  4. Apply a platform marker to pywin32 so it is installed only on Windows:

    text
    pywin32==<reviewed-version> ; sys_platform == "win32"
    
  5. Review and pin transitive dependencies through a reproducible dependency-locking process.

  6. Run dependency vulnerability and provenance checks in CI, and update pinned versions through a controlled review process.

  7. Install dependencies in an isolated virtual environment under a non-privileged account.

  8. Replace the unpinned commands in both SKILL.md and README.md with the hardened installation procedure.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents an end-user thesis formatting analysis and repair skill. However, the supplied code chunk is a developer-side validation utility that opens three Python files under scripts/ and checks whether they are syntactically valid Python. It neither processes thesis documents nor school formatting specifications, and it does not implement checking, fixing, or report generation for thesis formatting. This is a material description-behavior mismatch because the actual code has a different primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

代码的主功能是“导出论文当前格式信息”,而不是“依据学校规范进行检测和修复”。脚本命令行仅接收两个参数:论文路径和报告输出路径;代码中没有任何学校规范文档输入,也没有针对 .doc/.txt/.pdf 的解析逻辑。报告内容是列出页面、样式、段落、表格、图片等现状信息,虽然可辅助人工检查,但没有内置规范规则库或比较逻辑,因此不能算声明中的“自动解析规范要求并逐项对比检测”。同时,代码完全没有对文档进行写回修改的操作,也没有生成前后差异/修订对比的机制。因此,声明与实际行为存在明显且实质性的能力不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一套端到端论文格式规范处理工具,核心能力包括:接收并解析任意学校的规范文档、检查论文格式是否符合要求、自动修复格式问题、并生成对比报告。但提供的代码文件 generate_report.py 的职责非常单一:使用 python-docx 构建一个横向 A4 的 Word 报告,将外部传入的 repair_records/categories 汇总成表格,附带统计、人工确认事项和修改依据。代码中没有实现对规范文档或论文原文的打开、解析、规则提取、格式检查或修复逻辑,甚至 create_report_from_records 也明确依赖外部 fix_format.repair_records 作为输入。因此,代码与声明相比存在明显的能力缺失和主功能范围缩窄。唯一与声明一致的部分是“生成修改对比报告”。整体上属于实质性描述-行为不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
运行格式检测脚本 `scripts/check_format.py` 对论文文档进行全面扫描。检测脚本会输出以下信息:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
运行格式检测脚本 `scripts/check_format.py` 对论文文档进行全面扫描。检测脚本会输出以下信息:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
运行格式检测脚本 `scripts/check_format.py` 对论文文档进行全面扫描。检测脚本会输出以下信息:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is entirely presented in Chinese and links to Chinese-localized standards pages, with no indication that language choice is optional or that the skill is intentionally restricted to a Chinese-speaking or China-specific context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The changelog advertises automatic thesis-format repair and report generation but does not warn that the tool may modify user-supplied documents or create altered output files. In a document-processing skill, silent modification can cause accidental data loss, overwrite important work, or lead users to approve changes they did not intend, especially for high-stakes academic documents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises 'automatic repair' and 'one-click fix' for thesis documents but does not clearly warn users that their original .doc/.docx files may be modified or overwritten. In a document-processing skill, this can lead to accidental loss of user work, corruption of important academic documents, or unintended changes being applied without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill clearly describes reading user-supplied thesis and guideline files and writing repaired documents and reports, but it does not declare any explicit tool scope or permissions. This creates an authorization ambiguity where file access may be broader than users expect, increasing the chance of unintended reads or writes to local files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger phrases are broad enough to activate on common document-help requests without tight boundary conditions. In a skill that can inspect and modify files, overbroad activation increases the risk of the agent selecting this workflow inappropriately and performing file operations the user did not specifically intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs automatic repair and report generation, which implies modifying existing documents and creating new files, but it does not prominently require user consent or warn about write effects. In document workflows, silent writes can overwrite originals, create sensitive derivative files, or place outputs in unintended directories.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file presents all user-facing guidance in Chinese, beginning with the title at L001 and continuing throughout the document. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing natural-language instructions and labels exclusively in Chinese, including the title and usage guidance. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language descriptions and CLI usage text entirely in Chinese, presenting the tool as a general-purpose format checker rather than a clearly region-specific or opt-in Chinese-only utility. Under the policy rule for language/locale constraints, forcing a specific language without user choice is a violation when not explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. Here, the user-facing docstring and usage guidance are Chinese-only, which effectively forces a specific language for operating the skill and understanding its behavior, with no opt-in or alternative language path described.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and user-facing instructions are entirely in Chinese, presenting the tool as Chinese-only behavior without any opt-in or alternative locale. The policy explicitly calls out language or locale constraints as violations when a specific language is forced without user choice or documented justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

For code files, SQP-2 covers file writes when there is no user disclosure via confirmation, logging/print, comments/docstrings, or markdown documentation. Although the script prints the output path after saving, there is no prior warning or explicit disclosure that running it will persistently modify and save a repaired document.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.