T09 · Insecure Skill Coding Practices
- Location
SKILL.md:48- Finding
Plaintext SMTP Credential Persistence and Duplication
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:48-54; related credential duplication instructions appear atSKILL.md:91-93andSKILL.md:109-113
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code Snippet
json { "smtp_server": "smtp.163.com", "smtp_port": 465, "sender": "your_email@163.com", "password": "your_email_password", "attachment_path": "path/to/your/resume.pdf" }The Skill additionally instructs the agent to inherit the SMTP server, port, sender, password, and attachment path from the user configuration into each per-application email configuration. The corresponding per-application example also includes the plaintext password:
json { "receiver": "recruiter@company.com", "subject": "XXX-University-Senior", "body": "Hello, I am XXX. Please find my resume attached. Thank you.", "smtp_server": "smtp.163.com", "smtp_port": 465, "sender": "your_email@163.com", "password": "your_email_password", "attachment_path": "path/to/your/resume.pdf", "attachment_name": "XXX-University-Senior" }Technical Analysis
The workflow requires the user's SMTP authorization code to be written as plaintext into
user.json. It then directs the agent to copy that credential into every job-specific JSON file under./log/YYYY-MM-DD/.This violates secret-management and data-minimization principles. Instead of limiting the authorization code to the SMTP authentication operation, the design creates multiple persistent copies alongside personal information and recruitment records. The project provides no requirement for restrictive file permissions, encryption, operating-system credential storage, automatic deletion, log redaction, or source-control exclusions.
Although
scripts/send_email.pyusesSMTP_SSL, which protects the credential while it is transmitted to the SMTP ser ...[truncated 1578 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the
passwordfield fromuser.json, job-specific configuration files, examples, and generated logs. - Retrieve the SMTP authorization code only at execution time from one of the following:
- An operating-system credential manager.
- A dedicated secret-management service.
- A protected environment variable.
- A non-echoing interactive prompt.
- Pass the secret to the SMTP client in memory and avoid writing it to disk or displaying it in command output.
- Keep job-specific configuration files limited to non-secret fields such as the recipient, subject, body, attachment path, and attachment display name.
- Add
user.json,log/, and other generated credential-bearing files to source-control ignore rules as defense in depth. - Create generated files with owner-only permissions where supported, such as mode
0600on POSIX systems. - Define a retention policy and automatically delete obsolete application configurations.
- Scan existing project copies, repositories, backups, and synchronized folders for previously generated credentials.
- Revoke and rotate any SMTP authorization code that may already have been persisted or exposed.
- Ensure error messages and diagnostic logging never print SMTP authorization codes or complete configuration objects.
- Remove the
