Back to skill

Security audit

imapflow

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent documentation for IMAP email integration, but it needs Review because it covers broad mailbox reading, monitoring, and irreversible mailbox changes without strong scoping or confirmation guidance.

Install only if you intend to use an agent for IMAP email development. Treat all mailbox reads, IDLE monitoring, delete/expunge, move/rename, and flag changes as sensitive actions requiring explicit user confirmation, and store OAuth tokens or app passwords in a proper secrets mechanism rather than hardcoding them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

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 · references/connection.md (reported line 12)May include surrounding context.

secure: true, auth: { user: 'user@gmail.com', accessToken: 'ya29.xxxx' // OAuth2 access token } });

text

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 · references/connection.md (reported line 215)May include surrounding context.

secure: true, auth: { user: 'user@gmail.com', accessToken: 'ya29.xxxx' // OAuth2 access token } });

text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger scene is broad enough to activate for many generic email-related tasks, including high-risk automation around reading, monitoring, and modifying mailbox content. In an agent setting, overly broad invocation criteria can cause the skill to be selected in contexts the user did not explicitly intend, increasing the chance of unauthorized email access or actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation includes destructive operations such as mailbox deletion, message deletion, expunge, move, and rename without prominent warnings, confirmation guidance, or recovery caveats. In an agent-integrated skill, this can normalize irreversible actions and make it easier for an agent or developer to invoke destructive mailbox changes without realizing the consequences.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file describes irreversible or potentially destructive operations such as deleting messages, expunging messages, and deleting mailboxes, but it does not include any warning about data loss or the need for user confirmation. Under the markdown-specific SQP-2 criteria, skill documentation should disclose behaviors that could affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains multiple connection examples showing pass and accessToken fields for authenticating to external mail providers. While the file explains protocol details, it does not explicitly warn readers not to hardcode or expose real credentials, even though these examples involve sensitive secrets and network connections to third-party services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file includes an example that calls messageFlagsAdd(..., ['\\Seen'], ...), which marks messages as read and alters user mailbox state. The surrounding documentation does not warn the user that this example is state-changing, which could surprise someone expecting search-related examples to be read-only.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.