B

B — Some risk signals Graded October 16, 2026Minor concerns worth a quick check.Based on public adoption and transparency signals as of October 16, 2026. Our opinion, not a code audit or security guarantee.

AI agent skill · Developer tools, Files & documents

cli

Google Workspace CLI — one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.

Bottom line: Signal-based grade (4/7 points): very widely starred on GitHub, public source code. This reflects adoption and transparency, not a code review.

Popularity score
50/100
Rank
#118 of 500
GitHub stars
31.5k

What it does

A unified command-line interface for Google Workspace services (Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin) that dynamically generates commands from Google's Discovery Service. Includes AI agent skills to enable automated workflows and integrations across the entire Workspace ecosystem.

Who it’s for

Builders integrating Google Workspace into AI agents and automation platforms; enterprises seeking programmatic access to Workspace without managing separate SDKs. Executives evaluating centralized Workspace tooling for agent deployments.

Copy-paste setup

Check these steps against the project’s own instructions before running anything.

Verify against the repo README at https://github.com/googleworkspace/cli (opens external site) for current setup instructions. Likely involves npm or binary installation, Google Cloud authentication via OAuth 2.0 or service account keys, and configuration of desired scopes. Exact MCP connector setup steps should be confirmed in project documentation.

Risks

  • Credential scope creep: OAuth tokens granted broad Workspace permissions (Gmail, Drive, Admin) create blast radius if credentials leak or are misused by malicious prompts.
  • Prompt injection: Unsanitized user input to CLI commands could inject admin operations or data exfiltration queries; verify input validation in agent layer.
  • Service account key exposure: If using service accounts, leaked keys grant full Workspace access; require strict key rotation and least-privilege IAM roles.
  • Data exfiltration: Direct access to Gmail, Drive, and Calendar via single tool increases risk of bulk data extraction without audit trails.
  • Google Discovery Service dependency: Dynamic command generation from Google's service creates supply-chain risk if Google APIs are compromised or misconfigured.

How to stay secure

Least-privilege permissions

  • Request OAuth scopes granularly (e.g., https://www.googleapis.com/auth/gmail.readonly instead of full Gmail access); deny Admin scopes unless mandatory for the agent's task.
  • Use separate service accounts per agent skill with IAM roles limited to required APIs (e.g., read-only Drive access for document retrieval only).
  • Implement OAuth consent screen restrictions: mark as internal only, enforce domain whitelisting, and require manual approval for sensitive scopes.
  • Rotate service account keys every 90 days; disable and remove unused keys immediately; audit key creation timestamps in Cloud Audit Logs.

Network isolation

  • Deploy the CLI agent in a VPC with egress rules restricted to Google APIs only (*.googleapis.com); block direct internet access to prevent credential exfiltration.
  • Use VPC Service Controls to create a security perimeter around Workspace APIs; enforce policy that denies token access from unauthorized networks.
  • Require mTLS or IP whitelisting for service account authentication; log all API calls through Cloud Logging with source IP tracking.

Monitoring

  • Log all CLI commands executed by the agent; correlate with user prompts in audit trails to detect prompt injection attempts (e.g., unexpected admin or export operations).
  • Set alerts on high-volume data access patterns (bulk Gmail reads, Drive file downloads) and failed Admin API calls; trigger incident review on anomalies.
  • Monitor OAuth token usage: alert on tokens accessing unexpected scopes, multiple IPs, or unusual API sequences within short time windows.
  • Enable Google Workspace Admin audit logs with retention ≥90 days; regularly review Drive sharing changes and Gmail forwarding rules.

Red flags to watch for

  • Prompts requesting Admin operations (user creation, delegation, policy changes) when agent is scoped for read-only access; block and escalate immediately.
  • Sudden spike in Drive file downloads, Gmail message exports, or Calendar queries; halt agent and verify user intent.
  • Service account key appearing in logs, error messages, or git history; assume compromise and rotate immediately.
  • OAuth token used from unexpected geographic location or device; revoke token and force re-authentication with MFA.

Alternatives

  • Google Workspace APIs + custom client library (SDKs for Python, Node.js, Go) — more explicit permission control, slower to build.
  • Zapier / Make.com integrations — lower-code, managed credential handling, but limited to predefined Workspace workflows.
  • n8n or Retool with Workspace connectors — open-source orchestration with audit trails and fine-grained permission mapping.
  • Workspace Automation via Google Apps Script — native, sandboxed, but limited to scripting scope and cannot be easily embedded in external agents.

Sources