T09 · Insecure Skill Coding Practices
- Location
send_email.py:62- Finding
SMTP connections do not explicitly enforce certificate verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real SMTP email sender, but it can send arbitrary local files as attachments and includes an alternate mail script that conflicts with its stated credential boundary.
Review this skill carefully before installing. Use it only if you are comfortable giving the agent the ability to send email through your SMTP account, and require explicit user approval for every recipient and attachment path. Avoid attaching sensitive files unless you have verified the exact file and destination.
send_email.py:62SMTP connections do not explicitly enforce certificate verification
send_email.sh:29Legacy shell implementation violates the declared credential boundary
send_email.sh:17Manual email-header construction permits header injection
send_email.sh:16Plaintext temporary email may remain after interruption
The README explicitly instructs the agent to send emails and attachments to external recipients, but it does not warn that this transmits potentially sensitive data outside the local environment. In an agent setting, this creates a realistic exfiltration path because a user or prompt could cause files or report contents to be emailed externally without clear consent or visibility.
Without declared permissions the skill's intent is opaque and cannot be validated.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
skills.entries.send-email.env when the script runs — do not use the read tool on ~/.openclaw/openclaw.json or workspace/openclaw.json (exposes secrets). If the skill is enabled, assume env is configured; do not ask the user for passwords. Do not use ~/.msmtprc.python3 ~/.openclaw/workspace/skills/send-email/send_email.py "recipient" "Subject" "Body"
This code file includes user-facing natural language in the module docstring and command-line usage/messages that assume Chinese-language use. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
The function interface accepts an arbitrary attachment path and later reads it directly from the local filesystem without sandboxing or path restrictions. In a tool-using agent environment, this is dangerous because the email-sending feature can be repurposed to access and export unrelated local data not implied by the published skill purpose.
The skill can read any local file path provided as an attachment and transmit its contents over email, which expands its effective capability beyond the stated manifest description of simply sending emails via SMTP. In an agent context, this creates a clear exfiltration path for local secrets, tokens, SSH keys, config files, or other sensitive data if a user or upstream prompt supplies a path.
This skill can send emails and exfiltrate local file contents as attachments immediately based on provided arguments, with no confirmation prompt, allowlist, or disclosure barrier. In an agent context, that is dangerous because a prompt-injected or misdirected agent could send sensitive data or attachments to an attacker-controlled address without meaningful user awareness.
The script's descriptive comments and runtime messages are written in Chinese, which imposes a specific language/locale without offering a choice. Under the policy, hard-coded language requirements should be flagged unless the file explicitly documents a justified locale constraint or offers opt-in selection.
No suspicious patterns detected.