Back to skill

Security audit

Agentmail To

Security checks for vulnerabilities and agentic risk

Overview

The skill is for email automation, but it publishes a live-looking API key and relies on unreviewed scripts outside the package.

Review before installing. The exposed AgentMail API key should be treated as compromised and rotated, and the package should replace it with environment-variable or secret-manager instructions. The referenced Python scripts should be included in the skill package or pinned by verified hashes before users run them. Use an isolated environment and avoid using this with sensitive email content until those issues are fixed.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
config.json:1
Finding
AgentMail API credential committed in plaintext<![CDATA[ ## Vulnerability Details **File Location**: `config.json:1`; duplicate disclosure in `SKILL.md:7-13` **Vulnerability Type**: Hardcoded secret and plaintext sensitive configuration **Risk Level**: High ### Vulnerable Code ```json {"email": "swaudiobrain@agentmail.to", "smtp_server": "email-smtp.eu-central-1.amazonaws.com", "smtp_port": 587, "username": "AKIA...", "password": "...", "api_key": "am_us_9c78f14e6adbd64bae61ad49513bd13d7e0c3b7ff9002a6b8651c58b386165fc"} ``` `SKILL.md:7-13` additionally identifies an absolute credential-file path and repeats the same AgentMail API key in an environment-variable example. ### Technical Analysis The project embeds a complete, active-looking AgentMail bearer token in distributable configuration and documentation. Anyone who can read the project can extract the credential without needing access to the referenced `.env.agentmail` file. Bearer tokens normally grant access based solely on possession. Embedding one in a Skill therefore transfers its associated permissions to every recipient of the package. The absolute secret path also reveals local workspace structure and encourages direct access to a user-specific credential file. This behavior contradicts the README's own recommendation to keep API keys in runtime environment variables. The SMTP username and password in `config.json` appear to be placeholders rather than confirmed credentials. The AgentMail API key, however, is fully populated and duplicated. ### Attack Path 1. An attacker obtains the Skill package, repository contents, build artifact, or a copy of the audit target. 2. The attacker reads `config.json` or `SKILL.md`. 3. The attacker extracts the hardcoded AgentMail bearer token. 4. The attacker submits the token in an `Authorization: Bearer` header to the AgentMail API. 5. Any operations permitted by the token can then be performed until the credential is revoked or expires. ### Impact Assessment The attacker may acquire the AgentMail per ...[truncated 436 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Revoke and rotate the exposed AgentMail key immediately; deletion from the current files alone is insufficient. 2. Remove the key from `config.json`, `SKILL.md`, version-control history, release artifacts, logs, and caches. 3. Accept credentials only through runtime secret injection, such as a protected environment variable or approved secret manager. 4. Replace committed configuration with a non-sensitive template such as: ```json { "email": "example@agentmail.to", "smtp_server": "email-smtp.eu-central-1.amazonaws.com", "smtp_port": 587 } ``` 5. Remove the user-specific absolute `.env.agentmail` path from the documentation. 6. Apply least-privilege API scopes, short expiration periods, and usage monitoring where supported. 7. Add automated secret scanning and pre-commit checks to prevent recurrence. ]]>

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:20
Finding
Skill delegates execution to mutable scripts outside the audited package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20-32` **Vulnerability Type**: Execution through unaudited external local tools **Risk Level**: High ### Vulnerable Code ```bash python3 /home/pit/.openclaw/workspace/scripts/swaudiobot_smart_reply.py --check-inbox ``` ```bash python3 /home/pit/.openclaw/workspace/scripts/swaudiobot_smart_reply.py --send-reply <inbox_id> <to> <subject> <text> ``` ```bash python3 /home/pit/.openclaw/workspace/scripts/create_clean_inbox.py ``` ### Technical Analysis The Skill instructs the Agent to execute Python scripts from an absolute path outside the audited project. None of the referenced scripts is present in the supplied package, so their implementation, integrity, ownership, and write permissions cannot be verified. The effective behavior of the Skill can consequently change without modifying any audited file. If another process or user can replace or edit one of these scripts, an apparently legitimate email-management command will execute the substituted Python code. This breaks review boundaries and grants external workspace content control over the Skill's runtime behavior. The external scripts are related to the declared email-management purpose, but unrestricted execution of mutable, unaudited files is not the minimum privilege necessary to implement that purpose. ### Attack Path 1. An attacker gains write access to `/home/pit/.openclaw/workspace/scripts/` or one referenced Python file. 2. The attacker modifies or replaces the expected script with malicious Python code. 3. A user or Agent invokes a documented Skill command. 4. `python3` executes the attacker-controlled file as the invoking operating-system user. 5. The malicious code can access the process environment and any files, credentials, or network resources available to that user. ### Impact Assessment Successful exploitation provides code execution with the privileges of the Agent or user invoking the command. Potential impact includ ...[truncated 324 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include all required scripts inside the Skill package so they are covered by review and distribution controls. 2. Resolve script locations relative to the verified Skill directory rather than a user-specific absolute path. 3. Ensure scripts and parent directories are owned by a trusted account and are not writable by untrusted users or processes. 4. Verify script integrity before execution using signed releases or cryptographic hashes. 5. Invoke Python in a restricted environment with only the minimum required filesystem, environment-variable, and network access. 6. Avoid passing sensitive message content on the command line because process listings and shell history may expose it. 7. Document each script's required permissions, permitted destinations, and expected side effects. 8. Refuse execution when the resolved script path is outside the trusted package root or fails integrity validation. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:24
Finding
Unpinned browser automation dependency and installer execution<![CDATA[ ## Vulnerability Details **File Location**: `README.md:24-25` **Vulnerability Type**: Unpinned third-party dependency and non-reproducible installation **Risk Level**: Medium ### Vulnerable Code ```bash uv pip install browser-use[cli] browser-use install ``` ### Technical Analysis The installation instructions retrieve the latest package version satisfying an unconstrained name and immediately execute its command-line installer. There is no exact version, hash verification, lockfile, controlled package index, or artifact signature documented in the project. As a result, the code installed and executed can differ from the version originally reviewed. A compromised upstream release, package-index account, or transitive dependency could introduce code that runs during installation or when `browser-use install` is invoked. Browser automation is optional to the documented AgentMail API workflow. Requiring this dependency for API-only use would unnecessarily increase supply-chain and runtime privileges. ### Attack Path 1. An upstream package release or transitive dependency is compromised, or a future release introduces unsafe behavior. 2. A user follows the README and installs the unconstrained latest dependency. 3. The package installation process places unreviewed code in the user's Python environment. 4. The user executes `browser-use install`. 5. Compromised package code runs with the invoking user's permissions and may access user-visible files, environment variables, or network resources. ### Impact Assessment Potential impact is code execution with the permissions of the user performing installation. This may expose credentials, alter the Python environment, modify user-accessible files, or initiate outbound network connections. The supplied project does not demonstrate that the named package is currently malicious. The confirmed issue is the absence of reproducible dependency controls and the execution of whatever version the package sour ...[truncated 35 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `browser-use` and all transitive dependencies to reviewed versions. 2. Use a lockfile and require cryptographic hashes for downloaded artifacts. 3. Install only from an explicitly configured, trusted package index. 4. Document the files, browsers, or other components retrieved by `browser-use install`. 5. Validate signatures or hashes for any secondary downloads performed by the installer. 6. Separate API-only and browser-automation installation profiles so users do not install browser tooling unnecessarily. 7. Run browser tooling in a sandbox or isolated virtual environment without unrelated secrets. 8. Establish a dependency-update review process with vulnerability and provenance scanning before changing pinned versions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (16)

Missing User Warnings

High
Confidence
98% confidence
Finding
The documentation exposes both a live-looking API key and a specific mailbox address without any warning about credential sensitivity, effectively publishing the means and target for email access. This materially increases the risk of unauthorized mailbox access, spoofed outbound email, privacy violations, and operational misuse.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The skill file directly discloses a live-looking AGENTMAIL_API_KEY, which is a sensitive secret granting email-management capability. Anyone with access to this documentation could reuse the credential to read mail, send messages, or manipulate inboxes, leading to account compromise and abuse of the associated service.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding
Suspicious Unicode normalization or mixed-script content

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The README presents all user-facing instructions in Russian and does not indicate any alternative language option or user choice. Under the policy criteria, forcing a specific language without opt-in is a natural-language locale policy violation.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
Создайте временный email:

```bash
curl -X POST https://api.agentmail.to/v1/emails \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
  -H "Content-Type: application/json"
```
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
}
    
    def create_email(self):
        response = requests.post(
            'https://api.agentmail.to/v1/emails',
            headers=self.headers
        )
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill advertises capabilities to send replies, create inboxes, and clear messages, but provides no warning about privacy, data handling, or destructive effects. In an email-management context, these actions can expose message content, send unauthorized communications, or delete records, making misuse more dangerous than in a non-communications skill.

Static analysis

Detected: suspicious.exposed_secret_literal, suspicious.generated_source_template_injection

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:12

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
README.md:213