subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not office_bin: raise PreprocessError("libreoffice/soffice not found for office document conversion.") with tempfile.TemporaryDirectory(prefix="med-skill-preprocess-") as tmp_dir: proc = subprocess.run( [office_bin, "--headless", "--convert-to", "txt:Text", "--outdir", tmp_dir, str(path)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False, )- Confidence
- 75% confidence
- Finding
- proc = subprocess.run( [office_bin, "--headless", "--convert-to", "txt:Text", "--outdir", tmp_dir, str(path)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
