T09 · Insecure Skill Coding Practices
- Location
SKILL.md:107- Finding
Plaintext Storage of SMTP Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 107–122
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code
markdown ## Environment Preparation Create `email_config.json`: ```json { "smtp_server": "smtp.gmail.com", "smtp_port": 587, "username": "your-email@gmail.com", "password": "your-app-password", "sender_name": "Personal Assistant", "use_tls": true }Gmail users must enable 2FA and generate a 16-character application-specific password from the "App Passwords" page, then enter it in the
passwordfield.text ### Technical Analysis The skill directs users to place an SMTP application password in a predictable plaintext JSON file. It does not require restrictive file permissions, exclusion from version control, encryption at rest, or integration with an operating-system or cloud secret manager. Consequently, any local process, AI Agent operation, backup service, repository collaborator, or other principal capable of reading the project directory may obtain the SMTP credential. The risk is increased by the documentation's statement that credentials are supported only through a configuration file rather than through environment variables or secret-management services. The package contains only `SKILL.md`; the referenced `email_sender.py` implementation is absent. Credential redaction, file-permission enforcement, and secure runtime handling therefore cannot be verified. ### Attack Path 1. A user follows the documented setup and creates `email_config.json`. 2. The user stores a valid SMTP application password in the plaintext `password` field. 3. The file remains accessible through permissive local permissions, an AI Agent read operation, a backup, or an accidental source-control commit. 4. An unauthorized party retrieves the username and application password. 5. The party authenticates ...[truncated 679 chars]- Remediation
View remediation
Remediation Suggestions
- Load SMTP credentials from environment variables or a dedicated operating-system or cloud secret manager instead of storing them directly in project configuration.
- If file-based credentials must remain supported, store them outside the project tree and require owner-only permissions such as mode
0600on Unix-like systems. - Add
email_config.jsonto.gitignoreand distribute only a sanitized template such asemail_config.example.json. - Ensure the eventual sender implementation never logs, returns, or includes SMTP passwords in exceptions or Agent responses.
- Validate file ownership and permissions before reading credentials, and fail securely when the file is accessible to unintended users.
- Document immediate credential revocation and rotation procedures for suspected exposure.
- Prefer short-lived credentials or delegated authorization where supported by the SMTP provider.
