subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for img in images: path = os.path.join(shots_dir, img) print(f'Sending {img}...', flush=True) result = subprocess.run( ['python', script, path, user_id], capture_output=True )- Confidence
- 96% confidence
- Finding
- The code invokes an external Python script through subprocess to send files to a hardcoded Feishu user, creating a data-transfer capability beyond local image generation. Although arguments are passed as a list rather than a shell string, the behavior still enables exfiltration of generated content and delegates security-sensitive actions to another script that is outside this file's control.
