T03 · Remote Payload Retrieval and Execution
- Location
scripts/upgrade.sh:178- Finding
Unsigned Remote Skill Archives Are Installed as Trusted Code
- Content
View full analysis
>"$LOG_FILE") if [ "$HTTP_CODE" = "200" ] && [ -s "${SKILLHUB_TMP}/${ASSET_NAME}.zip" ]; then log " ✅ SkillHub download success (HTTP $HTTP_CODE), extracting..." EXTRACT_TMP=$(mktemp -d) if unzip -q "${SKILLHUB_TMP}/${ASSET_NAME}.zip" -d "$EXTRACT_TMP" 2>>"$LOG_FILE"; then SKILL_SUBDIR=$(find "$EXTRACT_TMP" -maxdepth 1 -mindepth 1 -type d | head -1) if [ -n "$SKILL_SUBDIR" ] && [ -f "$SKILL_SUBDIR/SKILL.md" ]; then rm -rf "${INSTALLED_AT:?}"/* cp -r "$SKILL_SUBDIR"/. "$INSTALLED_AT/" SKILLHUB_OK=true log " ✅ SkillHub install complete" UPGRADE_RC=0 ``` The resulting installation is validated only through file presence, file count, and version text: ```bash OLD_COUNT=$(find "$BACKUP_DIR" -type f | wc -l | tr -d ' ') NEW_COUNT=$(find "$INSTALLED_AT" -type f | wc -l | tr -d ' ') if [ "$NEW_COUNT" -lt "$OLD_COUNT" ]; then log " ❌ File count decreased: $OLD_COUNT → $NEW_COUNT (possible incomplete upgrade)" GATE3_PASS=false else log " ✅ File count OK ($NEW_COUNT files, was $OLD_COUNT)" fi NEW_SKILL_VER=$(grep -E "^version:" "$INSTALLED_AT/SKILL.md" 2>/dev/null | head -1 | sed 's/version:[[:space:]]*//') ``` ### Technical Analysis The updater downloads a mutable ZIP archive from a third-party cloud-storage endpoint and replaces the installed Skill with its contents. It does not verify: - A cryptographic sig ...[truncated 1944 chars]- Remediation
View remediation
