T08 · Insecure Dependencies
- Location
scripts/search.py:22- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/search.py, lines 22–26
Vulnerability Type: Unpinned third-party dependency and unsafe reproducibility
Risk Level: MediumVulnerable Code
python try: import requests except ImportError: print("[ERROR] Missing dependency: requests\nInstall it with: pip install requests", file=sys.stderr) sys.exit(1)The dependency instructions in
SKILL.mdalso direct users to installrequestswithout a version or integrity constraint:markdown - `requests` library (`pip install requests`)Technical Analysis
The Skill depends on the third-party
requestspackage but does not provide a locked dependency manifest, an exact version, or package hashes. The suggested command resolves whichever release the configured Python package index supplies at installation time.This makes installations non-reproducible and leaves the Skill exposed to supply-chain failures. Exploitation would require a separate compromise or misconfiguration of the package delivery path, such as:
- Compromise of a configured package index or package publisher.
- A malicious private index serving a substituted package.
- User or environment-level
pipconfiguration redirecting installation to an untrusted source. - A future compromised or vulnerable dependency release being selected automatically.
The reviewed code does not automatically run
pip, andrequestsis a legitimate package rather than an apparent typosquat. Therefore, exploitation is conditional on an operator following the displayed installation instruction and receiving an unsafe artifact from the configured package source.The Skill's declared network behavior is otherwise consistent with its functionality: it submits user-derived pharmaceutical search parameters and the
NOAH_API_TOKENto the fixed HTTPS endpointhttps://www.noah.bio/api/skills/drug_search/. Redirects are disabled, and th ...[truncated 1538 chars]- Remediation
View remediation
Remediation Suggestions
-
Add a dependency lock or requirements file containing an audited exact version, for example:
text requests==<audited-version> -
For stronger artifact integrity, include hashes generated from trusted artifacts and install with hash verification:
bash python -m pip install --require-hashes -r requirements.txt -
Pin and review relevant transitive dependencies where the deployment model requires fully reproducible environments.
-
Replace the generic
pip install requestsmessage and documentation with installation from the project-maintained lock file. -
Use an explicitly trusted package index and prevent untrusted user-level or environment-level
pipconfiguration from silently changing the source. -
Install dependencies inside a dedicated virtual environment under a non-privileged account.
-
Use automated dependency scanning and controlled update review so pinned versions continue receiving security fixes.
-
