subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
} def run(cmd): return subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout.strip() def load_config(): if os.path.exists(CONFIG_PATH):- Confidence
- 98% confidence
- Finding
- The helper executes arbitrary shell strings with shell=True, and later callers interpolate data such as the discovered hsclick path and generated file paths into command strings. This creates a command-injection surface and also makes every future call site dangerous because untrusted values can be turned into shell syntax.
