other
- Location
morrisons-action.ts:2018- Finding
Automatic Disclosure of Delivery-Slot Metadata to an Implicit WhatsApp Recipient
- Content
View full analysis
0) { return allowFrom[0]; } } } catch (err) {} return ''; } ``` ```ts function sendWhatsAppMessage(message: string) { const target = getWhatsAppTarget(); if (!target) { console.log('ℹ️ No WhatsApp target configured (set MORRISONS_GROUP_TARGET or WHATSAPP_TARGET). Skipping notification.'); return; } console.log(`Sending WhatsApp message to ${target}...`); try { const res = spawnSync('openclaw', [ 'message', 'send', '--channel', 'whatsapp', '--target', target, '--message', message ], { encoding: 'utf-8' }); if (res.status !== 0) { console.error('Failed to send WhatsApp message. Error output:', res.stderr); } else { console.log('WhatsApp message sent successfully.'); } } catch (err: any) { console.error('Failed to send WhatsApp message:', err.message); } } ``` ```ts if (success) { sendWhatsAppMessage( `🛒 *Morrisons Slot Booked!*\n\n` + `You have successfully reserved the slot: *${date}* at *${time}*.\n` + `⚠️ *IMPORTANT:* You only have *1 hour* to checkout, otherwise it will e ...[truncated 2007 chars]- Remediation
View remediation
