T08 · Insecure Dependencies
- Location
scripts/env_init.sh:30- Finding
Automatic Installation of an Unverified Remote SDK Artifact
- Content
View full analysis
/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || echo "0.0.0") remote_ver=$(echo "$manifest" | jq -r '.sdk_version // "unknown"') if [ "$local_ver" = "0.0.0" ] || [ "$local_ver" != "$remote_ver" ]; then echo "📦 SDK 更新: $local_ver → $remote_ver,正在安装..." pip install --quiet --upgrade https://las-ai-cn-beijing-online.tos-cn-beijing.volces.com/operator_cards_serving/public/skills/sdk/las_sdk-0.2.0-py3-none-any.whl fi ``` ### Technical Analysis The initialization script automatically downloads and installs a Python wheel from a remote object-storage URL. Although HTTPS protects the artifact in transit, the script does not verify a cryptographic hash, package signature, or trusted release metadata before installation. The installation decision depends on a mutable remote manifest, while the actual wheel URL is separately hard-coded to version `0.2.0`. This disconnect can also cause unnecessary reinstallations whenever the manifest reports another version. More importantly, compromise of the storage account, artifact publication process, DNS/TLS trust chain, or upstream release credentials could allow a modified wheel to be delivered. Installing a Python wheel can execute package build or installation behavior and introduces executable modules and console entry points into the environment. The downloaded package therefore becomes an effective remote code-execution channel. ### Attack Path 1. An attacker compromises the remote artifact repository, its publishing credentials, or another component capable of rep ...[truncated 1062 chars]- Remediation
View remediation
