subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _macos_notify(message: str): try: subprocess.run([ "osascript", "-e", f'display notification "{message}" with title "OpenClaw Preflight"' ], timeout=5)- Confidence
- 80% confidence
- Finding
- The code passes the alert message directly into an AppleScript snippet executed by `osascript`. Although `subprocess.run` is invoked with an argument list rather than a shell, the AppleScript source itself is dynamically constructed, so quotes or AppleScript metacharacters in `message` could break out of the intended string and alter the script behavior. In this skill, most messages are locally generated error strings, but some content may include exception text from external systems, which makes script injection plausible.
