T09 · Insecure Skill Coding Practices
- Location
scripts/get-window-bounds.sh:24- Finding
AppleScript Injection Through an Untrusted Application Name
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill broadly matches its Mac UI automation purpose, but it needs Review because its scripts can generate real clicks, capture screens, leave screenshots behind, and contain an AppleScript injection flaw.
Install only if you are comfortable granting an agent practical control over your Mac UI and screen contents. Use it for tightly scoped, user-directed automation, avoid passing untrusted application names into its scripts, and treat screenshots saved under /tmp or calibration files under ~/.clawdbot as potentially sensitive. The package should be reviewed or hardened before use on accounts that handle private, financial, administrative, or security-sensitive workflows.
scripts/get-window-bounds.sh:24AppleScript Injection Through an Untrusted Application Name
scripts/calibrate.sh:7Predictable Temporary Directory Used for Calibration Screenshot
scripts/find-element.sh:7Predictable Temporary Directory and Persistent Full-Screen Capture
The declared description is focused on Mac UI automation and interaction with on-screen elements through mouse/keyboard automation tools. The supplied code does not perform any UI automation at all. Instead, it implements offline image processing: it takes an input image, checks dimensions, copies it, and crops a region using sips. While image cropping could conceivably support screenshot workflows, this code chunk’s primary behavior is file-based image manipulation, which is a materially different capability from the declared purpose and omits the core declared behaviors entirely.
The skill performs direct mouse and keyboard automation, including clicking dialogs, typing text, and activating focused elements, but does not prominently warn that synthetic input can trigger unintended or irreversible UI actions. In this context, a missed target, stale coordinates, or focus change could approve prompts, submit forms, close windows, or alter settings unexpectedly.
The skill performs direct mouse and keyboard automation, including clicking dialogs, typing text, and activating focused elements, but does not prominently warn that synthetic input can trigger unintended or irreversible UI actions. In this context, a missed target, stale coordinates, or focus change could approve prompts, submit forms, close windows, or alter settings unexpectedly.
The header comments and progress messages describe this as a calibration routine that discovers the real coordinate scale factor through screenshot-based analysis. However, the image-analysis steps are not implemented, and L45 hard-codes SCALE_FACTOR="2.5", meaning the script does not do what its documentation says it does.
The script captures a screenshot with the cursor and persists calibration data to the user's home directory without any explicit notice, consent flow, or minimization of what may be captured. In the context of a UI automation skill, screenshots can contain sensitive on-screen information from unrelated apps, making silent capture and storage a meaningful privacy risk even if the immediate script intent appears operational rather than malicious.
The script directly invokes cliclick to generate real mouse events on the host without any confirmation, dry-run mode, bounds validation, or focused-window verification. In a UI automation skill, that means a caller can trigger unintended clicks on sensitive dialogs, permission prompts, security settings, or destructive UI elements, especially if coordinates are stale or manipulated.
The manifest and top-level documentation describe this skill as controlling the Mac using cliclick and AppleScript, plus screenshots/window bounds. Line L271 introduces an additional automation capability via Python and pyautogui, which is not declared as part of the skill's stated toolset or purpose-specific implementation details.
No suspicious patterns detected.