subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
'-y', audio_path ] subprocess.run(cmd, capture_output=True) return audio_path def _detect_silence(self, audio_path: str) -> list:- Confidence
- 88% confidence
- Finding
- The subprocess call itself is not shell-injectable, but this helper writes extracted audio to a path created with tempfile.mktemp, which is insecure because the filename is generated without atomically creating the file. An attacker on the same system could race or pre-create the path, potentially causing overwrite of unintended files or interference with processing.
