T09 · Insecure Skill Coding Practices
- Location
scripts/debug-notify.sh:38- Finding
Unauthenticated Webhook Listener Logs Sensitive Requests and Can Be Publicly Exposed
- Content
View full analysis
> "$LOG_FILE" # Use nc to receive requests request=$(nc -l -p "$port" -q 1 2>/dev/null || true) if [ -n "$request" ]; then timestamp=$(date '+%Y-%m-%d %H:%M:%S') echo "[$timestamp] Received request:" >> "$LOG_FILE" echo "$request" >> "$LOG_FILE" echo "-------------------" >> "$LOG_FILE" echo "✅ Notification received and logged to: $LOG_FILE" echo "" echo "Request content:" echo "$request" fi done ;; 2) # ... read -p "Enter local service port (default 8080): " port port=${port:-8080} echo "" echo "Starting ngrok, exposing port $port to the public network..." echo "" # Start ngrok ngrok http "$port" --log="$HOME/.openclaw/workspace/ngrok.log" & ``` ### Technical Analysis The debugging listener uses `nc` without restricting the listening interface, authenticating clients, validating Alipay+ signatures, limiting request size, or applying rate limits. Every received request is written verbatim to a predictable plaintext log file. Webhook requests can contain transaction identifiers, customer or merchant information, authorization-related headers, signatures, and payme ...[truncated 1702 chars]- Remediation
View remediation
