T03 · Remote Payload Retrieval and Execution
- Location
scripts/bootstrap.sh:5- Finding
Mutable Remote Repository Is Downloaded, Installed, and Executed Without Integrity Verification
- Content
View full analysis
/dev/null 2>&1; then if [ -d "$PROJECT_DIR/.git" ]; then echo ">> Updating repo in $PROJECT_DIR" git -C "$PROJECT_DIR" pull --ff-only else echo ">> Cloning repo into $PROJECT_DIR" git clone "$REPO_URL" "$PROJECT_DIR" fi else if [ -d "$PROJECT_DIR" ] && [ "$(ls -A "$PROJECT_DIR")" ]; then echo ">> Git not available. Using existing contents in $PROJECT_DIR" else echo ">> Git not available. Downloading zip to $PROJECT_DIR" mkdir -p "$PROJECT_DIR" tmp_zip="$(mktemp -t agentic_paper_digest.XXXXXX).zip" if command -v curl >/dev/null 2>&1; then curl -L "$ZIP_URL" -o "$tmp_zip" elif command -v wget >/dev/null 2>&1; then wget -O "$tmp_zip" "$ZIP_URL" else "$PY_BIN" - "$ZIP_URL" "$tmp_zip" <<'PY' import sys import urllib.request url, out = sys.argv[1], sys.argv[2] urllib.request.urlretrieve(url, out) PY fi ``` ```bash source .venv/bin/activate echo ">> Installing Python deps" pip install -r requirements.txt ``` The retrieved package is subsequently executed by the wrappers: ```bash python -m paper_finder run --json "$@" ``` ```bash python -m paper_finder serve "$@" ``` ### Technical Analysis The bootstrap process retrieves the mutable `main` branch from a personal GitHub repository. It does not pin an immutable commit, verify a cryptographic checksum, validate a signature, or otherwise ensure that the downloaded content is the same content that was audited. After retrieval, `pip install -r requirements. ...[truncated 2126 chars]- Remediation
View remediation
