T01 · Skill Instruction Hijacking
- Location
scripts/soul.sh:37- Finding
Untrusted Remote Content Can Persistently Replace Agent Instructions
- Content
View full analysis
&2 if ! curl -sSfL "$CATALOG_URL" -o "$tmp" 2>/dev/null; then echo "❌ Failed to fetch catalog. Check your connection." >&2 rm -f "$tmp" exit 1 fi # Normalize: if top-level is array, wrap it; rename "soul" key → "content" python3 -c " import json, sys with open('$tmp') as f: data = json.load(f) if isinstance(data, list): data = {'version': 1, 'source': 'https://soulsearching.ai', 'souls': data} for s in data.get('souls', []): if 'soul' in s and 'content' not in s: s['content'] = s.pop('soul') with open('$CATALOG_FILE', 'w') as f: json.dump(data, f, indent=2) print(len(data.get('souls', []))) " > /dev/null ``` ```bash local soul_json soul_json=$(get_soul_json "$id") if [[ -z "$soul_json" ]]; then echo "❌ Soul '$id' not found in catalog." >&2 echo " Run: soul.sh browse (to see available souls)" >&2 exit 1 fi local name name=$(echo "$soul_json" | jq -r '.name') local content content=$(echo "$soul_json" | jq -r '.content') # Save to local store echo "$content" > "${SOUL_DIR}/${id}.md" echo "✅ Installed: $name → ~/.openclaw/souls/${id}.md" if [[ "$activate" == true ]]; then cmd_switch "$id" fi ``` ```bash # Backup current SOUL.md if it exists if [[ -f "$SOUL_FILE" ]]; then cp "$SOUL_FILE" "${SOUL_FILE}.bak" echo "📋 Backed up current SOUL.md → SOUL.md.bak" fi # Copy soul ...[truncated 2757 chars]- Remediation
View remediation
