T08 · Insecure Dependencies
- Location
SKILL.md:236- Finding
Unpinned Third-Party Repository and Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:201, 236-237;outputs/requirements.txt:1-3
Vulnerability Type: Supply-chain exposure through mutable and incompletely pinned dependencies
Risk Level: MediumComplete Code Snippets
SKILL.md:201:bash pip install -r outputs/requirements.txtSKILL.md:236-237:bash git clone https://github.com/ccq1/cn-financial-mcp.git ~/cn-financial-mcp cd ~/cn-financial-mcp && pip install -e .outputs/requirements.txt:1-3:text matplotlib>=3.7.0 python-docx>=0.8.11 Pillow>=9.0.0Technical Analysis
The documented setup process clones the current state of a third-party Git repository and installs it without pinning an audited commit, release tag, or cryptographic digest. The installed code can therefore change after this Skill has been reviewed.
The Python dependencies use minimum-version constraints rather than exact versions and do not provide package hashes. Consequently, separate installations can resolve to materially different package versions. Python package installation may execute build-backend or setup hooks, so a compromised upstream repository, package release, maintainer account, or distribution channel could cause code execution during installation.
The reviewed project does not itself prove that any current upstream component is malicious. The vulnerability is the absence of controls ensuring that the installed components are the same components that were audited.
Attack Path
- An attacker compromises the referenced GitHub repository, its maintainer account, or one of the permitted Python package releases.
- The attacker adds malicious installation hooks or runtime code to a version allowed by the documented installation commands.
- A user follows the instructions and runs
git clonefollowed bypip install -e ., or installs the open-ended requirements file. - Pip executes the compromised component's build or installation logic, or the malicious ...[truncated 746 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the MCP dependency to a reviewed immutable commit rather than cloning the repository's moving default branch:
bash git clone https://github.com/ccq1/cn-financial-mcp.git ~/cn-financial-mcp cd ~/cn-financial-mcp git checkout --detach <audited-commit-sha>-
Publish and verify the expected commit ID or signed release. Where practical, verify a release archive with a documented SHA-256 digest before installation.
-
Replace minimum-version constraints with tested exact versions and generate a hash-locked requirements file, for example using
pip-compile --generate-hashes. -
Install dependencies in a dedicated, unprivileged virtual environment rather than the system Python environment.
-
Review the MCP package's build configuration, installation hooks, transitive dependencies, and runtime network behavior before approving an updated commit.
-
Use automated dependency scanning and a controlled update process so version changes are reviewed and tested before deployment.
-
Avoid
pip install -e .for production use where possible. Build a reproducible wheel from the audited source and verify its digest before installation.
