T03 · Remote Payload Retrieval and Execution
- Location
scripts/clawshake.sh:336- Finding
Executable self-update replaces the audited script without integrity verification
- Content
View full analysis
/dev/null) if [ -z "$REMOTE" ]; then echo "Error: could not reach version endpoint" >&2 exit 1 fi REMOTE_VER=$(json_get "version" "$REMOTE") if [ "$REMOTE_VER" = "$VERSION" ]; then echo "Already on latest version ($VERSION). No update needed." exit 0 fi echo "Updating from $VERSION → $REMOTE_VER ..." REMOTE_URL=$(json_get "url" "$REMOTE") # Download from ClawHub raw script URL SCRIPT_URL="https://clawhub.com/skills/clawshake/raw/scripts/clawshake.sh" SELF="$0" TMP="${SELF}.tmp" if curl -sf "$SCRIPT_URL" -o "$TMP"; then chmod +x "$TMP" mv "$TMP" "$SELF" echo "✓ Updated to $REMOTE_VER. Restart your agent to use the new version." ``` ### Technical Analysis The `self-update` command downloads a shell script from an external URL, marks it executable, and replaces the currently installed script. It does not verify a cryptographic signature or a trusted checksum before installation. The version API documentation includes a `sha256` field in `references/api-reference.md:263-270`, but the documented value is empty and the updater never retrieves or verifies it: ```json { "version": "0.3.0", "url": "https://clawhub.com/skills/clawshake", "changelog": "Added Feeds, Directory, Self-update", "sha256": "" } ``` TLS protects data in transit under normal conditions, but it does not provide artifact-level authenticity if the hosting account, origin server, CDN, release process, or update content is compromised. The updater also trusts the version endpoint only to decide whether an update is required; it downloads the ...[truncated 1642 chars]- Remediation
View remediation
