T09 · Insecure Skill Coding Practices
- Location
SKILL.md:100- Finding
Plaintext SMTP Credentials in the Recommended Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 100-101
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: HighVulnerable Code
json "username": "your-email@gmail.com", "password": "your-app-password",Technical Analysis
The documented setup instructs users to place an SMTP username and application password directly in
email_config.json. Although the document later acknowledges that plaintext configuration files are risky, it does not require restrictive file permissions, exclusion from version control, secure deletion, or integration with a dedicated secret-management system.An SMTP application password is an authentication secret. If the working directory is readable by other users or processes, included in a backup, shared with an AI Agent, or accidentally committed to source control, the credential can be recovered without defeating encryption or authentication controls.
The alternative environment-variable example reduces the likelihood of a repository commit but does not fully resolve the issue. Environment variables may still be exposed through process inspection, diagnostic output, shell history, crash reports, or inherited child processes.
Attack Path
- A user follows the documented setup and creates
email_config.jsonin the project working directory. - The user replaces the placeholder with a valid SMTP application password.
- The file remains accessible through repository commits, backups, workspace sharing, Agent file access, or another local process.
- An attacker obtains the username and application password.
- The attacker authenticates directly to the configured SMTP provider.
- The compromised account is used to send unauthorized email, impersonate the sender, distribute phishing messages, or consume the provider's sending quota.
Impact Assessment
Exploitation grants the attacker the email-sending privileges associated ...[truncated 442 chars]
- A user follows the documented setup and creates
- Remediation
View remediation
Remediation Suggestions
- Make an operating-system credential store or managed secret service, such as Vault or a cloud secret manager, the default authentication mechanism.
- If a configuration file is unavoidable, store only a secret reference in the project and keep the credential in a separate protected location.
- Require owner-only permissions on secret files, such as mode
0600on Unix-like systems, and document equivalent Windows ACL restrictions. - Add
email_config.jsonand related credential files to.gitignore. - Provide a sanitized
email_config.example.jsoncontaining placeholders only. - Prohibit credentials from appearing in logs, exception messages, command output, or structured delivery results.
- Avoid interactive export commands that can enter shell history; document secure environment injection by the process supervisor instead.
- Use narrowly scoped, revocable application credentials and document immediate rotation following suspected exposure.
- Add startup checks that reject secret files with unsafe permissions where the operating system supports such validation.
