subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
''' try: subprocess.run(['osascript', '-e', script], check=True, timeout=10) return True except Exception as e: print(f"✗ 复制文件失败:{e}")- Confidence
- 84% confidence
- Finding
- This AppleScript is built by interpolating `abs_path` directly into a quoted script string, so a file path containing quotes or AppleScript metacharacters could break out of the intended string literal and alter script behavior. In practice this can lead to unintended UI actions or script injection when processing attacker-controlled file names/paths.
