Back to skill

Security audit

Contract Auditor

Security checks for vulnerabilities and agentic risk

Overview

This skill locally reviews Chinese Word contracts and creates reports or annotated copies, with some documentation inconsistencies but no hidden or destructive behavior found.

Install only if you are comfortable processing confidential contracts locally with a rule-based Chinese-language reviewer. Treat the output as drafting support, not legal advice; check generated findings manually. Use a separate output filename for annotated Word files, and consider pinning python-docx before production use.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是完整的合同审计技能,核心能力应包括合同内容提取和多类条款风险分析。实际代码块只接收外部传入的文本和 findings,再通过关键词匹配把 findings 插入到相应行附近,输出 Markdown/文本批注文档和摘要。这确实部分对应“生成批注文档”,但没有看到任何对 Word 文档的读取、合同条款识别、金额一致性检查、付款节点检查、违约金检查、交付责任检查、签章日期合规检查或风险分析逻辑。因此该代码与声明相比存在明显能力缺失,且实际主要用途更接近‘审计结果展示/标注器’而不是‘合同审计器’。未发现额外危险或越权能力;问题主要是声明显著高于代码实际行为。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

该代码块的实际主功能是文件文本提取,而且只有 Word 提取真正可用。与声明的“合同审计 Skill”相比,当前代码没有执行任何审计、分析、规则检查、风险判断或报告生成逻辑,因此主用途与声明明显不一致。虽然“自动提取合同文本(Word 格式)”这一子功能与代码部分一致,但整体声明描述的是完整合同审计能力,而提供的代码只是前置的提取组件。另需注意,模块注释写了支持 Word、PDF、图片格式,但 PDF 和图片处理函数明确返回未实现,因此如果按整体技能描述理解为已支持这些格式,也与实际行为不符。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个完整的“合同审计”技能,核心能力应包括对合同内容进行分析并识别问题。但该代码块的实际职责是对已给定的审计发现结果进行 Word 文档标注和摘要写入,属于结果呈现/批注层,而不是审计分析层。虽然它与“生成批注文档”这一子功能一致,也处理 Word 文件,但没有任何条款解析、规则检查、风险判断或报告分析逻辑。因此,代码行为只覆盖声明中的一个辅助输出环节,无法准确代表所宣称的主要能力,构成描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个端到端“合同审计”技能,核心能力应包括从 Word 合同中提取内容并识别风险/问题,再生成报告与批注。给出的代码片段却只是一个 Word 标注组件:它接收外部 findings 列表,在文档前部添加统计摘要和问题清单,并通过关键词搜索找到可能相关段落进行高亮。代码中没有任何合同解析、金额一致性检查、付款节点分析、违约金审查、交付条款审查、签章日期合规检查或风险判定逻辑。因此其实际主用途与声明存在明显差距。虽然“生成审计报告 + 批注文档”中的文档输出部分部分吻合,但该代码更像下游展示/注释模块,而非所声明的完整合同审计技能。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

L152-L168 明确声明“Word 批注文档(.docx)✅ NEW”且示例代码展示了对原 Word 文件直接添加批注;但 L174 又写“批注文档为 Markdown 格式(v1.1 支持 Word 原文件批注)”。这不是单纯信息缺失,而是同一文档内对当前能力状态的直接冲突,可能误导调用方对技能实际输出与副作用的理解。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises adding comments directly to the original Word document without clearly warning whether the source file is modified in place or whether a separate copy is created. In a legal-document workflow, silent modification can damage evidentiary integrity, overwrite authoritative drafts, or cause users to redistribute altered contracts unintentionally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The line explicitly states '仅支持中文合同' (Chinese contracts only). Under the policy rule, forcing a specific language or locale without user opt-in or a clearly documented 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
93% confidence
Finding

