Skip to content
Report library
Purpose / Other

Recipe Save Email To Doc Skill Security Audit

What the author says it does (original text)

Save a Gmail message body into a Google Doc for archival or reference.

Independent security check

Do not install or run it yet

Files checked
1
Risks found
3
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 1
High risk

Raw email insertion can enable shell command injection

Source references: 2
What we found

The 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.

Why this matters

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.

SKILL.md:26In the instructionsOpen original file
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
SKILL.md:28In the instructionsOpen original file
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]'`
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 1
Medium risk

Fixed search criteria and no preview can copy the wrong or sensitive message

Source references: 3
What we found

The steps directly search for `subject:important from:boss@company.com`, then retrieve a message by ID and copy its full body. They do not require confirmation of the match, destination Google account, document location, or content scope.

Why this matters

If multiple messages match, the wrong ID is chosen, or the example query is not adapted to the user's intent, a private or confidential message may be persistently duplicated into an unintended Google document.

What this evidence establishes

The query and title appear to be recipe examples rather than necessarily real values. Step 1 lists matches in a table, and the later `MSG_ID` still requires selection, providing an opportunity to inspect results. However, the recipe does not explicitly require confirmation of the chosen message, account, or body scope. If an agent automatically selects the wrong match, it could copy an unintended full email into a new document. The source does not show result count, selection behavior, or the user's authorization scope, so the risk remains uncertain. Users can require confirmation of the message ID and content scope first.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
SKILL.md:25In the instructionsOpen original file
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.com
Show 2 other places
SKILL.md:28In the instructionsOpen original file
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]'`
SKILL.md:26In the instructionsOpen original file
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.com
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.No risks found
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.Risks found: 1
Medium risk

External email content is not explicitly isolated as untrusted data

Source references: 2
What we found

The workflow has the agent retrieve and process the complete message but never instructs it to ignore commands, links, or text posing as system instructions inside that message.

Why this matters

A malicious sender could use prompt injection to divert the agent from archiving, such as invoking additional tools, reading other messages, or writing information somewhere unintended.

What this evidence establishes

The visible steps read external email content, but direct the agent only to write it as text into a document; they do not instruct it to run commands, open links, or obey instructions found in the body. Thus, the missing warning alone does not establish that prompt injection would succeed. The risk depends on whether the executing agent interprets retrieved content as instructions, which the source does not specify. Users can ask the author to explicitly treat email bodies as data and forbid acting on embedded instructions or links.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
SKILL.md:26In the instructionsOpen original file
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"}'`
Show 1 other places
SKILL.md:28In the instructionsOpen original file
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]'`
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.No risks found

Inside this skill

1 instruction sections

The Skill reads Gmail message content, creates a Google document, and writes the sender, subject, and full body into it, creating a second copy of the message in Google Docs.

View source
SKILL.md:26In the instructionsOpen original file
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]'`

The workflow depends on the `gws` tool and companion skills with access to Gmail and Google Docs.

View source
SKILL.md:9In the instructionsOpen original file
    domain: "productivity"    requires:      bins:        - gws      skills:        - gws-gmail        - gws-docs---
SKILL.md:19In the instructionsOpen original file
> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-gmail`, `gws-docs`
Start here · InstructionsSKILL.md
recipe-save-email-to-doc
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source.
Files and check records1 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions
Lines read
33
File checksum (to compare versions)
ae26ee8a142ae1ec65d91444682ac39885eb31027402609d8203e08baddc1484