๐Ÿ›ก๏ธ SafeAgentSkills

Gmail Cleaner

ยท v1.0.0

High Risk

Clean and organize Gmail accounts in bulk. Use when asked to clean Gmail, remove spam, trash newsletters/promotional emails, bulk-delete emails by sender, create labels, set up auto-filters, or restore emails from trash. Handles single or multiple Gmail accounts via OAuth token files. Works with any Gmail account using the Gmail API.

H:4 D:4 A:0 C:1

โš ๏ธ Hazard Flags

EXEC FS_READ_WORKSPACE NET_EGRESS_ANY PI_WEB

๐Ÿ“‹ Capabilities

Execution

  • โœ… Shell execution
  • โŒ Code execution
  • โŒ Install dependencies
  • โŒ Persistence
  • Privilege: user

Filesystem

  • โœ… Read workspace
  • โŒ Write workspace
  • โŒ Read home
  • โŒ Write home
  • โŒ Read system
  • โŒ Delete

Network

  • Egress: any
  • โŒ Ingress

Credentials

  • โŒ Environment vars
  • โŒ Credential files
  • โŒ Browser data
  • โŒ Keychain

Actions

โŒ send messagesโŒ post publicโŒ purchaseโŒ transfer moneyโŒ deployโŒ delete external

๐Ÿ”’ Containment

Level: maximum

Required:
  • SANDBOX_CONTAINER: Code execution capability
Recommended:
  • LOG_ACTIONS: Audit trail for all actions

โšก Risks

Resource abuse detected: RESOURCE_ABUSE_INFINITE_LOOP high

Mitigation: Add proper exit conditions or limits to loops

Command injection risk: COMMAND_INJECTION_OS_SYSTEM, COMMAND_INJECTION_SHELL_TRUE, MCP_SQL_BLIND critical

Mitigation: Use subprocess with argument lists, not shell strings

Social engineering indicators: SOCIAL_ENG_VAGUE_DESCRIPTION low

Mitigation: Provide clear, detailed description of skill functionality

Data exfiltration patterns: INSTRUCTED_SENSITIVE_SERVICE_ACCESS high

Mitigation: Clearly document which sensitive services are accessed and why; use minimal required permissions

Want a deeper analysis?

This report was generated by static analysis. Get an LLM-powered deep review with behavioral reasoning and attack surface mapping.

๐Ÿง  Deep Analysis โ€” $5.00

๐Ÿšจ Incident Response

Kill switch: Stop the agent process

Containment: Review logs for unexpected actions

Recovery: Depends on skill capabilities

