T08 · Insecure Dependencies
- Location
scripts/hormuz_monitor.py:34- Finding
Unpinned dependencies and runtime download of an executable browser driver
- Content
View full analysis
Vulnerability Details
File Location:
scripts/hormuz_monitor.py:34-70; related installation instructions atSKILL.md:84andSKILL.md:127
Vulnerability Type: Supply-chain exposure through unpinned dependencies and runtime executable retrieval
Risk Level: MediumComplete Code Snippet
python try: from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from webdriver_manager.chrome import ChromeDriverManager except ImportError: print("ERROR: selenium and webdriver-manager not installed") print("Install: pip install selenium webdriver-manager") sys.exit(1) def setup_driver(): """Setup Chrome WebDriver with headless options""" options = Options() options.add_argument("--headless=new") options.add_argument("--no-sandbox") options.add_argument("--disable-dev-shm-usage") options.add_argument("--disable-gpu") options.add_argument("--window-size=1920,1080") options.add_argument("--disable-extensions") options.add_argument("--disable-infobars") options.add_argument("--disable-notifications") options.add_argument("--lang=en-US") # Use installed Chrome options.binary_location = "/usr/bin/google-chrome" # Auto-download matching ChromeDriver service = Service(ChromeDriverManager().install()) driver = webdriver.Chrome(service=service, options=options) return driverThe documentation also instructs users to install dependencies without version or integrity constraints:
bash pip install selenium webdriver-managerTechnical Analysis
The Skill does not pin exact versions or verify hashes for `seleniu ...[truncated 2337 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin exact dependency versions in a lock file or requirements file:
text selenium==<reviewed-version> webdriver-manager==<reviewed-version> - Require package hashes using a hash-locked installation process such as:
bash pip install --require-hashes -r requirements.txt - Remove runtime driver acquisition from the Skill. Provision a reviewed ChromeDriver through the deployment environment and reference its fixed local path.
- Verify the ChromeDriver version and cryptographic checksum before use.
- Store approved driver artifacts in a controlled internal repository rather than resolving them dynamically from public infrastructure.
- Run the Skill in a dedicated, unprivileged virtual environment or container with restricted filesystem and network access.
- Document the exact supported Chrome, ChromeDriver, Selenium, and Python versions.
- Fail closed if the approved local driver is missing or fails integrity verification instead of downloading a replacement automatically.
- Pin exact dependency versions in a lock file or requirements file:
