Back to skill

Security audit

HML Google Slides

Security checks for vulnerabilities and agentic risk

Overview

This Google Slides helper is mostly purpose-focused, but it needs review because it handles Google OAuth tokens unsafely and asks for broader Google account access than Slides work requires.

Review before installing. Use only with an account you explicitly choose, avoid the documented broad re-auth command, and revoke/reissue any token if /tmp/gog_slides_token.json may already exist. The batch command can make broad or destructive changes to a presentation, and comment resolution writes to Drive comment threads.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/slides.py:21
Finding

OAuth Refresh Token Exported to a Predictable Persistent Temporary File

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:17
Finding

Authentication Instructions Request Unrelated Google Service Permissions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose focuses on creating, editing, reading, and exporting Slides, but the skill also includes comment listing and comment resolution/reply operations through Drive comment resources. This expands the effective access surface to collaboration metadata and communications that a user may not anticipate, increasing the risk of unauthorized data access or modification.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The script directly accesses stored OAuth client credentials and combines them with exported refresh-token material to obtain active Google API access. In a skill context, that means the code has credential-handling capability that could expose or misuse sensitive authentication artifacts if the host or surrounding workflow is compromised.

Content

Scanner excerpt · scripts/slides.py (reported line 21)May include surrounding context.

python
import subprocess
import argparse

GOG_CREDS = os.path.expanduser("~/.config/gogcli/credentials.json")
TOKEN_TMP = "/tmp/gog_slides_token.json"
ACCOUNT = os.environ.get("GOG_ACCOUNT", "david@hml.tech")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill exposes shell, environment, and network-capable behavior but does not declare any explicit tool scope or permission boundaries. That makes it easier for an agent or operator to invoke broader capabilities than users may reasonably expect, especially given the ability to authenticate, export files, and call local scripts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill hard-codes a specific email account identity, which can cause actions to run against an unintended account without user selection. In a multi-account or shared environment, this could lead to unauthorized access, data modification, or exports from the wrong user's Google workspace.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The re-auth instruction requests broad Google service access across gmail, calendar, drive, docs, sheets, contacts, tasks, and people, even though the skill is for Slides. Requesting unnecessary scopes without a clear warning increases blast radius if tokens are misused and may grant access to unrelated private account data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Guidance to set GOG_ACCOUNT to a specific identity creates persistent default-account behavior without user opt-in. That makes accidental use of the wrong account more likely across future commands, especially for read/write actions and token-backed API access.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/slides.py (reported line 6)May include surrounding context.

python
Google Slides API helper - uses gog's stored OAuth credentials.

Usage:
  python3 slides.py create "My Presentation"
  python3 slides.py info <presentationId>
  python3 slides.py add-slide <presentationId> --title "Slide Title" --body "Bullet 1\nBullet 2"
  python3 slides.py batch <presentationId> requests.json

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
from google.oauth2.credentials import Credentials
    from google.auth.transport.requests import Request
    
    result = subprocess.run(
        ["gog", "auth", "tokens", "export", ACCOUNT, "--out", TOKEN_TMP, "--overwrite"],
        capture_output=True, text=True
    )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exports OAuth token material to a predictable file in /tmp, which is an unsafe location for sensitive credentials on multi-user systems. Even if file permissions are usually restrictive, using a static world-discoverable path increases the chance of token exposure, race conditions, or accidental reuse by other processes.

Content

No source excerpt is available for this finding.

Tainted flow: 'ACCOUNT' from os.environ.get (line 23, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

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

python
from google.oauth2.credentials import Credentials
    from google.auth.transport.requests import Request
    
    result = subprocess.run(
        ["gog", "auth", "tokens", "export", ACCOUNT, "--out", TOKEN_TMP, "--overwrite"],
        capture_output=True, text=True
    )

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill claims to focus on Google Slides creation, editing, reading, and export, but it also exposes Drive comment listing and comment resolution capabilities. That mismatch expands the authority surface beyond the advertised scope, which can surprise calling agents and enable unintended access to discussion metadata and workflow actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The generic batch endpoint accepts arbitrary JSON requests and forwards them directly to the Slides API, allowing many more mutations than the narrower advertised operations like add/update slides. In an agent setting, this is dangerous because it creates an unbounded write primitive that can restructure, delete, or alter presentations in unexpected ways.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This function performs arbitrary JSON-driven write operations against a presentation without any guardrails, confirmation, or user-facing disclosure of the breadth of possible changes. In an agent-executed context, that raises the risk of silent destructive or policy-violating edits when untrusted input is mapped into the request file.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/slides.py (reported line 159)May include surrounding context.

python
def cmd_export(args):
    """Export presentation to PDF or PPTX using gog."""
    out = args.out or f"/tmp/{args.presentation_id}.{args.format}"
    result = subprocess.run(
        ["gog", "slides", "export", args.presentation_id,
         "--format", args.format, "--out", out],
        capture_output=True, text=True

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The markdown documents exporting presentations to /tmp/deck.pdf and /tmp/deck.pptx, which writes files to the local filesystem. The skill description does not include any warning that it will create or overwrite local output files or advise users to verify the destination path.

Content

No source excerpt is available for this finding.