subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # 先暂存所有变更 subprocess.run(["git", "add", "-A"], capture_output=True, timeout=10) # 创建提交 subprocess.run( ["git", "commit", "-m", f"chore: {message}", "--allow-empty"],- Confidence
- 95% confidence
- Finding
- `git add -A` stages all working tree changes automatically, which can capture unintended or sensitive files and prepare them for commit without granular user confirmation. In the context of an agent skill, this broad repository mutation increases the risk of accidental data exposure or destructive workflow changes.
