T09 · Insecure Skill Coding Practices
- Location
index.ts:37- Finding
Configurable LLM Endpoint Can Exfiltrate Email Content and API Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The plugin largely does what it claims, but it handles private Gmail content, external AI classification, Telegram forwarding, and remote installation with weaker disclosure and scoping than users should accept without review.
Install only after confirming you are comfortable with private Gmail metadata and snippets being sent to Telegram and, if llmApiKey is set, to the configured LLM provider. Avoid custom llmBaseUrl values unless you fully trust and control the endpoint, use a dedicated low-privilege Google Cloud project, secure OpenClaw plugin config because it stores the LLM key, and verify the downloaded plugin source or digest before following the GitHub archive install command.
index.ts:37Configurable LLM Endpoint Can Exfiltrate Email Content and API Credentials
SKILL.md:89Executable Plugin Is Retrieved from a Mutable External Archive Without Integrity Verification
The skill sets up forwarding of email-derived information to Telegram and optionally to an external LLM service for classification, but it does not prominently warn the user that potentially sensitive mailbox content and metadata may leave Gmail and be transmitted to third parties. In the context of an email-monitoring skill, this omission is especially dangerous because inbox data commonly contains personal, financial, legal, or corporate secrets.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
If no accounts are listed, stop and tell the user to set up gog first:
gog auth credentials /path/to/client_secret.json
gog auth add you@gmail.com --services gmail
The configurable llmBaseUrl allows full email-derived content to be sent to an arbitrary endpoint, not just a fixed known provider. That materially increases exfiltration risk because a malicious or compromised configuration can redirect private inbox data to attacker-controlled infrastructure under the guise of classification.
The README states that inbox contents are classified by an external LLM and important messages are forwarded to Telegram, but it does not clearly warn users that potentially sensitive mailbox data may leave Gmail and be disclosed to third-party services. This creates a real privacy and compliance risk because users may enable the plugin without understanding that personal, confidential, or regulated email content could be transmitted externally.
The configuration steps instruct users to provide an LLM API key, which operationally enables external processing of mailbox data, but the README does not warn that this may transmit email contents to a third-party API for classification. In the context of an email-monitoring plugin, that omission is security-relevant because it can lead to unintentional exfiltration of sensitive communications.
The skill instructs the agent to perform network-capable actions such as installing a remote plugin, authenticating with Google Cloud, enabling APIs, and configuring external integrations, but it declares no explicit tool scope or allowed-tools metadata. This creates an authorization gap where a broadly invoked skill could perform sensitive network actions without clear least-privilege boundaries or user-visible permission constraints.
The invocation description is broad enough to match common setup or troubleshooting requests around email notifications, Gmail monitoring, or missing alerts, which can cause the skill to activate in situations beyond a tightly intended scope. Because the skill then walks through cloud auth, plugin installation, and service configuration, overbroad triggering increases the chance of unintended sensitive changes to a user's environment.
The skill sends sender, subject, and up to 500 characters of email body to an external LLM for classification, which exceeds the core Gmail-to-Telegram forwarding behavior described to the user. This creates a real data disclosure risk because potentially sensitive inbox content is transmitted to a third party without any visible consent or clear necessity in this file.
The file performs external transmission to an API endpoint using inbox-derived content. In this skill's context, external transmission is security-relevant because the transmitted data originates from private email and is sent outside the primary mail monitoring channel described to the user.
return { important: true, summary: subject };
}
const baseUrl = cfg.llmBaseUrl ?? "https://api.openai.com/v1";
const model = cfg.llmModel ?? "gpt-4o-mini";
try {
The code transmits email content to an external LLM service without any visible user-facing warning, consent flow, or in-file disclosure. Even if intended for triage, this is dangerous because inbox contents often include personal, financial, or confidential data that users may not expect to leave Google's environment.
The skill forwards sender, subject, and summary to Telegram, which is an external messaging platform, without any visible warning or confirmation in this file. This is a real privacy risk because email metadata and derived content may be sensitive, and Telegram chats can be accessible across devices or by unintended recipients if misconfigured.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"llmBaseUrl": {
"type": "string",
"description": "LLM API base URL",
"default": "https://api.openai.com/v1"
},
"llmModel": {
"type": "string",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"llmBaseUrl": {
"type": "string",
"description": "LLM API base URL",
"default": "https://api.openai.com/v1"
},
"llmModel": {
"type": "string",
The system prompt instructs the model to always produce the summary in the same language as the email, imposing a language behavior automatically. There is no indication in this file that the user can choose or opt into that locale/language handling.
The inline comments segment the logic as 'Register Gmail watch' and later 'Subscribe to Pub/Sub'; however, the service's operational behavior depends on both watch registration and active Pub/Sub message consumption. While not severe, the documentation framing understates that the component is also a long-lived subscriber processing inbound Pub/Sub events.
No suspicious patterns detected.