Back to skill

Security audit

企业尽调-分析生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed enterprise due diligence helper that uses public company lookups, user-provided documents, and local Word report generation, with no evidence of hidden persistence, exfiltration, or destructive behavior.

Install only if you are comfortable sharing company names with configured public-data providers such as Qichacha and letting the agent process due diligence materials you explicitly provide. Redact confidential or regulated information where possible, protect API keys, use a virtual environment, and prefer pinned dependency versions before running the scripts.

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

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 49–52
Vulnerability Type: Unpinned dependencies installed from the active Python package index
Risk Level: Medium

Vulnerable Code

bash
pip install python-docx requests

Technical Analysis

The documented setup command installs python-docx and requests without version constraints, package hashes, a lock file, or an explicitly trusted package index. Consequently, the code executed by future installations is not limited to the dependency versions covered by this audit.

An attacker who compromises an upstream package release, controls a configured package index or mirror, or interferes with package resolution could cause users to install attacker-controlled code. Python packages may execute code during installation, and malicious runtime code could also execute when the Skill imports the affected dependency.

This is a supply-chain weakness rather than evidence that the currently named packages are malicious.

Attack Path

  1. An attacker compromises a dependency release or gains control of a package source configured in the user's pip environment.
  2. A user follows the setup instructions and runs:
    bash
    pip install python-docx requests
    
  3. pip resolves an unreviewed or attacker-controlled package version because no reviewed versions or hashes are enforced.
  4. Malicious package code executes during installation or when the Skill imports the dependency.
  5. The malicious code operates with the privileges of the user running pip or the Skill.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the invoking user's privileges. Depending on the local environment, the attacker could access or alter:

  • The QICHACHA_TOKEN environment variable.
  • Company names submitted for lookup.
  • Locally stored due-diligence JSON data.
  • User-provided financial or corporate documents accessible to the process.
  • Generated Word reports and ...[truncated 251 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed dependency lock or requirements file with exact versions:

    text
    python-docx==<reviewed-version>
    requests==<reviewed-version>
    
  2. Generate and enforce cryptographic hashes for every package and transitive dependency:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Use an explicitly approved package index:

    bash
    python -m pip install \
      --index-url https://<approved-index>/simple \
      --require-hashes \
      -r requirements.txt
    
  4. Install dependencies in an isolated virtual environment under a non-privileged account. Do not run pip as an administrator or root user.

  5. Add automated dependency scanning and a controlled update process. Review new versions before updating pins and hashes.

  6. Keep the installation documentation synchronized with the locked dependency manifest so users do not bypass the protected installation process.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tainted flow: 'headers' from os.environ.get (line 36, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/fetch_company_data.py (reported line 38)May include surrounding context.

python
import requests
        headers = {"Token": QICHACHA_TOKEN}
        params = {"key": company_name}
        resp = requests.get(
            f"{QICHACHA_API_URL}/Company/Search",
            headers=headers,
            params=params,

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个较完整的企业尽调技能,核心能力包括多维尽调分析、结合用户文档、报告生成和模板化输出。而实际代码只是一个独立的数据抓取脚本,主要功能是读取环境变量中的企查查Token,调用企查查Company/Search接口,并返回一个预设的空JSON结构或原始查询结果占位。代码没有处理用户文档,没有进行法律/财务/业务分析,没有报告生成,也没有任何轻量版/基础版模板切换逻辑。虽然“从公开数据源获取工商信息”这一点与声明部分吻合,但仅是声明中很小的一部分,且实现仍处于未完成状态,因此描述与实际行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是较完整的企业尽调系统,核心能力包括外部公开数据采集、用户文档融合、双模板报告生成以及检查清单输出。实际代码只是一个单独的检查清单 Word 生成模块:它依赖外部提供的 JSON 数据,使用固定的 30 项左右默认检查项模板,允许用 status/note 覆盖,并输出带颜色标记的表格和风险汇总。代码中没有任何网络访问、第三方公开数据抓取、文档解析、完整尽调报告章节生成、模板版本切换等实现。虽然“生成检查清单”属于声明中的一部分,但该代码块与声明的整体主功能相比明显不完整,且缺失多个关键承诺能力,因此应判定为描述与实际行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

MCP Config Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · references/mcp_connectors.md (reported line 52)May include surrounding context.

md
### 启用步骤
1. 获取天眼查 MCP API Key
2. 在 ~/.workbuddy/.mcp.json 中设置 TIANYANCHA_API_KEY 环境变量
3. 将天眼查 connector 的 disabled 设为 false
4. 重启 WorkBuddy

MCP Config Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · references/mcp_connectors.md (reported line 75)May include surrounding context.

md
### 启用步骤
1. 获取启信慧眼 MCP API Key
2. 在 ~/.workbuddy/.mcp.json 中设置 QIXIN_API_KEY 环境变量
3. 将启信慧眼 connector 的 disabled 设为 false
4. 重启 WorkBuddy

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly encourages users to upload supplemental materials such as financial statements, contracts, business registration documents, and platform screenshots, but it does not warn that these may contain sensitive, confidential, personal, or regulated data. In a due-diligence workflow, such files commonly include non-public commercial information and personal data, so the omission materially increases the risk of unsafe disclosure and improper handling.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill documents execution of Python scripts that use environment variables, network access, and local file read/write, but it does not declare any explicit tool scope or allowed-tools boundaries. This creates a permission ambiguity where the agent may invoke broader capabilities than users or the platform expect, increasing the chance of unintended data access, exfiltration, or filesystem modification during due-diligence runs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match common requests like generic company lookup or 'DD', which can cause unintended invocation of a skill that performs network access and local document handling. In this context, accidental activation can expose sensitive user files, initiate external queries, or generate outputs under the wrong workflow without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill is described entirely as a Chinese-language workflow and lists trigger phrases centered on Chinese usage, but it does not state that users may choose their preferred language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented trigger list includes ambiguous shorthand and broad phrases without strong scope limits, increasing the risk that ordinary user requests will activate a skill with file, network, and reporting behaviors. Because this skill is positioned to ingest user documents and query public sources, unintended invocation materially raises privacy and operational-risk concerns.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The metadata instructs publishers to include generic activation terms such as “DD”, “背景调查”, and “due diligence” without scope constraints or disambiguation. In an agent marketplace, broad triggers can cause the skill to activate on loosely related user requests, leading to unintended document processing, external data retrieval, or generation of sensitive-looking diligence reports outside the user’s actual intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The published trigger list contains multiple broad search keywords, including short acronyms and generic research terms, but provides no exclusion rules, context checks, or examples of when the skill should not run. This increases the chance of accidental invocation, which is especially risky here because the skill performs enterprise due diligence workflows that may fetch third-party data and produce formal risk assessments that users could over-trust.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file title and all operational guidance are written exclusively in Chinese, establishing a language-specific workflow without indicating that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is 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

The document is written as a prescriptive template in Chinese from the title onward, and the formatting/content examples consistently assume Chinese-language output. There is no indication that users may choose another language or locale, which can violate language-choice policy when the skill is not explicitly region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all operational guidance, risk criteria, and output format exclusively in Chinese. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue when no alternative language option 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

The natural-language strings in the module docstring present usage and purpose only in Chinese, which imposes a specific language on users without opt-in. The file does not indicate that the skill is intentionally limited to a Chinese-only regional or compliance context, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring, CLI description, argument help text, and runtime messages are all presented only in Chinese, with no option to select another language. This creates a language/locale policy concern because the skill enforces one language in its natural-language interface rather than offering user choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a natural-language policy issue because the file presents its purpose and usage exclusively in Chinese, which effectively forces a specific language on users. The file does not offer an alternative language, opt-in, or explanation that the skill is intended only for a Chinese-language or region-specific environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language instructions and usage guidance are fully Chinese-language, and the file does not state that the skill is intentionally limited to Chinese-speaking users or a China-specific compliance context. Under the policy, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file is entirely in Chinese and does not indicate that the user can choose another language or that the template is intended only for a Chinese-language workflow. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains setup steps for QICHACHA_TOKEN, TIANYANCHA_API_KEY, and QIXIN_API_KEY, but provides no user-facing warning that these values are secrets and should not be shared or committed to files carelessly. For markdown files, SQP-2 applies when the skill description omits warnings about behaviors affecting privacy or system integrity, and credential handling falls into that category.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs a file write via doc.save(output_path), which can overwrite or create a user-specified file. Although the CLI requires an explicit --output path and the module docstring states it generates a Word checklist, there is no pre-write confirmation or warning about the filesystem modification at the point of execution.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.