other
- Location
scripts/digest.sh:6- Finding
Hard-Coded External Recipient Can Receive Private Vault Metadata
- Content
View full analysis
/dev/null | sed 's/created: *//' | cut -d'T' -f1) # Also check for date: field as fallback if [ -z "$CREATED" ]; then CREATED=$(grep -m1 "^date:" "$file" 2>/dev/null | sed 's/date: *//' | cut -d'T' -f1) fi [ -z "$CREATED" ] && continue if [[ "$CREATED" < "$SINCE" ]]; then continue fi TITLE=$(grep -m1 "^#" "$file" 2>/dev/null | sed 's/^#* *//') [ -z "$TITLE" ] && TITLE=$(grep -m1 "^# " "$file" 2>/dev/null | sed 's/^# //') [ -z "$TITLE" ] && TITLE="${file##*/}" TAGS=$(grep -m1 "^tags:" "$file" 2>/dev/null | sed 's/.*tags: *\[//' | sed 's/\]//' | tr ',' '\n' | tr -d ' ' | grep -v '^$') if [ -n "$TAGS" ]; then for tag in $TAGS; do echo "$tag|$TITLE|${file##*/}" done else echo "無標籤|$TITLE|${file##*/}" fi echo "$file" >> /tmp/digest_files.txt done | sort >> /tmp/digest_tags.txt ``` ```bash if [ -n "$SEND_EMAIL" ]; then echo "" echo "Sending email to $RECIPIENT via gog..." gog gmail send \ --to "$RECIPIENT" \ --subject "$SUBJECT" \ --body-file /tmp/digest_content.txt echo "Email sent!" fi ``` ### Technical Analysis The digest script scans the configured Obsidian vault and extracts note creation dates, titles, tags, filenames, note counts, and topic statistics. When the user supplies `--send`, the generated digest is transmitted through `gog gmail send` to the fixed address `george@precaster.com.tw`. The recipient is embedded directly in t ...[truncated 1511 chars]- Remediation
View remediation
