Back to skill

Security audit

OpenMail

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real email integration, but it needs review because its setup handles API credentials unsafely and installs an unpinned mail CLI.

Review this before installing. Use a narrowly scoped OpenMail API key, avoid sending sensitive data or attachments without explicit confirmation, protect or replace the plaintext env-file setup with safer secret storage and owner-only permissions, and prefer a pinned, reviewed CLI version. Only enable cron or autonomous replies with a clear sender allowlist and a way to stop them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/setup.md:16
Finding

Shell Injection and Plaintext API Key Exposure Through Environment File Handling

Content
View full analysis
" > ~/.openclaw/openmail.env source ~/.openclaw/openmail.env ``` ```bash printf 'OPENMAIL_INBOX_ID=%s\nOPENMAIL_ADDRESS=%s\n' \ "" "" >> ~/.openclaw/openmail.env source ~/.openclaw/openmail.env ``` ```bash 1. Check the key is present: `echo $OPENMAIL_API_KEY` 2. Confirm it starts with `om_live_` (production) or `om_test_` (test) 3. Direct the user to generate a fresh key at console.openmail.sh ``` ### Technical Analysis The setup instructions serialize the API key, inbox ID, and inbox address directly into a shell environment file without shell escaping. The file is subsequently loaded with `source`, which interprets its contents as shell syntax rather than inert configuration data. For example, a value containing command substitution could produce an environment file such as: ```bash OPENMAIL_API_KEY=$(attacker-controlled-command) ``` When the file is sourced, the shell executes the substituted command with the privileges of the user running the agent. The same issue applies to the inbox ID and address returned by the external service. Merely passing the value as a separate argument to `printf` does not make the resulting file safe to execute. The file contains a long-lived bearer credential in plaintext, but the instructions do not establish restrictive permissions such as mode `0600`. Its effective permissions therefore depend on the current process umask. In addition, the troubleshooting instruction prints the complete API key through `echo`, potentially exposing it in terminal capture, agent transcripts, CI logs, shell debugging output, or monitoring systems. ### Atta ...[truncated 1440 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:11
Finding

Unpinned npm CLI Dependency Creates a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 166)May include surrounding context.

Removal

bash
rm ~/.openclaw/openmail.env
unset OPENMAIL_API_KEY OPENMAIL_INBOX_ID OPENMAIL_ADDRESS

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 44)May include surrounding context.

Delete inbox

text
DELETE /inboxes/{id}

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description is broad enough to trigger whenever an agent needs to interact with any external service or human institution by email, which can cause unintended invocation in contexts involving sensitive data. Because this skill enables outbound communication to third parties, accidental activation raises the risk of unintended data disclosure or actions taken outside the user's expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill prominently advertises sending and receiving real external email but does not place an upfront warning near the core usage examples that outbound email may disclose user data, internal context, attachments, or identifiers to third parties. In an agent setting, this omission is dangerous because users may not realize that invoking the skill crosses a trust boundary and transmits information outside the local environment.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

Provisioning an additional inbox

bash
openmail inbox create --mailbox-name "support" --display-name "Support"

Live immediately. Use openmail inbox list to see all inboxes.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api.md (reported line 3)May include surrounding context.

OpenMail API Reference

Base URL: https://api.openmail.sh/v1

All requests require:

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api.md (reported line 202)May include surrounding context.

OpenMail API Reference

Base URL: https://api.openmail.sh/v1

All requests require:

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup flow explicitly asks the user for an API key and instructs storing it in a local plaintext env file without any warning about credential sensitivity, file permissions, or safer alternatives. This creates a real risk of accidental credential exposure through local file disclosure, backups, shell/session leakage, or reuse by other local processes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The instructions persist the API key in ~/.openclaw/openmail.env and source it into the current shell, extending the lifetime and exposure surface of the credential beyond the immediate setup step. Persisted shell environment secrets can be read by later commands, inherited by subprocesses, exposed in debugging output, or recovered from weakly protected local storage.

Content

Scanner excerpt · references/setup.md (reported line 15)May include surrounding context.

You can get one at https://console.openmail.sh — sign up for free, then copy your API key from the dashboard.

Wait for the user to provide the key. Once received, write it to the env file and source it into the current shell:

bash

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file documents use of an authorization bearer token and later shows a curl command that downloads an attachment to a local filename, but it does not include any warning about handling API credentials or writing potentially sensitive message content to disk. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that may affect privacy or user data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.