Back to skill

Security audit

Recipe Draft Email From Doc

Security checks for vulnerabilities and agentic risk

Overview

This recipe can immediately send Google Doc contents by email even though it is framed as drafting, so users should review it before installing.

Install only if you are comfortable with this recipe sending selected Google Doc contents through your Gmail account. Before using it, manually verify the document, recipients, subject, and body, and prefer changing the final step to create a draft or ask for explicit confirmation before sending.

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:16
Finding

Draft Workflow Sends Google Doc Content Without a Draft or Confirmation Step

Content
View full analysis
**PREREQUISITE:** Load the following skills to execute this recipe: `gws-docs`, `gws-gmail` Read content from a Google Doc and use it as the body of a Gmail message. ## Steps 1. Get the document content: `gws docs documents get --params '{"documentId": "DOC_ID"}'` 2. Copy the text from the body content 3. Send the email: `gws gmail +send --to recipient@example.com --subject 'Newsletter Update' --body 'CONTENT_FROM_DOC'` ``` ### Technical Analysis The skill is presented as a workflow for drafting a Gmail message, but its final instruction invokes `gws gmail +send`. This operation sends the message immediately instead of creating a draft. The behavior therefore exceeds what the skill name and heading communicate to the user. There is also no preview, recipient validation, content review, or explicit confirmation step before the external side effect occurs. Because the email body is copied from a Google Doc, execution can disclose the document's contents immediately through the Gmail account authorized for the `gws` tool. ### Attack Path 1. A user invokes the skill expecting it to create a Gmail draft. 2. The agent retrieves the specified Google Doc through `gws docs documents get`. 3. The agent copies the document text into the email body. 4. The agent supplies a recipient and executes `gws gmail +send`. 5. The message and document contents are transmitted immediately, without creating a reviewable draft or obtaining final approval. This path may be triggered accidentally because of the misleading draft terminology. If untrusted input influences the recipient or document selection, it may also direct sensitive content to an unintended recipient. ### Impact Assessment The operation acts with ...[truncated 593 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly transfers content from a Google Doc into a Gmail message body without any warning, confirmation step, or guidance about handling sensitive document contents. This can lead to unintended exfiltration of private or confidential information if users apply the recipe to documents containing internal data, PII, or secrets.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.