Back to skill

Security audit

测试用例生成器

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed test-case-generation workflow with a local PDF image extraction helper, and I found no hidden exfiltration, persistence, destructive behavior, or privilege escalation.

Install dependencies in an isolated virtual environment, prefer pinned package versions, and review the generated test cases and validation report before relying on them for release decisions, especially if you need non-Chinese output.

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

Note
Location
scripts/extract_pdf_images.py:15
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_pdf_images.py:15 and scripts/extract_pdf_images.py:24-27
Related Locations: SKILL.md:32-33, SKILL_full_backup.md:34-35
Vulnerability Type: Unpinned and integrity-unverified third-party dependencies
Risk Level: Low

Vulnerable Code

python
pip install PyMuPDF

The script later imports the package and, when it is unavailable, directs the user to install it without a version constraint:

python
try:
    import fitz  # PyMuPDF
except ImportError:
    print("Error: PyMuPDF must be installed")
    print("Run: pip install PyMuPDF")
    sys.exit(1)

The Skill documentation also specifies only broad minimum versions:

text
PyMuPDF (fitz) >= 1.23
openpyxl >= 3.1

Technical Analysis

The installation instruction allows pip to resolve the latest available package from the environment's configured package index. No exact versions, package hashes, lockfile, or explicitly trusted index are provided. Consequently, installations are not reproducible and package integrity is not independently verified.

Although PyMuPDF and openpyxl are established packages and no malicious dependency is currently embedded in the project, this installation model exposes users to supply-chain compromise. A compromised package release, configured mirror, dependency, or package-index account could cause attacker-controlled code to be installed and subsequently executed when imported or used.

Attack Path

  1. An attacker compromises a relevant package release, transitive dependency, package-index account, or package mirror used by the victim.
  2. A user follows the Skill's instruction and executes pip install PyMuPDF, or installs dependencies based on the documented minimum-version constraints.
  3. Pip resolves and downloads the compromised package because no reviewed version or cryptographic hash is enforced.
  4. Attacker-co ...[truncated 909 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create a dependency lock file containing exact, reviewed versions of PyMuPDF and openpyxl.
  2. Generate and enforce cryptographic hashes for every package and transitive dependency, for example:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Use an explicitly configured trusted package index or an internally controlled artifact repository.
  4. Replace the generic installation instruction with a reference to the locked requirements file.
  5. Periodically scan pinned dependencies for known vulnerabilities and update them through a reviewed process.
  6. Install dependencies in an isolated virtual environment without administrative privileges.
  7. Where feasible, verify downloaded artifacts against approved hashes before installation.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill promises substantial automated capabilities—document extraction, image/flowchart analysis, path coverage analysis, and Excel generation—but the available content only documents a workflow and references a PDF image extraction script. This mismatch is dangerous because operators may trust the skill to perform validation, coverage, and output generation that it does not actually implement, leading to silent test coverage gaps, incorrect assurance, and risky downstream decisions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill title and the surrounding operational instructions are written entirely in Chinese, with no indication that users may choose another language or locale. This creates a natural-language policy concern because the skill appears to require a specific language without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill content is primarily written in Chinese and does not provide a mechanism to detect or honor the user's preferred language. This can cause users or downstream agents to misunderstand instructions, review outputs incorrectly, or miss important confirmations in a multi-step workflow, which is especially risky for a skill that gates execution on user approval and produces formal test artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file is a natural-language template, and its instructions are presented exclusively in Chinese from the title onward. Under the stated policy, forcing a specific language without user opt-in or a documented regional justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and throughout the document prescribe an Excel output specification entirely in Chinese, which effectively forces a specific language/locale. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; this file does neither.

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, usage instructions, and runtime messages are written exclusively in Chinese, which imposes a specific language on users. The stated policy flags language or locale constraints unless the skill offers user choice or clearly documents a justified regional limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.