gmail
Warn
Audited by Gen Agent Trust Hub on Sep 18, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFE
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/gmail_search.pyutilizes thepicklemodule to load cached authentication tokens from the local file system. - Evidence: The
get_credentials()function inscripts/gmail_search.pycallspickle.load(token)to read~/.gmail_credentials/token.pickle. - Risk: Data deserialization using
pickleis inherently unsafe and can lead to arbitrary code execution if the data source (in this case, the local token file) is tampered with by a malicious actor. - [INDIRECT_PROMPT_INJECTION]: The skill fetches untrusted data from external sources (Gmail messages) and presents it to the agent, creating a surface for prompt injection.
- Ingestion points: Untrusted email snippets and full message bodies are retrieved via the Gmail API in
get_message_detailsandsearch_messages(both inscripts/gmail_search.py). - Boundary markers: While the
format_markdownfunction uses Markdown headers and blockquotes, it lacks robust delimiters or explicit instructions to prevent the agent from following commands embedded within email text. - Capability inventory: The skill has the ability to read all emails, download attachments to the local filesystem, and potentially modify or delete messages depending on the configured OAuth scope.
- Sanitization: No content filtering or instruction-stripping is performed on the email data before it is returned to the agent context.
- [CREDENTIALS_UNSAFE]: The skill requires the user to store sensitive OAuth credentials in a predictable local directory.
- Evidence: The script explicitly manages and reads from
~/.gmail_credentials/credentials.jsonand~/.gmail_credentials/token.pickleto perform operations. - Context: While this is a standard implementation for desktop-style OAuth flows, these files contain highly sensitive secrets (Client ID, Client Secret, and Refresh Tokens) that grant access to the user's Gmail account.
Audit Metadata