Back to skill

Security audit

招标文件版本智能对投标人版Bidding Doc Version Smart Compare Bidder

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Chinese tender-document comparison workflow that reads user-provided documents, generates local comparison reports, and does not show hidden exfiltration, persistence, or destructive behavior.

Install and run this in a dedicated environment, preferably with pinned dependency versions from a trusted package index. Treat reports as an aid only, especially for legal or high-value bidding decisions, and keep sensitive tender documents within your approved workspace and knowledge-base policy.

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:212
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 212–214
Vulnerability Type: Unpinned dependencies resolved from the active Python package index
Risk Level: Medium

Vulnerable Code

bash
VENV_PY="C:/Users/Meng/.workbuddy/binaries/python/envs/default/Scripts/python.exe"
$VENV_PY -m pip install python-docx pypdf pdfplumber --quiet

Technical Analysis

The setup instructions install python-docx, pypdf, and pdfplumber without fixed versions, package hashes, a lockfile, or an explicitly approved package index. The installed code can therefore vary between executions as package releases and transitive dependencies change.

If the configured package index, a package release, or a transitive dependency is compromised, following these instructions may install attacker-controlled code. Such code could execute during package installation or when the project imports the affected package. The --quiet option also reduces the visibility of dependency-resolution output and warnings.

The package names match the imports used by the project, and the audit found no evidence of deliberate typosquatting, dependency confusion, or a currently malicious package. This finding is an unsafe supply-chain practice rather than proof that the named packages are malicious.

Attack Path

  1. A user or agent follows the environment setup instructions in SKILL.md.
  2. pip resolves the latest compatible packages and their transitive dependencies from the environment's configured index.
  3. An attacker compromises a package release, a transitive dependency, or the configured package index.
  4. pip downloads and installs the attacker-controlled component.
  5. Malicious code executes during installation or when extract_documents.py or build_report.py imports the compromised library.
  6. The code operates with the privileges of the Python process running the skill.

Impact Assessment

Successful exploitation could permit arbitrary code execution ...[truncated 548 chars]

Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed dependency lock or requirements file with exact versions.
  2. Record and enforce hashes for every direct and transitive package:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Resolve dependencies through an approved, authenticated package mirror and explicitly configure the trusted index.
  4. Use automated dependency scanning and update pinned versions through reviewed pull requests.
  5. Remove --quiet from security-sensitive setup instructions so resolution details and warnings remain visible.
  6. Install dependencies in a dedicated, least-privileged virtual environment or sandbox with restricted filesystem and network access.
  7. Document the supported Python version and verify package integrity before release.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个较高层的业务能力:对两份招标文件做差异比对,并进一步评估这些差异对投标的实际影响。当前代码块仅覆盖其中较底层的一步——条款对齐与变更检测。它不会解析 docx/pdf,也不会做投标影响分析,更不会输出面向投标决策的结论性报告,只是生成 modified/added/deleted 列表和少量数值变化提示。因此,代码行为仅部分支撑声明,不能视为对声明功能的准确完整实现,属于明显的描述与行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个高层业务能力:接收两份招标文件,比较版本差异,并评估这些差异对投标的具体影响。代码实际是底层文档抽取器,主要功能是读取文件、提取文本/表格、切分条款、构造上下文定位信息并输出 JSON,明显是差异分析流水线中的前置步骤,而非最终比对分析技能本身。虽然代码注释提到“for version diff”,但并没有实现文档间比较、变更识别、影响分类或报告生成。此外,声明说仅支持 docx/pdf,而代码还支持 txt、md、markdown,甚至对未知扩展回退为文本处理,这属于未声明的额外能力。总体上,代码与声明的主要目的存在实质性不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个面向终端用户的招标文件差异分析能力:上传两份文件后,比较版本并评估变更对投标的业务影响。实际代码并未实现这种业务分析,也没有对差异条款进行报价/技术方案/资格/时限权利影响判断。它的主要用途是开发阶段的回归校验:加载 golden 数据集,检查 diff 结果是否命中预设 probes,计算召回率,并输出 PASS/FAIL。虽然代码会在没有 diff.json 时调用文档抽取和条款对齐流程,这只是为了生成被测 diff 供评测使用,而不是完成声明中的最终用户分析任务。因此其主要目的与输出都与声明明显不符,属于实质性不匹配。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description, examples, and user invocation phrase are entirely in Chinese, with no indication that other languages are supported or that the user can choose their preferred language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill invokes local scripts that write multiple output files such as extracted.json, diff.json, findings.json, Markdown reports, and optional docx reports, but it does not declare any explicit tool scope or allowed-tools boundary. That mismatch can lead to over-broad file write capability at runtime, making accidental overwrite of unrelated workspace files or abuse through path manipulation more likely if surrounding tooling does not strictly sandbox outputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger conditions and non-trigger list explicitly limit the skill to Chinese tender documents and exclude English documents. This is a language/locale restriction in natural-language instructions, and the file does not present it as a user-selectable option or provide a clear compliance or regional-policy justification for the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown skill file presents all user-facing instructions and outputs in Chinese only, without indicating that the user may choose another language or locale. Under the stated 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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file specifies the report structure and presentation entirely in Chinese, including user-facing labels and instructions such as presenting a Markdown overview to the user. There is no indication that the user can choose another language or that the Chinese-only locale is a documented, justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire skill instruction set is written as mandatory Chinese-language guidance, including required field values and examples, but it does not provide any user opt-in or alternative locale handling. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a skill triggered to analyze bid-document differences specifically '从投标人视角' and output a structured impact report for bidders. This file explicitly implements a second role, 'tenderer', with separate templates and CLI options, expanding behavior beyond the declared bidder-only scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill is triggered when users upload two tender documents in docx/pdf format and explicitly frames support around those document types. This file implements full text extraction for .txt/.md/.markdown and even treats unknown extensions as plain text, expanding behavior beyond the declared scope rather than merely supporting the advertised formats.

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 test-case file presents all user-facing examples and expected responses in Chinese, which effectively enforces a specific language. Under the policy, locale or language restrictions should either offer user choice or be clearly documented as justified for a region-specific skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The standardized reply states that the tool 'currently only supports Chinese tender documents,' which imposes a language constraint on users. Because the file does not offer an alternative language path or explicit opt-in, this is a natural-language locale restriction under the policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The limitations section states '仅支持中文' as a blanket language restriction. Repeating an unconditional language restriction without user choice or documented regional/compliance justification matches the language-policy concern described in SQP-3.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The metadata names the skill entirely in Chinese, which can indicate a language-specific presentation without any visible opt-in or documented locale constraint in this file. Under the policy, language restrictions should either offer user choice or be clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstring states that tables are flattened so their content enters the diff pipeline instead of being silently dropped. Later, the PDF fallback path documents that tables are 'silently dropped,' which directly conflicts with the earlier intent description for table handling and could mislead maintainers about actual coverage guarantees.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.