subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # Mermaid CLI 실행 result = subprocess.run([ 'npx', '-y', '@mermaid-js/mermaid-cli', '-i', mmd_file, '-o', str(output_file),- Confidence
- 91% confidence
- Finding
- The code executes an external tool (`npx @mermaid-js/mermaid-cli`) on Mermaid content derived from article input. Although `subprocess.run` is invoked without `shell=True`, which avoids classic shell injection, it still processes untrusted content through a complex third-party CLI and auto-downloads packages via `npx -y`, creating supply-chain and parser-exploitation risk.
