HIGH-Severity Shell Injection Risk in Cypress Script (B602) - Subprocess Popen with shell=True
A high-severity security vulnerability has been flagged in a key automation script, exposing the codebase to potential shell injection attacks. The scanner identified a `subprocess.Popen` call configured with `shell=True` in the file `scripts/cypress_run.py` at line 83. This configuration is a known security anti-pattern (CWE-78) that can allow an attacker to execute arbitrary commands on the host system if they can control the input passed to the subprocess.
The finding, tagged as `B602` by the Bandit security scanner, represents a direct command injection vector within the project's testing infrastructure. The specific script, `cypress_run.py`, is typically used to orchestrate end-to-end tests, a process that may handle various external inputs or environment variables. The use of `shell=True` bypasses safe argument parsing, making the application susceptible to manipulation where untrusted data could reach this command execution point.
Remediation has been assigned, with a note stating 'Devin will investigate this finding, implement a fix, and open a pull request.' The urgency of the fix is underscored by the HIGH severity rating. Left unpatched, this flaw could compromise the integrity of the CI/CD pipeline or the underlying server, depending on the script's execution context and privilege level. The fingerprint for this specific issue is `8d23231b353126b5fea5`.