other
- Location
scripts/enrich_note.sh:11- Finding
Private Bear Note Content Is Disclosed to External GIF Providers
- Content
View full analysis
/dev/null || echo "") TEXT=$(echo "$NOTE_JSON" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('text',''))" 2>/dev/null || echo "") # 2. Extract topic: prefer title, then first line TOPIC="${TITLE:-}" if [ -z "$TOPIC" ]; then TOPIC=$(echo "$TEXT" | head -1 | sed 's/^#\+ *//') fi TOPIC=$(echo "$TOPIC" | tr ' ' '+' | head -c 80) if [ -z "$TOPIC" ]; then echo "ERROR: Could not extract topic from note $NOTE_ID" exit 1 fi # 3. Search for a GIF GIF_URL="" if [ -n "$TENOR_KEY" ]; then GIF_URL=$(curl -sf "https://tenor.googleapis.com/v2/search?q=${TOPIC}&key=${TENOR_KEY}&limit=1&media_filter=gif" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['results'][0]['media_formats']['gif']['url'])" 2>/dev/null || echo "") fi if [ -z "$GIF_URL" ] && [ -n "$GIPHY_KEY" ]; then GIF_URL=$(curl -sf "https://api.giphy.com/v1/gifs/search?q=${TOPIC}&api_key=${GIPHY_KEY}&limit=1&rating=g" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['images']['original']['url'])" 2>/dev/null || echo "") fi ``` ### Technical Analysis The script reads private Bear note content and derives a search topic from the complete note title or, if no title exists, the first line of the note. Up to 80 bytes of this value are embedded in a URL and transmitted to Google Tenor or Giphy. External GIF search is necessary for the declared functionality, but sending note-derived content is a privacy-sensitive operation. The Skill documentation states that an API key is required but d ...[truncated 1580 chars]- Remediation
View remediation
