T08 · Insecure Dependencies
Error
- Location
- SKILL.md:27
- Finding
- Unpinned Dependencies and Runtime WebDriver Executable Downloads<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27`; `scripts/form_filler.py:43-50`; `scripts/time_logger.py:44`; `scripts/web_scraper.py:46-53` **Vulnerability Type**: Software supply-chain exposure through unpinned packages and runtime executable retrieval **Risk Level**: High ### Vulnerable Code `SKILL.md:27`: ```bash pip install selenium webdriver-manager beautifulsoup4 pandas ``` `scripts/form_filler.py:43-50`: ```python if self.browser == 'chrome': service = Service(ChromeDriverManager().install()) self.driver = webdriver.Chrome(service=service, options=options) elif self.browser == 'firefox': service = Service(GeckoDriverManager().install()) self.driver = webdriver.Firefox(service=service, options=options) elif self.browser == 'edge': service = Service(EdgeChromiumDriverManager().install()) self.driver = webdriver.Edge(service=service, options=options) ``` `scripts/time_logger.py:44`: ```python service = Service(ChromeDriverManager().install()) ``` `scripts/web_scraper.py:46-53`: ```python if self.browser == 'chrome': service = Service(ChromeDriverManager().install()) self.driver = webdriver.Chrome(service=service, options=options) elif self.browser == 'firefox': service = Service(GeckoDriverManager().install()) self.driver = webdriver.Firefox(service=service, options=options) elif self.browser == 'edge': service = Service(EdgeChromiumDriverManager().install()) self.driver = webdriver.Edge(service=service, options=options) ``` ### Technical Analysis The installation instructions do not constrain dependency versions or verify package hashes. Consequently, later executions of the installation command may retrieve package versions that differ from those reviewed during the audit. The scripts also invoke `webdriver-manager` at runtime to locate or download native WebDriver executables. These executables run locally with the permissions of the user launching the script. The reviewed co ...[truncated 1661 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed version in a lockfile or requirements file. 2. Require cryptographic hashes, such as through `pip install --require-hashes`, for reproducible installations. 3. Use an approved internal package mirror or explicitly trusted package index. 4. Include transitive dependencies in dependency review, vulnerability scanning, and lockfile generation. 5. Do not download native WebDriver executables during ordinary script execution. 6. Provision reviewed drivers through the deployment or packaging process and reference a fixed local path. 7. Verify driver signatures or SHA-256 checksums before execution when downloading drivers cannot be avoided. 8. Run browser automation as a non-privileged account inside an isolated environment with restricted filesystem and network access. 9. Periodically update pinned versions through a controlled review and testing process. ]]>
