T07 · Tool Hijacking and Spoofing
- Location
feishu_fetch_and_print.sh:16- Finding
Execution of Unverified Code from Outside the Skill Package
- Content
View full analysis
/dev/null | awk '{print $1}' | tr '\n' ' ')" exit 1 fi source "$SCRIPT_DIR/../shared/feishu_args.sh" # Download files and collect successful paths DOWNLOADED=() while IFS= read -r line; do echo "$line" if [[ "$line" == SUCCESS:* ]]; then filepath="${line#SUCCESS: }" DOWNLOADED+=("$filepath") fi done < <(python3 "$DOWNLOADER" "${FEISHU_ARGS[@]}" "$INBOUND_DIR") ``` ### Technical Analysis The script loads two executable components from `../shared`, outside the audited Skill directory: - `feishu_args.sh` is loaded using `source`, causing every command in that file to execute inside the current shell process. - `feishu_downloader.py` is executed directly with Python. Neither component is included in the audited artifact. The Skill does not validate their ownership, permissions, content hashes, signatures, or canonical paths before execution. Consequently, the effective behavior of the Skill depends on mutable, unaudited code outside its package. Using `source` is particularly sensitive because the sourced file can modify shell variables and functions, change shell behavior, read inherited environment variables, or execute arbitrary commands. The downloader similarly runs with all filesystem, network, credential, and device access available to the user invoking the Skill. Although the declared functionality legitimately requires communication with Feishu ...[truncated 1692 chars]- Remediation
View remediation
