T09 · Insecure Skill Coding Practices
- Location
scripts/profind-cli.sh:30- Finding
AppleScript Injection Through Unescaped Search Parameters
- Content
View full analysis
[选项]${NC}" echo "选项:" echo " --kind PDF|image|movie|document|archive|folder" echo " --size larger:1MB|smaller:100KB|equal:5GB" echo " --date modified:~week|created:~month" echo " --path ~/Documents" echo " --scope all|home|hidden" echo " --label red|orange|yellow|green|blue|purple|gray" exit 1 fi local url url=$(build_url "$name") echo -e "${GREEN}[ProFind]${NC} 搜索: $name" osascript -e "tell application \"ProFind\" to open location \"$url\"" & } ``` A second affected execution path is: ```bash cmd_window() { local query="${1:-}" if [ -z "$query" ]; then echo -e "${GREEN}[ProFind]${NC} 打开搜索窗口..." else echo -e "${GREEN}[ProFind]${NC} 打开搜索窗口,关键词: $query" fi if [ -n "$query" ]; then osascript -e "tell application \"ProFind\" to open location \"profind:search?name=${query}\"" & else osascript -e "tell application \"ProFind\ ...[truncated 2319 chars]- Remediation
View remediation
