subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return True # 2. Add all changes subprocess.run(["git", "add", "-A"], cwd=project_dir, check=True, capture_output=True) # 3. Commit with standardized message commit_msg = f"SE_ID:{se_id}, ST_ID:{st_id}, MUF_ID:{muf_id}, UT_ID:{ut_id}"- Confidence
- 95% confidence
- Finding
- The worker performs git add -A on the entire provided project directory, automatically staging every file under that path. In the context of an AI-driven workflow, this can unintentionally commit secrets, unrelated files, or attacker-planted content if the workspace/project_dir is not tightly controlled.
