T01 · Skill Instruction Hijacking
- Location
scripts/fetch_emails.py:40- Finding
Untrusted Email Content Is Exposed Directly to an Action-Capable Agent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s Gmail and Calendar access matches its stated purpose, but it handles OAuth secrets and email-derived calendar writes too loosely for automatic installation.
Review before installing. Use only if you are comfortable giving the skill read access to recent Gmail and permission to manage Calendar events. Prefer a local OAuth flow that does not send client secrets or callback URLs through chat, protect or revoke token.json when needed, and require a user-visible review step before any calendar event is created from email content.
scripts/fetch_emails.py:40Untrusted Email Content Is Exposed Directly to an Action-Capable Agent
agent/instructions.md:48User-Controlled OAuth Callback Is Embedded in an Agent-Executed Command
scripts/setup_auth.py:45OAuth State Is Discarded and Callback Origin Is Not Validated
scripts/setup_auth.py:52OAuth Secrets and Refresh Tokens Are Stored and Transmitted Without Adequate Protection
scripts/create_event.py:10Documented Duplicate-Event Protection Is Not Implemented
The README instructs users to send the OAuth client credential JSON and the full redirected authorization URL back to the agent without any privacy or credential-handling warning. Those materials can expose OAuth client metadata and authorization data that could be mishandled, logged, or abused by the agent platform or intermediaries, giving sensitive access to Gmail and Calendar workflows.
The skill appears to request Gmail read and Calendar write scopes primarily to perform authentication setup, while not actually delivering the advertised email processing workflow in the described code path. Requesting broad OAuth scopes before demonstrating a legitimate need increases the risk of overprivileged access and token misuse if the skill is modified, compromised, or misunderstood.
The skill appears to request Gmail read and Calendar write scopes primarily to perform authentication setup, while not actually delivering the advertised email processing workflow in the described code path. Requesting broad OAuth scopes before demonstrating a legitimate need increases the risk of overprivileged access and token misuse if the skill is modified, compromised, or misunderstood.
The skill appears to request Gmail read and Calendar write scopes primarily to perform authentication setup, while not actually delivering the advertised email processing workflow in the described code path. Requesting broad OAuth scopes before demonstrating a legitimate need increases the risk of overprivileged access and token misuse if the skill is modified, compromised, or misunderstood.
The skill appears to request Gmail read and Calendar write scopes primarily to perform authentication setup, while not actually delivering the advertised email processing workflow in the described code path. Requesting broad OAuth scopes before demonstrating a legitimate need increases the risk of overprivileged access and token misuse if the skill is modified, compromised, or misunderstood.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
]
def find_credentials_file():
if os.path.exists('credentials.json'):
return 'credentials.json'
matches = glob.glob('client_secret_*.json')
if matches:
The README advertises automatic Google Calendar event creation based on detected meetings in Gmail, but it does not clearly warn users that the skill will modify calendar data on their behalf. In an agent setting, automatic write actions derived from email content can create unwanted or spoofed events, especially if email text is ambiguous or maliciously crafted.
The skill requests or implies capabilities involving file access, token handling, and networked Google API use, but does not declare an explicit tool scope such as permissions or allowed-tools. That makes the effective privilege boundary unclear to users and reviewers, increasing the chance of overbroad access and misuse of local files or network operations during execution.
The requirement for a persistent token.json implies session persistence of OAuth credentials on disk. Persistent tokens are sensitive because they can enable continued access to Gmail and Calendar if the host, skill directory, backups, or logs are exposed, and the skill metadata does not describe protections around storage, rotation, or revocation.
---
name: gmail-daily-briefing
description: Fetch Gmail emails from the last 24h, rank by importance, summarize into bullet points, and auto-create Google Calendar events for detected meetings.
metadata:
openclaw:
requires:
The setup instructs users to send an OAuth client secret JSON file to the agent, but provides no explicit warning about the sensitivity of that credential material or the risks of sharing it in chat. Even if intended for convenience, transmitting secrets through an agent channel can expose them to logging, retention, accidental disclosure, or reuse beyond the user's expectations.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Setup Before First Use
> **The agent must run all commands below itself. Do NOT ask the user to run them.**
Before running any script, ensure the Python environment is ready:
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Setup Before First Use
> **The agent must run all commands below itself. Do NOT ask the user to run them.**
Before running any script, ensure the Python environment is ready:
The instructions direct the agent to run a script that fetches emails from the last 24 hours and prints full content, but they do not require an explicit user-facing warning or confirmation before accessing and exposing potentially sensitive Gmail data. This creates a privacy and consent risk, especially if the skill is triggered broadly or by automation, because the agent may retrieve and display confidential message contents without a clear, informed opt-in at execution time.
The behavior section authorizes automatic calendar event creation when a meeting or interview is detected in email content, but it does not require a clear warning or confirmation from the user before making changes to Google Calendar. This is dangerous because email text can be ambiguous, maliciously crafted, or simply incorrect, leading to unwanted calendar modifications and downstream trust or scheduling issues.
When credentials are expired, the function refreshes them over the network and writes updated OAuth data back to token.json. Although the exceptions document initial setup, this specific runtime behavior has no confirmation prompt, logging, comment, or other user-facing disclosure in this file.
The code hard-codes all created calendar events to the 'Asia/Bangkok' timezone regardless of the user's actual locale, mailbox context, or the source email's timezone. In a skill that automatically detects meetings from Gmail and creates calendar entries, this can silently shift meetings to the wrong time, causing missed meetings, accidental no-shows, or scheduling confusion across participants.
The manifest describes a skill that fetches recent Gmail messages, ranks them by importance, summarizes them into bullet points, and auto-creates Google Calendar events for detected meetings. This file only retrieves emails, sorts them by date, and prints full message contents; there is no importance ranking, summarization, or calendar write behavior here.
The script retrieves full mailbox content from the last 24 hours and prints senders, subjects, dates, and bodies directly to stdout without any warning, consent checkpoint, or output minimization. In an agent or shared execution environment, stdout may be logged, exposed to other components, or surfaced to users unexpectedly, causing sensitive email data disclosure.
The capability list says the skill can create calendar events, but it does not prominently warn that this may happen automatically based on email content. That can cause user surprise and unintended modifications to a calendar, especially when meeting detection is imperfect or ambiguous.