T08 · Insecure Dependencies
- Location
SKILL.md:19- Finding
Unpinned Third-Party Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 19–23
Vulnerability Type: Supply-chain risk from an unpinned third-party dependency
Risk Level: MediumVulnerable Code
bash pip install poocrTechnical Analysis
The skill directs users to install
poocrfrom the package index configured forpipwithout specifying a reviewed version, verifying cryptographic hashes, using a lockfile, or documenting a trusted source. Consequently, the package and its transitive dependencies may change independently of the reviewed skill.Python package installation can execute package-controlled build or installation logic. If the package publisher, distribution account, package index, or a transitive dependency is compromised, following this instruction could execute attacker-controlled code. The risk may also increase when an untrusted or incorrectly configured package index is in use.
This finding establishes an unsafe dependency-management practice; it does not establish that the current
poocrrelease is malicious.Attack Path
- An attacker compromises the package publisher, a transitive dependency, or the package distribution channel and publishes a malicious release.
- A user follows the skill's unpinned
pip install poocrinstruction. pipresolves the attacker-controlled release because no version or hash is enforced.- Malicious package code executes during installation, import, or OCR processing.
- The code accesses resources available to the process, potentially including invoice files and Tencent Cloud credentials supplied later by the user.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user running
pipor the Python process. The accessible scope may include local documents, invoice data, environment variables, cloud API credentials, output files, and network resources available to that account. Installation with e ...[truncated 66 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
poocrand every transitive dependency to versions that have been reviewed and tested. - Store dependencies in a lockfile or requirements file containing cryptographic hashes, and install with hash enforcement:
bash pip install --require-hashes -r requirements.txt - Document the package's verified publisher, official repository, and expected package index.
- Use an explicitly configured trusted index rather than relying on ambient
pipconfiguration. - Review package source and release artifacts before approving upgrades, and use automated dependency and provenance scanning.
- Install and run the package in an isolated virtual environment or restricted container under a non-privileged account.
- Provide Tencent Cloud credentials with the minimum permissions required, avoid embedding them in source code, and rotate them if package compromise is suspected.
- Pin
