T09 · Insecure Skill Coding Practices
- 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
