Back to skill

Security audit

Gmail Daily Briefing

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (5)

T01 · Skill Instruction Hijacking

Error
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

T09 · Insecure Skill Coding Practices

Error
Location
agent/instructions.md:48
Finding

User-Controlled OAuth Callback Is Embedded in an Agent-Executed Command

Content
View full analysis
"` 6. Confirm to the user: "Auth complete. I can now access your Gmail and Google Calendar." ``` ### Technical Analysis The callback URL originates from chat and must therefore be treated as untrusted input. The instructions direct the agent to interpolate that value into a textual command. If the agent executes the resulting string through a command shell, shell metacharacters or embedded quotation marks in a malicious callback may terminate the intended argument and introduce additional commands. The Python script's use of `argparse` does not mitigate injection that occurs before Python starts. Safety depends on whether the agent's command tool passes a structured argument array directly to the process or invokes a shell. The Skill does not mandate the safe form, validate the callback before execution, or provide a non-command-line channel. OAuth authorization codes in process arguments can also be exposed through agent logs, command histories, or local process inspection while the command is running. ### Attack Path 1. A malicious or compromised chat participant supplies a callback-like value containing a quotation mark and shell syntax. 2. The agent follows the Skill instructions and substitutes the entire value into the documented command. 3. A shell-based command executor parses the injected metacharacters rather than treating them solely as callback data. 4. The injected command runs with the same operating-system privileges as the agent. 5. The command can inspect the workspace, including `token.json`, client credentials, and other files accessible to that account ...[truncated 529 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup_auth.py:45
Finding

OAuth State Is Discarded and Callback Origin Is Not Validated

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup_auth.py:52
Finding

OAuth Secrets and Refresh Tokens Are Stored and Transmitted Without Adequate Protection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create_event.py:10
Finding

Documented Duplicate-Event Protection Is Not Implemented

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 12)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 13)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/auth.py (reported line 18)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_auth.py (reported line 29)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_auth.py (reported line 30)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/setup_auth.py (reported line 35)May include surrounding context.

python
]

def find_credentials_file():
    if os.path.exists('credentials.json'):
        return 'credentials.json'
    matches = glob.glob('client_secret_*.json')
    if matches:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
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:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

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.

Content

Scanner excerpt · agent/instructions.md (reported line 5)May include surrounding context.

md
## 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:

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

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.

Content

Scanner excerpt · agent/instructions.md (reported line 19)May include surrounding context.

md
## 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:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.