๐Ÿ“„ Raw SSDS JSON click to expand
{
  "meta": {
    "document_id": "ssds:auto:gmail-cleaner:1.0.0",
    "ssds_version": "0.2.0",
    "scanner_version": "0.4.0+fe6fd9123d50",
    "created_at": "2026-03-05T15:33:10.886Z",
    "created_by": {
      "agent": "safeagentskills-cli/generate-ssds"
    },
    "language": "en",
    "notes": "Auto-generated SSDS. Manual review recommended."
  },
  "skill": {
    "name": "Gmail Cleaner",
    "version": "1.0.0",
    "format": "agent_skill",
    "description": "Clean and organize Gmail accounts in bulk. Use when asked to clean Gmail, remove spam, trash newsletters/promotional emails, bulk-delete emails by sender, create labels, set up auto-filters, or restore emails from trash. Handles single or multiple Gmail accounts via OAuth token files. Works with any Gmail account using the Gmail API.",
    "publisher": "unknown",
    "source": {
      "channel": "local"
    },
    "artifact": {
      "sha256": "d8478c3ce732a0af3a81515340853e2fb66bad2caa2cfe59da5cfbfba6459a8a",
      "hash_method": "files_sorted"
    }
  },
  "capabilities": {
    "execution": {
      "can_exec_shell": true,
      "can_exec_code": false,
      "privilege_level": "user",
      "can_install_deps": false,
      "can_persist": false
    },
    "filesystem": {
      "reads_workspace": true,
      "reads_user_home": false,
      "reads_system": false,
      "writes_workspace": false,
      "writes_user_home": false,
      "writes_system": false,
      "can_delete": false
    },
    "network": {
      "egress": "any",
      "ingress": false
    },
    "credentials": {
      "reads_env_vars": false,
      "reads_credential_files": false,
      "reads_browser_data": false,
      "reads_keychain": false
    },
    "services": [],
    "actions": {
      "can_send_messages": false,
      "can_post_public": false,
      "can_purchase": false,
      "can_transfer_money": false,
      "can_deploy": false,
      "can_delete_external": false
    },
    "prompt_injection_surfaces": [
      "web"
    ],
    "content_types": [
      "general"
    ]
  },
  "hazards": {
    "hdac": {
      "H": 4,
      "D": 4,
      "A": 0,
      "C": 1
    },
    "flags": [
      "EXEC",
      "FS_READ_WORKSPACE",
      "NET_EGRESS_ANY",
      "PI_WEB"
    ],
    "custom_flags": [
      {
        "code": "RESOURCE_ABUSE",
        "name": "Resource Abuse Risk",
        "description": "RESOURCE_ABUSE_INFINITE_LOOP detected: Infinite loop without clear exit condition"
      },
      {
        "code": "SOCIAL_ENGINEERING",
        "name": "Social Engineering Risk",
        "description": "SOCIAL_ENG_VAGUE_DESCRIPTION: Skill description is too vague or missing"
      },
      {
        "code": "COMMAND_INJECTION",
        "name": "Command Injection Risk",
        "description": "COMMAND_INJECTION_OS_SYSTEM, COMMAND_INJECTION_SHELL_TRUE, MCP_SQL_BLIND: Shell command execution with string formatting (potential injection)"
      },
      {
        "code": "DATA_EXFILTRATION",
        "name": "Data Exfiltration Risk",
        "description": "INSTRUCTED_SENSITIVE_SERVICE_ACCESS: Instructs agent to access sensitive services (email, calendar, contacts, drive)"
      }
    ],
    "confidence": {
      "level": "medium",
      "basis": [
        "static_analysis"
      ],
      "notes": "Detected 4 security patterns (18 vendored rule hits). Review recommended."
    },
    "rationale": {
      "H": "H4: Critical: Privilege escalation or malware detected",
      "D": "D4: Critical: Credential theft or data exfiltration",
      "A": "A0: No side effects detected",
      "C": "C1: General content"
    }
  },
  "containment": {
    "level": "maximum",
    "required": [
      {
        "control": "SANDBOX_CONTAINER",
        "reason": "Code execution capability"
      }
    ],
    "recommended": [
      {
        "control": "LOG_ACTIONS",
        "reason": "Audit trail for all actions"
      }
    ],
    "uncontained_risk": "Risk level depends on manual review of actual capabilities."
  },
  "risks": {
    "risks": [
      {
        "risk": "Resource abuse detected: RESOURCE_ABUSE_INFINITE_LOOP",
        "severity": "high",
        "mitigation": "Add proper exit conditions or limits to loops"
      },
      {
        "risk": "Command injection risk: COMMAND_INJECTION_OS_SYSTEM, COMMAND_INJECTION_SHELL_TRUE, MCP_SQL_BLIND",
        "severity": "critical",
        "mitigation": "Use subprocess with argument lists, not shell strings"
      },
      {
        "risk": "Social engineering indicators: SOCIAL_ENG_VAGUE_DESCRIPTION",
        "severity": "low",
        "mitigation": "Provide clear, detailed description of skill functionality"
      },
      {
        "risk": "Data exfiltration patterns: INSTRUCTED_SENSITIVE_SERVICE_ACCESS",
        "severity": "high",
        "mitigation": "Clearly document which sensitive services are accessed and why; use minimal required permissions"
      }
    ],
    "limitations": [
      "Static analysis only - runtime behavior not verified"
    ]
  },
  "incident_response": {
    "kill_switch": [
      "Stop the agent process"
    ],
    "containment": [
      "Review logs for unexpected actions"
    ],
    "recovery": [
      "Depends on skill capabilities"
    ]
  },
  "evidence": [
    {
      "evidence_id": "EV:file-1",
      "type": "file_excerpt",
      "title": "scripts/auth.py",
      "file_path": "scripts/auth.py"
    },
    {
      "evidence_id": "EV:file-2",
      "type": "file_excerpt",
      "title": "scripts/clean.py",
      "file_path": "scripts/clean.py"
    },
    {
      "evidence_id": "EV:file-3",
      "type": "file_excerpt",
      "title": "scripts/deep_clean.py",
      "file_path": "scripts/deep_clean.py"
    },
    {
      "evidence_id": "EV:file-4",
      "type": "file_excerpt",
      "title": "scripts/organize.py",
      "file_path": "scripts/organize.py"
    },
    {
      "evidence_id": "EV:file-5",
      "type": "file_excerpt",
      "title": "scripts/restore.py",
      "file_path": "scripts/restore.py"
    },
    {
      "evidence_id": "EV:file-6",
      "type": "file_excerpt",
      "title": "scripts/scan.py",
      "file_path": "scripts/scan.py"
    },
    {
      "evidence_id": "EV:file-7",
      "type": "file_excerpt",
      "title": "SKILL.md",
      "file_path": "SKILL.md"
    },
    {
      "evidence_id": "EV:file-8",
      "type": "file_excerpt",
      "title": "_meta.json",
      "file_path": "_meta.json"
    },
    {
      "evidence_id": "EV:cisco-1",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_OS_SYSTEM [CRITICAL] scripts/auth.py:50: os.system(f\"{sys.executable} -m pip install google-auth-oauthlib google-auth-htt",
      "file_path": "scripts/auth.py"
    },
    {
      "evidence_id": "EV:cisco-2",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_SHELL_TRUE [HIGH] scripts/auth.py:50: os.system(f\"{sys.executable} -m pip install google-auth-oauthlib google-auth-htt",
      "file_path": "scripts/auth.py"
    },
    {
      "evidence_id": "EV:cisco-3",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_OS_SYSTEM [CRITICAL] scripts/clean.py:46: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/clean.py"
    },
    {
      "evidence_id": "EV:cisco-4",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_SHELL_TRUE [HIGH] scripts/clean.py:46: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/clean.py"
    },
    {
      "evidence_id": "EV:cisco-5",
      "type": "file_excerpt",
      "title": "MCP_SQL_BLIND [HIGH] scripts/clean.py:109: time.sleep(0.1)",
      "file_path": "scripts/clean.py"
    },
    {
      "evidence_id": "EV:cisco-6",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_OS_SYSTEM [CRITICAL] scripts/deep_clean.py:36: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/deep_clean.py"
    },
    {
      "evidence_id": "EV:cisco-7",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_SHELL_TRUE [HIGH] scripts/deep_clean.py:36: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/deep_clean.py"
    },
    {
      "evidence_id": "EV:cisco-8",
      "type": "file_excerpt",
      "title": "MCP_SQL_BLIND [HIGH] scripts/deep_clean.py:88: time.sleep(0.1)",
      "file_path": "scripts/deep_clean.py"
    },
    {
      "evidence_id": "EV:cisco-9",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_OS_SYSTEM [CRITICAL] scripts/organize.py:92: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/organize.py"
    },
    {
      "evidence_id": "EV:cisco-10",
      "type": "file_excerpt",
      "title": "COMMAND_INJECTION_SHELL_TRUE [HIGH] scripts/organize.py:92: os.system(f\"{sys.executable} -m pip install google-api-python-client google-auth",
      "file_path": "scripts/organize.py"
    }
  ]
}