The design states '多语言合同(暂仅支持中文)', which imposes a language constraint. Under the policy, forcing a specific language without user opt-in or a clearly justified region-specific reason is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The design handles potentially sensitive contract files, stores them temporarily, and may generate annotated outputs containing the original contract text, but it does not define a clear user-facing notice, consent flow, or explicit disclosure of retention and exposure risks. This can lead to unintentional processing of confidential business data without informed user awareness, increasing privacy, compliance, and data handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file is a code file, so only SQP-2 and SQP-3 apply. The class/module docstrings, finding descriptions, and suggestions are all hard-coded in Chinese, which implies the skill's user-facing output is restricted to a specific language without offering a language choice or documenting that the tool is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This Python file uses exclusively Chinese natural-language docstrings, messages, and suggestions, including all finding descriptions returned to users. There is no indication that the analyzer is region-specific or that users can opt into Chinese output, which can violate language/locale policy requirements for user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file uses Chinese-only natural-language comments, docstrings, descriptions, and user-facing output throughout, with no indication that the skill is region-specific or that users can choose another language. Under the policy rule, forcing a specific language without opt-in 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
95% confidence
Finding

The module docstrings and all user-facing descriptions/suggestions are written exclusively in Chinese, indicating the skill is designed to operate in a single language. The file does not offer any language choice or state a justified region-specific constraint, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The method documentation says it will '在文档中添加批注', which implies real Word comments. However, the code later explicitly notes that python-docx does not directly support comments and instead modifies paragraph colors and appends a textual marker at the paragraph end. This is an active mismatch between documented intent and actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file's user-facing descriptions and generated report content are entirely fixed in Chinese, including report headings, summaries, and default contract names. There is no indication that users can opt into another language or locale, which can violate language-choice policy when the skill is not explicitly documented as China-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file performs a file-writing operation by generating an annotated Word document, and its own docstring states it adds comments to the original contract workflow. There is no confirmation prompt, logging/print disclosure, or explicit warning in this file that the operation will create or modify a document on disk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring states the extractor supports Word, PDF, and image formats, and the manifest only explicitly promises Word extraction. In reality, _extract_from_pdf and _extract_from_image are stubs that always return 'not implemented', so the advertised behavior does not match actual functionality.

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 user-facing natural-language descriptions and messages exclusively in Chinese, including the module docstring and later runtime messages. Under the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The _extract_from_pdf docstring says '从 PDF 提取文本' and _extract_from_image says '从图片提取文本(OCR,待实现)', but both functions unconditionally fail and return empty text. This is more than incomplete documentation because the surrounding module-level documentation presents these formats as supported behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file’s user-facing natural-language strings and descriptions are entirely in Chinese, including the module docstring and class description, with no indication that other languages are supported or that the language choice is configurable. This can violate a language/locale policy when the skill is expected to be usable without forcing a specific language absent user opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code opens a Word document, inserts an audit summary, adds comments, and saves a modified output file. Although there is a success print after saving, there is no pre-action warning or explicit disclosure in the user-facing description that the skill alters document contents by injecting annotations and summary text, which can affect user data and document integrity.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L001-L004 的模块文档和 L017-L022 的函数说明把行为描述为在原始 Word 文件上添加批注/Comment,但实现中仅使用 add_heading、add_paragraph,并在 L169-L170 对 runs 设置 highlight_color。代码没有创建 Word comment 对象,因此文档说明与真实行为存在直接矛盾。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is entirely written in Chinese, including headings, instructions, and audit summaries, with no indication that the user can select another language or that the skill is restricted to a Chinese-only regulatory context. Under the policy rule, language-specific behavior without opt-in or explicit justification 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
78% confidence
Finding

This requirements file contains natural-language comments entirely in Chinese, including installation and dependency descriptions, without indicating that the skill is region-specific or offering any language choice. Under the policy for natural-language content, forcing a specific language without opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The dependency is specified as 'python-docx>=1.1.0' without an upper bound or exact pin, so installs may resolve to different versions over time. This creates supply-chain risk and makes builds non-reproducible, which is especially relevant for a contract auditing skill that parses attacker-controlled document files.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
# 安装: pip install -r requirements.txt

# Word 文档处理
python-docx>=1.1.0

# PDF 处理(v1.1 启用)
# pdfplumber>=0.10.0

Static analysis

No suspicious patterns detected.