T08 · Insecure Dependencies
- Location
SKILL.md:23- Finding
Unpinned and Unnecessary Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Locations:
SKILL.md:23-25README.md:24-27INSTALLATION.md:5-8优化使用指南.md:29-32
Vulnerability Type: Uncontrolled third-party dependency resolution and excessive dependency scope
Risk Level: MediumVulnerable Code Snippets
SKILL.md:23-25:bash pip install yfinance pandas numpy matplotlib seaborn plotlyREADME.md:24-27:bash pip install pandas numpy matplotlib seabornINSTALLATION.md:5-8:bash pip install pandas numpy matplotlib seaborn优化使用指南.md:29-32:bash pip install pandas numpy matplotlib seabornTechnical Analysis
The installation instructions invoke
pipwithout exact version constraints, integrity hashes, or a reviewed lock file. Consequently, package selection depends on the currently configured package index and the package versions available at installation time. The installed code may therefore differ from the code reviewed or tested by the publisher.In addition,
SKILL.mddirects users to installyfinanceandplotly, although neither package is imported by the supplied Python source or declared inmanifest.json. These unnecessary packages and their transitive dependencies expand the supply-chain attack surface. Installingyfinanceis also inconsistent with the project's declared local-only dependency set and offline runtime design.The audit found no evidence that the named packages are currently malicious. Exploitation requires compromise of a package, one of its transitive dependencies, the configured package index, or the dependency-resolution environment.
Attack Path
- A user follows the documented installation command.
pipcontacts the configured package index and resolves the latest compatible versions of the named packages and their transitive dependencies.- An attacker compromises a resolved package release, dependency, package-index account, mir ...[truncated 1258 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove unused dependencies from
SKILL.md. The documented runtime set should match the imports andmanifest.json; specifically, removeyfinanceandplotlyunless corresponding functionality is deliberately added and reviewed. - Define exact, reviewed dependency versions in a requirements or lock file, for example:
text pandas==REVIEWED_VERSION numpy==REVIEWED_VERSION matplotlib==REVIEWED_VERSION seaborn==REVIEWED_VERSION - Generate and verify cryptographic hashes for all direct and transitive dependencies. Install with hash enforcement, such as:
bash python -m pip install --require-hashes -r requirements.txt - Use a reproducible lock-generation process and review dependency changes before updating the lock file.
- Install dependencies inside a dedicated virtual environment under a non-privileged account. Do not run
pipas an administrator or root user. - Use a trusted, explicitly configured package index or an internally controlled package mirror.
- Apply automated dependency vulnerability and provenance scanning in CI.
- Make all installation documents and
manifest.jsonreference the same minimal dependency set and installation procedure. - If fully offline operation is required, distribute a reviewed wheel bundle with recorded hashes and install only from that local bundle using
--no-index.
- Remove unused dependencies from
