subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def make_fix(job_id=job.get('id')): def fix(): try: r = subprocess.run( ['openclaw', 'cron', 'run', job_id], capture_output=True, text=True, timeout=30 )- Confidence
- 75% confidence
- Finding
- The code takes a job_id derived from external openclaw cron metadata and passes it directly into a privileged operational command that triggers execution of that job. Even without shell injection, this is a trust-boundary issue: a malicious or tampered cron definition could cause the self-healer to run attacker-chosen jobs automatically, turning health monitoring into an execution trigger.
