subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def check_cli(): """Check if ov_cli is available.""" result = subprocess.run("ov_cli --version", shell=True, capture_output=True) if result.returncode == 0: print("✓ OpenViking CLI installed") return True- Confidence
- 90% confidence
- Finding
- The script invokes a shell with a string command (`shell=True`) just to check CLI availability. Even though the command is constant, shell execution unnecessarily exposes the check to PATH/environment manipulation and shell semantics, which is risky in an agent setup context where environment state may be less trusted.
