Back to skill

Security audit

nmail

Security checks for vulnerabilities and agentic risk

Overview

This is a real email CLI skill, but it handles mailbox credentials and live email actions with several under-scoped safety issues users should review before installing.

Install only if you are comfortable giving this tool an email app password that can read and send mail. Prefer a dedicated low-risk mailbox or app password, verify the exact repository/version before installing, avoid putting passwords directly in shell history, and do not use the provided system-event watch pipeline unless email metadata is treated as untrusted and actions require explicit user confirmation.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:112
Finding

Untrusted Email Metadata Is Forwarded into the Agent System-Event Channel

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:5
Finding

Installation Instructions Use a Mutable and Inconsistently Named Source

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
internal/config/config.go:38
Finding

Email App Passwords Are Exposed Through Command Arguments and Plaintext Configuration

Content
View full analysis
--password # Daum account nmail config add --provider daum --email --password ``` The command accepts the password as a Cobra flag: ```go provider, _ := cmd.Flags().GetString("provider") email, _ := cmd.Flags().GetString("email") password, _ := cmd.Flags().GetString("password") if email == "" { return fmt.Errorf("--email is required") } if password == "" { return fmt.Errorf("--password is required") } account := config.Account{ Email: email, Password: password, Provider: p, } ``` ```go configAddCmd.Flags().String("provider", "naver", "email provider (naver, daum, kakao, custom)") configAddCmd.Flags().String("email", "", "email address") configAddCmd.Flags().String("password", "", "app password") configAddCmd.MarkFlagRequired("email") configAddCmd.MarkFlagRequired("password") ``` The account structure serializes the password directly into YAML: ```go type Account struct { Name string `yaml:"name"` Email string `yaml:"email"` Password string `yaml:"password"` // app password (TODO: keychain) Provider Provider `yaml:"provider"` IMAPHost string `yaml:"imap_host"` IMAPPort int `yaml:"imap_port"` IMAPTLS bool `yaml:"imap_tls"` SMTPHost string `yaml:"smtp_host"` SMTPPort int `yaml:"smtp_port"` } ``` ```go func Save(cfg *Config) error { path := configPath() if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil { return fmt.Errorf("creating config dir: %w", err) } data, err := yaml.Marshal(cfg) if err != nil { return ...[truncated 2568 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (11)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · internal/config/config.go (reported line 44)May include surrounding context.

go
type Account struct {
	Name     string   `yaml:"name"`
	Email    string   `yaml:"email"`
	Password string   `yaml:"password"` // app password (TODO: keychain)
	Provider Provider `yaml:"provider"`
	IMAPHost string   `yaml:"imap_host"`
	IMAPPort int      `yaml:"imap_port"`

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

When account.IMAPTLS is false, the code uses imapclient.DialInsecure and then immediately performs LOGIN with the user's email and password. That exposes credentials and mailbox traffic to interception or manipulation by any network attacker on the path, which can lead to account compromise and unauthorized email access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The README states that the tool is for Korean email services and is 'Korean email first,' which signals a locale-specific constraint. The file does not offer a language/locale choice or explain that the restriction is a deliberate region-specific limitation, so it reads as a forced locale preference.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown instructs users to add an email account by passing an app password on the command line, which is a sensitive credential operation. The README provides setup steps but no warning about password exposure risks such as shell history, process listings, or how the credential is stored.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and description explicitly present the skill as a Korean email CLI skill and all user-facing instructions are in Korean, without offering any language choice or documenting that the locale restriction is required. This can violate language/locale policy when a skill forces a specific language absent user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This skill enables reading mailbox contents and sending outbound email, but it does not warn the user that using it may expose sensitive message data and trigger external communications on the user's behalf. In an agent setting, that omission increases the chance of unintended privacy loss, accidental disclosure of mailbox contents, or unauthorized-looking email actions without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The command collects an email password and persists the account object via config.Save without any visible warning that credentials will be stored in the local configuration file. This is dangerous because users may unknowingly place long-lived secrets on disk, where they can be exposed through weak file permissions, backups, sync tools, or accidental disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The command description explicitly brands the tool as a 'Korean email CLI' and 'CLI for Korean email services' without any indication of optional language or locale selection. This is a natural-language locale constraint that appears mandatory rather than user-chosen or clearly justified as a region-specific compliance requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Account struct explicitly stores the email password in configuration and the Save function serializes the entire config to ~/.nmail/config.yaml. Although the file is written with 0600 permissions, plaintext local storage of credentials increases exposure through local compromise, backups, syncing tools, accidental disclosure, and other software reading the file; there is also no user-facing warning or safer secret-storage mechanism.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The skill description includes commands for reading, searching, watching, and sending email, all of which involve transmitting or retrieving user message data over external email services. The README does not include any warning that these actions access live mailbox contents and may expose sensitive data to remote providers or logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code connects to an IMAP server and sends search parameters including sender, subject, text, and date filters as part of a remote search request. While network access is expected for a mail search command, this file contains no confirmation prompt, comment, docstring, or user-facing notice indicating that query contents are transmitted to the configured mail account server.

Content

No source excerpt is available for this finding.