Back to skill

Security audit

A professional skill for reading electronic datasheets

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent datasheet-reading helper with normal local PDF processing risks, but no evidence of hidden behavior, exfiltration, persistence, or destructive intent.

Install dependencies in a virtual environment, avoid running pip as administrator or root, and process only PDFs you intend to share with the agent. When using render_page, keep output paths inside a workspace or temp directory and avoid pointing it at important existing files.

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
README.md:35
Finding

Unpinned Third-Party Dependencies Permit Unreviewed Supply-Chain Changes

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 35–39
Vulnerability Type: Unpinned package installation from the configured Python package index
Risk Level: Medium

Vulnerable Code Snippet:

bash
# Required — core PDF text/table extraction
pip install pdfplumber

# Required for render_page (page → PNG) — install at least one:
pip install pymupdf        # preferred: MuPDF engine, faster
pip install pypdfium2      # fallback: PDFium engine (Chrome's renderer)

Technical Analysis

The installation instructions retrieve three third-party packages without exact version constraints, cryptographic hashes, a lock file, or a restriction to a trusted package index. Consequently, installations performed at different times can resolve to package versions that were not reviewed as part of this audit.

The package names are consistent with the imports used by scripts/pdf_tools.py, and no evidence of typosquatting or a currently malicious package was identified. The security issue is the unconstrained dependency resolution: compromise of an upstream package, malicious publication through a configured index, dependency confusion, or an unsafe package-index configuration could cause attacker-controlled code to be installed.

Python packages may execute code during installation and when imported. In this project, the dependencies process user-supplied PDF files, so a compromised dependency would also have direct access to potentially sensitive document contents.

Attack Path

  1. A user follows the installation commands in README.md.
  2. pip resolves the unpinned dependency through the user's configured package index.
  3. An upstream compromise, malicious mirror, unsafe index configuration, or subsequently compromised release causes an unreviewed package version to be selected.
  4. The malicious package executes code during installation or when pdf_tools.py imports it.
  5. The package acts with ...[truncated 892 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency manifest with exact versions, such as requirements.txt:

    text
    pdfplumber==<reviewed-version>
    pymupdf==<reviewed-version>
    pypdfium2==<reviewed-version>
    
  2. Generate and record cryptographic hashes for all direct and transitive dependencies, then require hash verification:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Use a lock-file workflow, such as pip-tools, to pin the complete transitive dependency graph rather than only top-level packages.

  4. Document and enforce a trusted package index. Avoid untrusted extra indexes and consider an internally controlled package mirror for production deployments.

  5. Install dependencies inside an isolated virtual environment under a non-privileged account. Do not run the installation commands with administrator or root privileges.

  6. Add automated dependency vulnerability and integrity checks to the release process, and review upgrades before updating pinned versions.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The phase summary mixes English headings with Chinese descriptions such as '默认 patterns 扫全文,建粗粒度地图' and similar phrases for each phase. This imposes a specific language on readers without any opt-in, language-selection guidance, or stated region-specific justification, which matches the locale-policy violation criteria.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill references local files and a PDF-processing script, implying file-read capability, but it does not declare an explicit tool or permission scope. In an agent system, undeclared file access increases the risk of the skill reading unintended files or operating with broader access than reviewers and policy engines expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger description is very broad ('all IC types', any PDF+chip question), which can cause the skill to activate in contexts beyond narrow datasheet extraction. Over-broad activation increases the chance of the agent applying file-reading and analysis behavior to unrelated or sensitive documents, expanding attack surface and creating opportunities for prompt or document-based abuse.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The render_page function creates PNG files on disk, which expands the skill from read-only datasheet extraction into persistent file output. In an agent environment, writing derived artifacts to disk can expose document contents, consume storage, and create an unintended side channel even if the image is only a page render.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The out_path parameter allows the caller to choose an arbitrary filesystem write location, and the code creates parent directories before saving. In a broader agent runtime, this can be abused to overwrite or plant files outside the intended workspace, making it substantially more dangerous than a normal temporary render helper.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README states the skill is 'Optimized for English and Chinese datasheets' and that 'Other languages have degraded accuracy.' This creates a language-specific constraint without explicitly offering the user a choice or documenting a policy-based justification for the limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The description explicitly includes Chinese trigger terms ('规格书, 数据手册, 芯片参数') alongside English trigger guidance, but does not explain whether language selection is optional, user-driven, or limited to a defined locale. This can be read as a hard-coded language/locale behavior rather than an opt-in or documented regional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The comments and implementation explicitly override stdout encoding to UTF-8 on Windows rather than offering a user-selectable locale or encoding option. This is a natural-language policy concern because it imposes a specific output locale/encoding behavior without documented opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.