Back to skill

Security audit

PDF小册子合并排版

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it merges local PDFs into booklet-printable output, with one ordinary dependency-hygiene caution.

Install this like a normal local PDF utility. Use a virtual environment, install pypdf from a trusted index, and prefer a pinned or hash-checked dependency command before processing sensitive PDFs.

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
references/publish-checklist.md:17
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
=5.4.0,<6` Install: ```bash /usr/bin/python3 -m pip install pypdf ``` ``` ### Technical Analysis The documented installation command installs `pypdf` without enforcing the stated version range, an exact reviewed version, package hashes, or a trusted package index. Consequently, pip resolves whichever compatible package is offered by the user's configured index at installation time. This creates a supply-chain exposure because package resolution may be affected by: - Compromise of the package or distribution infrastructure. - A malicious or untrusted package index configured through pip settings or environment variables. - Future package releases that have not been reviewed by the project. - Changes to package artifacts after the skill itself has been audited. The installed dependency is subsequently imported by `scripts/booklet_merge.py`: ```python from pypdf import PdfReader, PdfWriter, Transformation from pypdf._page import PageObject ``` Importing a compromised package can execute attacker-controlled Python code within the process. ### Attack Path 1. A user follows the installation instructions in `references/publish-checklist.md`. 2. The command invokes pip without an exact version, hash verification, or an explicitly trusted index. 3. The user's pip configuration resolves `pypdf` from a compromised or attacker-controlled source, or resolves an unintended future release. 4. Malicious code may execute during package installation through package build or installation mechanisms. 5. The malicious package is later imported when `scripts/booklet_merge.py` runs, providing another code-execution opportunity. 6. The payload executes with the permissions of the user running pip or the booklet script. ### Impact A ...[truncated 633 chars]
Remediation
View remediation
=5.4.0,<6' ``` This minimum measure does not replace exact version pinning and hash verification. 6. Run dependency installation and PDF processing as an unprivileged user in an isolated virtual environment or container with only the filesystem and network access required for the task. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.