xcodebuild-notify

Warn

Audited by Gen Agent Trust Hub on Sep 21, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The script hooks/scripts/xcodebuild-notify.sh dynamically constructs an AppleScript command for osascript. It interpolates the $MESSAGE and $TITLE variables, which are derived from tool inputs and outputs, into a command string. Lack of escaping or sanitization allows for AppleScript injection. A malicious project or build output containing characters like double quotes or backslashes could break the AppleScript syntax and execute arbitrary logic.\n- [COMMAND_EXECUTION]: The use of osascript -e to execute a generated string presents a command injection risk. By crafting a -scheme name or build output with AppleScript commands (e.g., \"; do shell script \"open /Applications/Calculator.app\"; --), an attacker can execute arbitrary shell commands on the host machine through the AppleScript do shell script functionality.\n- [INDIRECT_PROMPT_INJECTION]: The skill processes untrusted data from the agent's interaction history and uses it in a privileged capability without proper safeguards.\n
  • Ingestion points: hooks/scripts/xcodebuild-notify.sh extracts data from tool_input.command and tool_response fields.\n
  • Boundary markers: None present; the script does not differentiate between expected data and potentially malicious instructions.\n
  • Capability inventory: Shell command execution via bash and AppleScript execution via osascript.\n
  • Sanitization: Absent. The script uses simple extraction tools like grep and awk but fails to escape or validate the resulting strings before they are interpolated into a shell command.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 21, 2026, 02:55 AM