T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:17` **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install perceptron ``` The installed package is subsequently imported and trusted by `scripts/perceptron_cli.py:20-47`: ```python try: import perceptron from perceptron import ( configure, config, detect, caption, ocr, ocr_html, ocr_markdown, question, perceive, annotate_image, scale_points_to_pixels, extract_points, parse_text, strip_tags, inspect_task, image, text, system, box, point, polygon, collection, agent, ) except ImportError: print("Error: perceptron SDK not installed. Run: pip install perceptron", file=sys.stderr) sys.exit(1) ``` ### Technical Analysis The documented installation command retrieves the latest package associated with the mutable `perceptron` package name. It does not specify an exact reviewed version, verify distribution hashes, use a lockfile, or document verification of the package source and publisher. The imported dependency is security-sensitive: it receives the Perceptron API credential, processes local image files and URLs, handles prompts, and performs remote API requests. If a future package release or its publishing account were compromised, arbitrary package code could execute with the permissions of the user running the installation or CLI. This is a supply-chain weakness rather than evidence that the current package is malicious. ### Attack Path 1. An attacker compromises the package publisher, release pipeline, or package repository account for `perceptron`. 2. The attacker publishes a malicious release under the same package name. 3. A user follows the documented `pip install perceptron` instruction after that release becomes current. ...[truncated 950 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version, for example: ```bash python3 -m pip install "perceptron==X.Y.Z" ``` 2. Generate and publish a lockfile containing cryptographic hashes for the approved distributions. 3. Require hash verification during installation, such as: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Document the expected package repository, verified publisher, and approved package identity. 5. Review release notes and dependency changes before updating the pinned version. 6. Run the CLI in a least-privileged virtual environment or container with access only to required images and credentials. 7. Avoid exposing unrelated secrets or sensitive directories to the process. 8. Add automated dependency scanning and provenance verification to the release workflow.
