Raw email insertion can enable shell command injection
Source references: 2The write command places `[EMAIL BODY]` inside shell single quotes. An external sender controls that body; a quote can terminate the argument and allow following shell syntax to be interpreted as commands.
If an agent substitutes the raw body into this command and runs it through a shell, a malicious email could execute local commands with the agent's access, potentially reading or changing accessible data.
The recipe retrieves message content and then places the body inside a single-quoted shell argument. If an agent directly substitutes the real body, an apostrophe in sender-controlled text could close the argument and allow following shell syntax to run, affecting the user's files, credentials, or accounts. No escaping or file/stdin-based transfer is specified. This supports an exploitable command-construction risk, not proof that any email caused execution. Users can ask the author to pass the body without shell interpolation.
1. Find the message: `gws gmail users messages list --params '{"userId": "me", "q": "subject:important from:boss@company.com"}' --format table`2. Get message content: `gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}'`3. Create a doc with the content: `gws docs documents create --json '{"title": "Saved Email - Important Update"}'`4. Write the email body: `gws docs +write --document-id DOC_ID --text 'From: boss@company.comSubject: Important Update[EMAIL BODY]'`Show 1 other places
3. Create a doc with the content: `gws docs documents create --json '{"title": "Saved Email - Important Update"}'`4. Write the email body: `gws docs +write --document-id DOC_ID --text 'From: boss@company.comSubject: Important Update[EMAIL BODY]'`