T09 · Insecure Skill Coding Practices
- Location
SKILL.md:41- Finding
Plaintext Storage of Gmail App Password
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent for sending X/Twitter posts to Kindle, but it under-protects an email app password and sends post data through third-party services without enough safety guidance.
Review before installing. Use a dedicated low-risk email account and a protected secret store instead of TOOLS.md for SMTP credentials. Be aware that fxtwitter and the configured email provider may see the requested post or related metadata. Prefer adding explicit consent, HTML escaping, and URL validation before using this with sensitive content.
SKILL.md:41Plaintext Storage of Gmail App Password
SKILL.md:19Unescaped External Data Inserted into HTML Email
{tweet_text}
{timestamp}
``` ``` ### Technical Analysis The template inserts `author_handle`, `tweet_text`, `timestamp`, and `original_url` into HTML without requiring context-appropriate encoding or sanitization. These values originate from a user-selected external post, its URL, or the third-party FxTwitter API and therefore cross a trust boundary. Text placed inside elements must be HTML-escaped. The `original_url` value is more sensitive because it is inserted into an HTML attribute and requires attribute encoding plus strict scheme and host validation. Without these controls, crafted characters or markup could terminate the intended context and add attacker-controlled HTML. The exact behavior depends on the implementation used to construct the message and the receiving email client's sanitization. Modern clients commonly block scripts, but malicious markup may still create deceptive links, external tracking resources, misleading content, or malformed document output. ### Attack Path 1. An attacker creates or identifies an X/Twitter post containing markup-like content, or supplies a specially crafted post URL. 2. The victim asks the skill to send that post to Kindle. 3. The workflow retrieves attacker-influenced fields through `api.fxtwitter.com`. 4. The implementation interpolates the fields directly into the documented HTML template without encoding or sanitization. 5. The ...[truncated 834 chars]The workflow sends user-supplied X/Twitter content to a third-party API and then forwards the extracted content via SMTP email, but it does not disclose that user data and link metadata will be transmitted to external services. This creates a privacy and compliance risk because users may not realize their requested content is being processed by fxtwitter and their email provider before reaching Kindle.
This step causes external transmission of user-requested content to api.fxtwitter.com, a third-party service outside the agent's control. While the integration appears functional rather than overtly malicious, it still introduces privacy, availability, and trust risks because tweet identifiers, request metadata, and potentially user intent are disclosed to an external endpoint.
https://api.fxtwitter.com/status/<tweet_id>
twitter.com/*/status/<id> or x.com/*/status/<id>The skill explicitly instructs storing a Gmail App Password and Kindle email address in TOOLS.md, but provides no guidance that these are sensitive secrets requiring protected storage and restricted access. In an agent environment, documenting credentials in a broadly readable tool/config file can lead to credential exposure, unauthorized email sending, and account abuse.
The example operationalizes the same external transmission pattern by instructing the agent to fetch tweet content from api.fxtwitter.com and then email it onward. Even as an example, it reinforces a workflow that exports user-requested data to third parties without any privacy warning, making the risky behavior more likely to be implemented as-is.
User sends: `https://x.com/elonmusk/status/1234567890`
1. Fetch `https://api.fxtwitter.com/status/1234567890`
2. Extract author, text, timestamp
3. Send HTML email to Kindle address
4. Confirm: "Sent to Kindle 📚"
No suspicious patterns detected.