Back to skill

Security audit

Tender Bid Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill uses local scripts and templates to help parse Chinese tender files and draft bid documents, with no evidence of hidden network access, credential use, persistence, or destructive behavior.

Install only if you are comfortable with a Chinese-focused tender drafting helper that reads tender files you explicitly provide. Review generated bid content manually, especially qualifications, pricing, legal commitments, and deadlines. For safer dependency handling, install PyPDF2 and python-docx in a dedicated virtual environment with pinned versions rather than following generic pip install prompts.

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
scripts/parse_tender.py:24
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis

Vulnerability Details

File Location: scripts/parse_tender.py, lines 19–37; vulnerable installation guidance appears specifically at lines 24 and 36
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

python
def parse_pdf(file_path):
    """Parse a PDF file."""
    try:
        import PyPDF2
        with open(file_path, 'rb') as f:
            reader = PyPDF2.PdfReader(f)
            text = ""
            for page in reader.pages:
                text += page.extract_text() + "\n"
        return text
    except ImportError:
        print("Error: PyPDF2 is not installed. Run: pip install PyPDF2")
        sys.exit(1)

def parse_docx(file_path):
    """Parse a DOCX file."""
    try:
        from docx import Document
        doc = Document(file_path)
        text = "\n".join([paragraph.text for paragraph in doc.paragraphs])
        return text
    except ImportError:
        print("Error: python-docx is not installed. Run: pip install python-docx")
        sys.exit(1)

The displayed snippet is an English translation of the localized messages in the audited source; the package names and installation commands are unchanged.

Technical Analysis

When either document-parsing dependency is unavailable, the script instructs the user to install it directly from the package index without specifying a version or validating package hashes:

  • pip install PyPDF2
  • pip install python-docx

These commands resolve whichever release the configured Python package index currently supplies. Consequently, the installed code is not tied to the version that was reviewed or tested with this project. A compromised upstream release, compromised package-index account, malicious package-index mirror, or unsafe local pip configuration could introduce attacker-controlled installation or runtime code.

The referenced package names are consistent with the imports, and the project does not specify an untrusted repository or app ...[truncated 1759 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency manifest containing exact versions, for example:

    text
    PyPDF2==<reviewed-version>
    python-docx==<reviewed-version>
    
  2. Generate and verify cryptographic hashes for all direct and transitive dependencies. Install them with a command such as:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Replace the generic installation messages with instructions that reference the repository-controlled dependency file:

    python
    print("Required dependencies are missing. Install the reviewed dependencies with: "
          "python3 -m pip install --require-hashes -r requirements.txt")
    
  4. Use a dedicated virtual environment with only the permissions required to read input documents and write intended output files.

  5. Review dependency updates before changing pinned versions, and use dependency vulnerability and provenance checks in continuous integration.

  6. Prefer a trusted, explicitly configured package index or internal artifact repository. Ensure fallback to arbitrary or untrusted mirrors is disabled.

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 (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims an intelligent bid-generation capability driven by tender documents, including document parsing, key-information extraction, standards-based content generation, and Word output. The actual code is much narrower: it uses python-docx to build a generic bid template with hardcoded sections such as 投标函, 授权书, 报价表, 资格证明文件, 技术响应文件, and 商务响应文件, then saves it to assets/bid-template.docx. This supports only a small subset of the declared purpose—creating a Word template. There is no code for reading any tender document, no PDF/Word/TXT parsing, no requirement extraction, no customization from source data, and no automated generation of a complete bid document from tender inputs. Therefore the declared description materially overstates the implemented behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code aligns with a narrow subset of the description: it supports parsing tender documents in PDF, Word, and TXT formats and extracting some key information. However, the declared purpose emphasizes generating high-quality bid documents, building proposal structure, writing content, and producing Word output. None of those generation/output capabilities appear in the code. The actual primary purpose is tender information extraction to JSON, which is materially narrower and different from an end-to-end bid document creation skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the system to read user-supplied tender documents and references local scripts and files, but it does not declare any explicit tool scope such as allowed-tools or permissions. This creates an authorization ambiguity where file access may be broader than intended, increasing the chance of unintended local file exposure or unsafe file handling when processing user-provided paths.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description says to use the skill when users need to create bid proposals based on tender documents, but it does not define specific trigger phrases, scope limits, or exclusion conditions. This broad invocation guidance could match ordinary requests about document generation and cause unintended activation without clear boundaries.

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 file contains user-facing instructional content only in Chinese, and there is no indication that the skill supports other languages or that Chinese is an intentional, justified regional constraint. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language description is primarily in English but appends Chinese usage guidance, and the document body is entirely in Chinese, without stating whether output language follows user preference. This can create an implicit language/locale constraint without explicit opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This plain-text skill file is fully authored in Chinese and does not indicate that other languages are supported or that the language is optional. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings and docstrings entirely in Chinese, including the top-level description and later CLI output, which imposes a specific language on users. The policy allows locale constraints only when they are explicitly justified or when users are given a choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.