T08 · Insecure Dependencies
- Location
scripts/scrape-with-selenium.py:46- Finding
Unpinned Dependencies and Runtime Browser-Driver Download
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:17-19;scripts/scrape-with-selenium.py:27,46
Vulnerability Type: Supply-chain exposure through unpinned dependencies and runtime executable retrieval
Risk Level: MediumThe installation instructions use unpinned package names:
bash pip install requests beautifulsoup4 lxml # For JS-heavy sites: pip install selenium webdriver-managerThe Selenium scraper imports
webdriver-manager, downloads or resolves a browser-driver executable at runtime, and launches it:python from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.service import Servicepython service = Service(ChromeDriverManager().install()) return webdriver.Chrome(service=service, options=opts)Technical Analysis
The project does not pin dependency versions or verify package hashes. Consequently, the code installed under these package names can change after the Skill has been audited. This exposes installation to compromised releases, dependency-account compromise, malicious package-index configuration, or dependency-resolution changes.
ChromeDriverManager().install()further expands the supply-chain trust boundary by acquiring a native executable outside the reviewed project and subsequently passing it to Selenium for execution. The project does not independently validate the downloaded driver's expected checksum or provenance.There is no evidence that the current dependencies or driver are malicious. The issue is that the effective executable code is mutable and is not cryptographically tied to a reviewed version.
Attack Path
- An attacker compromises a dependency release, distribution account, configured package index, or browser-driver distribution path.
- A user follows the documented unpinned
pip installcommands or invokes the Selenium script. - The package manager resolves a compromised dependency, or ...[truncated 756 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct and transitive Python dependency to a reviewed version in a lock file.
- Install packages with verified hashes, such as through
pip install --require-hashes -r requirements.txt. - Use an explicitly trusted package index and disable unintended extra indexes.
- Replace runtime driver retrieval with a preinstalled, version-pinned ChromeDriver supplied by a trusted system package or controlled artifact repository.
- Verify the browser driver's cryptographic checksum before execution if downloading it at runtime is unavoidable.
- Run dependency installation and browser execution as an unprivileged user in an isolated environment without credentials or unnecessary filesystem access.
- Add automated dependency and provenance scanning to the release process.
