T03 · Remote Payload Retrieval and Execution
- Location
scripts/bootstrap.sh:10- Finding
Bootstrap Executes Mutable Remote Shell Code Without Verification
- Content
View full analysis
/dev/null 2>&1; then TMP="$(mktemp)" URL="https://raw.githubusercontent.com/awp-worknet/ardi-skill/main/install.sh" if command -v curl >/dev/null 2>&1; then curl -fsSL -o "$TMP" "$URL" elif command -v wget >/dev/null 2>&1; then wget -qO "$TMP" "$URL" elif command -v python3 >/dev/null 2>&1; then python3 -c "import sys, urllib.request; urllib.request.urlretrieve(sys.argv[1], sys.argv[2])" "$URL" "$TMP" else echo "need curl, wget, or python3 to fetch ardi-agent" >&2; exit 1 fi INSTALL_DIR="$INSTALL_DIR" sh "$TMP" fi ``` The documented installation path also pipes the mutable script directly into a shell: ```sh curl -fsSL https://raw.githubusercontent.com/awp-worknet/ardi-skill/main/install.sh | sh ``` The auto-mine path independently retrieves and executes mutable repository content: ```rust let status = Command::new("git") .args(["clone", "--depth", "1", REPO_URL]) .arg(&clone_dir) .status() .map_err(|e| anyhow!("git clone failed to spawn: {e}"))?; ``` ```rust let status = Command::new("bash") .arg(&installer) .status() .map_err(|e| anyhow!("failed to exec {}: {e}", installer.display()))?; ``` ### Technical Analysis The bootstrap retrieves `install.sh` from the mutable `main` branch and immediately executes it. It does not pin a commit hash, validate a cryptographic checksum, verify a signature, or compare the downloaded file with the installer bundled in the audited artifact. Consequently, the code that runs during installation is not necessarily the code reviewed in this audit. TLS protects the connection in transit, but it does not protect against repository compromise ...[truncated 1603 chars]- Remediation
View remediation
