AgentMail Integration

PassAudited by VirusTotal on May 12, 2026.

Overview

Type: OpenClaw Skill Name: agentmail-integration Version: 1.1.0 The skill bundle provides legitimate email automation capabilities and notably includes extensive documentation (`SKILL.md`, `WEBHOOKS.md`) explicitly warning about prompt injection attacks and offering robust mitigation strategies. However, the `scripts/check_inbox.py` script and examples in `references/EXAMPLES.md` and `references/patterns.md` demonstrate the capability to download email attachments to an arbitrary local directory. While this is a core function for an email processing agent, the ability to write arbitrary files to the local filesystem from untrusted email sources, even without explicit execution logic in the provided scripts, represents a significant attack surface for potential supply chain or local execution vulnerabilities if the agent's environment is not rigorously secured. This capability, without clear malicious intent within the bundle itself, warrants a 'suspicious' classification.

Findings (0)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

ConcernHigh Confidence
ASI08: Cascading Failures
What this means

If you download attachments from an untrusted inbox, a crafted attachment filename could overwrite local files that the process can access.

Why it was flagged

Attachment filenames come from received email content. Without rejecting absolute paths, '..' segments, or overwrites, a malicious attachment name could write outside the chosen download directory.

Skill content
file_path = download_dir / att.filename
file_path.write_bytes(content)
Recommendation

Sanitize attachment filenames before writing, for example by using only Path(att.filename).name, rejecting absolute paths and '..', and avoiding overwrites unless the user confirms.

NoteHigh Confidence
ASI01: Agent Goal Hijack
What this means

Emails sent by outsiders could try to trick an automated agent into taking actions you did not intend.

Why it was flagged

Incoming emails are untrusted text that an agent might accidentally treat as instructions. The skill discloses this risk and provides mitigations.

Skill content
**⚠️ CRITICAL**: Webhooks expose a **prompt injection attack vector**. Anyone can send an email to your agent inbox with instructions like:
Recommendation

Use sender allowlists, content filtering, signature verification, and human approval before allowing email content to trigger actions.

What this means

Anyone or any process with this API key may be able to send mail or manage AgentMail inboxes according to the key's permissions.

Why it was flagged

The integration requires an AgentMail credential that can manage email resources. This is expected, but the registry metadata declares no required env vars or primary credential.

Skill content
**Generate API key** in the console dashboard
**Set environment variable**: `AGENTMAIL_API_KEY=your_key_here`
Recommendation

Use a least-privilege AgentMail key if available, store it only in trusted environments, and rotate it if exposed.

What this means

A future or unexpected package version could change behavior or break the helper scripts.

Why it was flagged

The skill relies on unpinned Python packages despite having no install spec. Installing the provider SDK is purpose-aligned, but users inherit normal package provenance and version risks.

Skill content
**Install Python SDK**: `pip install agentmail python-dotenv`
Recommendation

Pin package versions in your own environment and install from trusted package indexes.

What this means

If a webhook is pointed at the wrong endpoint, incoming email events could be delivered somewhere unintended.

Why it was flagged

The helper can register a URL to receive AgentMail events. This is core webhook functionality, but that endpoint may receive email-related data and must be trusted.

Skill content
webhook = client.webhooks.create(
            url=args.url,
            client_id=args.client_id,
            events=args.events
        )
Recommendation

Only register webhook URLs you control, verify AgentMail webhook signatures, and remove unused webhooks.