T09 · Insecure Skill Coding Practices
- Location
SKILL.md:601- Finding
API Key Disclosure Through Troubleshooting Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its WhatsApp Business purpose, but it gives agents high-impact send/delete authority and includes unsafe examples for handling API keys and OAuth URLs.
Review before installing if this will be used with a real WhatsApp Business account. Use a narrowly scoped Maton key where possible, never print or paste the full API key, treat connection authorization URLs as secrets, and require explicit confirmation of recipients, phone-number IDs, template names, media IDs, and connection IDs before sending, updating, or deleting anything.
SKILL.md:601API Key Disclosure Through Troubleshooting Output
SKILL.md:91OAuth Session URL Disclosure Through Unredacted Connection Responses
The documented DELETE media endpoint can permanently remove resources if an agent is induced to pass an attacker-chosen media_id or acts without confirmation. In an agent/tooling context, destructive parameterized endpoints increase the risk of unauthorized deletion or operational disruption.
DELETE /whatsapp-business/v21.0/{media_id}
The delete-template endpoint allows destructive action based on a user-supplied template name and account identifier, creating risk of accidental or manipulated deletion of messaging templates. In production workflows, this could break customer communications or compliance-approved messaging flows.
DELETE /whatsapp-business/v21.0/{whatsapp_business_account_id}/message_templates?name=template_name
The skill prominently documents actions that send messages, upload media, and modify external WhatsApp resources, but it does not include clear user-consent or impact warnings near those examples. In an agent setting, this increases the risk of unintended external communications or destructive actions being performed on behalf of a user without adequate notice.
The delete examples for connections and media are operationally destructive, yet the documentation does not warn that they may revoke access, disrupt automations, or permanently remove resources. In agent-driven use, omission of such warnings can cause accidental service interruption or data loss.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
};
// Send text message
await fetch(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
{
method: 'POST',
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
};
// Send text message
await fetch(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
{
method: 'POST',
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
# Send text message
response = requests.post(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
headers=headers,
json={
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
# Send text message
response = requests.post(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
headers=headers,
json={
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
# Send text message
response = requests.post(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
headers=headers,
json={
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
# Send text message
response = requests.post(
'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
headers=headers,
json={
Telling users to echo the API key directly can expose the credential on shared terminals, screen recordings, logs, or shell history, increasing the chance of credential theft. Although it is framed as troubleshooting, it normalizes unsafe secret handling.
Detected: suspicious.exposed_resource_identifier