T09 · Insecure Skill Coding Practices
- Location
scripts/imap_scan.py:167- Finding
Mailbox Credentials Exposed Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate email-audit purpose, but it handles mailbox credentials and scan results in ways users should review carefully before installing.
Install only if you are comfortable granting access to email account history. Prefer OAuth or app-specific passwords, avoid regular mailbox passwords, do not run plaintext IMAP except to a trusted local Proton Bridge, and delete any generated JSON results after use because they can reveal a map of your online accounts.
scripts/imap_scan.py:167Mailbox Credentials Exposed Through Command-Line Arguments
scripts/imap_scan.py:121Plaintext IMAP Authentication Allowed for Arbitrary Remote Hosts
scripts/imap_scan.py:228Sensitive Mailbox-Derived Results Written Without Enforced Protection or Cleanup
The introductory description emphasizes convenience and outcomes but does not prominently warn that the skill will access and scan the user's email account contents. Because email inboxes contain highly sensitive personal and account data, insufficient disclosure can undermine informed consent and cause users to authorize broader access than they expected.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
https://github.com/fatihbtw/email-registration-scanner
mkdir -p ~/.openclaw/skills/email-registration-scanner cp -r . ~/.openclaw/skills/email-registration-scanner
The invocation phrases are broad and include natural-language requests like 'Where am I registered?' and 'Scan my emails for registrations,' which could be triggered during ordinary conversation. In the context of a skill that accesses mailbox contents, accidental invocation can lead to unintended scanning of sensitive email data and privacy exposure.
The skill instructs the agent to use network access and write temporary files, but it does not declare any explicit tool scope or allowed-tools restrictions. For a skill that handles mailbox credentials and scans large volumes of sensitive email metadata, missing scope boundaries increases the chance of over-privileged execution, unintended tool use, or unsafe file/network operations beyond what the user expects.
The trigger phrases are broad enough to match common account-management requests like 'show me all my accounts,' which could invoke a full mailbox scan when the user may have intended something narrower. Because this skill can access highly sensitive historical registration data across multiple providers, over-triggering creates a meaningful privacy and consent risk.
The skill scans entire mailboxes for historical registrations, which can reveal a detailed inventory of the user's online accounts and associated timelines, but the description does not prominently warn about that privacy impact up front. In this context, insufficient disclosure undermines informed consent and makes it easier for users to authorize a highly sensitive scan without understanding the breadth of exposure.
The script accepts raw mailbox credentials as command-line arguments and immediately uses them for IMAP authentication, but provides no explicit warning or safer handling path for these sensitive secrets. Command-line passwords can be exposed via shell history, process listings, logs, or orchestration layers, making this especially risky for a skill designed to access an entire email account.
The script writes a detailed inventory of the user's registrations, including sender addresses, subjects, and dates, to a local JSON file without any explicit consent prompt, warning, or retention guidance. In the context of a mailbox-registration scanner, this output is highly privacy-sensitive because it reveals a broad map of the user's online accounts and could be exposed through insecure temp paths, shared systems, or later collection by other components.
The description states the skill scans email accounts for registration, welcome, and confirmation emails to build a historical list of all services a user has signed up for, but it does not document any trigger boundaries, mailbox scope limits, or explicit user-consent constraints. Because email history is highly sensitive, broad activation language can cause over-collection or unexpected invocation beyond what a user reasonably intended.
This reference mixes English instructions with provider-specific German phrases such as "POP3/IMAP abrufen," which can impose a language/locale assumption on users. Because the file does not state that these steps are specific to German-localized interfaces or provide alternative locale guidance, it may violate the language/locale policy criterion.
Line L003 instructs users to run query batches for different languages as a fixed sequence, and the remainder of the file defines a predetermined set of supported locales. Because the file does not explain that these are optional examples or provide a way to choose/add locales, it embeds a locale policy that may exclude other languages without user opt-in.
The description promises comprehensive scanning of a user's email history to reconstruct registrations across services, which creates a privacy risk because it implies large-scale review of sensitive personal communications without any visible limitation or opt-in wording. In this skill context, the data being inferred can reveal the user's accounts, habits, health, finances, and other sensitive affiliations, making the lack of scope and consent language more dangerous.