Back to skill

Security audit

aaaaa

Security checks for vulnerabilities and agentic risk

Overview

This skill is a transparent Gmail reply assistant, but users should treat auto-send mode as sensitive and keep it tightly controlled.

Install only if you are comfortable giving an agent access to Gmail content and possible sending authority. Keep draft-only review as the default, use least-privilege Gmail scopes, restrict any auto-send rules to low-risk senders/labels/templates, and require human approval for sensitive, unusual, or instruction-like emails.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:22
Finding

Untrusted Email Content Can Influence Automatically Sent Replies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22 and 34–40
Vulnerability Type: Missing trust-boundary enforcement for attacker-controlled email content
Risk Level: Medium

Vulnerable Instructions:

markdown
- If the user provides an email thread or summary, use that as the incoming message to answer.
markdown
4. **Safety and approval**
   - By default, **output the draft** for the user/client to approve before sending.
   - Only auto-send if the user has clearly configured “auto-send” and you have applied the client’s rules and filters (e.g. only for certain labels or senders).

5. **Integrations**
   - If the user has configured Gmail API (OAuth2) or IMAP/SMTP, use the credentials from environment or secure config—never from this skill’s files.
   - When “sending,” either return the draft text for the user to paste/send, or call the configured send function if the user has set one up.

Technical Analysis

The skill directs the agent to use incoming email threads as response context and permits generated replies to be transmitted automatically through a configured Gmail API or IMAP/SMTP integration. Email bodies, quoted messages, signatures, and attachment text are attacker-controlled inputs, but the instructions do not establish a clear trust boundary requiring the agent to treat such content exclusively as data.

In particular, the skill does not instruct the agent to ignore prompt-like directives embedded in messages, distinguish sender content from trusted client rules, detect suspicious instructions, or require human review when an email contains attempts to control agent behavior. Sender and label filters alone do not address this risk because a permitted or compromised sender can still submit malicious content.

The default draft-approval workflow reduces exposure. However, once auto-send is configured, manipulated output can reach an external recipient without review.

...[truncated 1575 chars]

Remediation
View remediation

Remediation Suggestions

  1. Explicitly classify all email bodies, quoted threads, signatures, headers, links, and attachment text as untrusted data.
  2. Instruct the agent never to follow commands or policy changes contained in an email, even if they appear to be written by the client or another trusted party.
  3. Define a precedence rule under which system instructions, the skill policy, and authenticated client configuration always override message content.
  4. Require human approval when messages contain prompt-like directives, requests for secrets, financial or legal topics, external links, anomalous requests, or attempts to change reply behavior.
  5. Disable auto-send by default and constrain it to narrowly defined, low-risk templates and deterministic intents.
  6. Validate generated replies before sending, including checks for sensitive data, unexpected recipients, unsupported commitments, and deviations from the selected template.
  7. Apply recipient, sender, label, thread, topic, and rate restrictions at the integration layer rather than relying only on model instructions.
  8. Use least-privilege Gmail OAuth scopes and avoid granting mailbox-wide access when only draft creation or restricted sending is necessary.
  9. Maintain an audit log of the source message, selected rule or template, generated reply, validation result, and sending decision.
  10. Add adversarial tests using emails that contain embedded instructions to verify that such text is treated only as message content.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` – This file (skill instructions).

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to activate on common requests like 'reply to my emails' or 'answer my Gmail,' which can cause the agent to invoke a high-impact skill in situations where the user did not intend delegated email handling. Because this skill can act on behalf of a client and potentially send messages, mistaken invocation increases the risk of unauthorized drafting, privacy exposure, or accidental outbound communication.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly advertises automatically drafting and sending Gmail replies on behalf of a client, but it does not disclose any approval step, confirmation prompt, or safety guardrails. Auto-sending email as another party can cause unintended communications, reputational harm, disclosure of sensitive information, or abuse if rules/templates are misconfigured or manipulated.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.