subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
hot=False if pidfile.exists(): pid=pidfile.read_text().strip() hot=subprocess.run(['bash','-lc',f'kill -0 {pid}'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode==0 checks.append(('hot reload running', hot)) cron=subprocess.run(['bash','-lc','crontab -l 2>/dev/null | grep -q OPENCLAW_BRAIN_SYSTEM'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode==0 checks.append(('cron installed', cron))- Confidence
- 92% confidence
- Finding
- hot=subprocess.run(['bash','-lc',f'kill -0 {pid}'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode==0
