T08 · Insecure Dependencies
- Location
feishu_backup.sh:17- Finding
Execution of Unbundled and Unverified External Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
feishu_backup.sh, lines 17–24
Vulnerability Type: Execution of external local dependencies without integrity verification
Risk Level: HighVulnerable Code
bash DOWNLOADER="$SCRIPT_DIR/../shared/feishu_downloader.py" BACKUP_DIR="${BACKUP_DIR:-$HOME/.openclaw/doc/backup}" mkdir -p "$BACKUP_DIR" source "$SCRIPT_DIR/../shared/feishu_args.sh" python3 "$DOWNLOADER" "${FEISHU_ARGS[@]}" "$BACKUP_DIR"Technical Analysis
The script relies on
../shared/feishu_args.shand../shared/feishu_downloader.py, neither of which is included in the audited project. Their behavior and integrity therefore cannot be established from the reviewed package.The
sourcecommand executes the entire contents offeishu_args.shin the current shell process. It is not limited to definingFEISHU_ARGS; the dependency can run arbitrary shell commands and modify variables or process state. The subsequent Python invocation similarly executes the unverifiedfeishu_downloader.py.No cryptographic hash, trusted ownership check, permission validation, canonical-path restriction, or symlink rejection occurs before execution. Consequently, project review and integrity controls over the two packaged files do not cover the code that implements the effective backup operation.
Attack Path
- An attacker obtains write access to the expected sibling
shareddirectory, replaces one of the referenced files, or redirects it through a malicious symlink. - The attacker places arbitrary shell commands in
feishu_args.shor arbitrary Python code infeishu_downloader.py. - A user or AI agent invokes
feishu_backup.shfor a legitimate Feishu backup operation. - The script sources or executes the attacker-controlled dependency without verifying its identity or integrity.
- The malicious code runs with the invoking user's privileges and inherits the script's environment and avail ...[truncated 877 chars]
- An attacker obtains write access to the expected sibling
- Remediation
View remediation
Remediation Suggestions
- Bundle
feishu_args.shandfeishu_downloader.pyinside the reviewed skill package rather than resolving them from a sibling directory. - Resolve every executable dependency to a canonical path and verify that it remains beneath an approved, immutable skill directory.
- Reject symbolic links and files with unexpected ownership or group/world-writable permissions.
- Pin and verify cryptographic hashes or signed manifests for executable dependencies before loading them.
- Avoid sourcing an external shell file. Parse declarative configuration as data or invoke a narrowly scoped helper process instead.
- Execute the downloader with a minimal environment and only the filesystem and network permissions required for the backup operation.
- Include all effective runtime dependencies in future security reviews and release artifacts.
- Bundle
