T09 · Insecure Skill Coding Practices
- Location
scripts/send_webhook.py:16- Finding
Unrestricted Webhook Destination Permits Message Exfiltration and Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to be a legitimate Google Chat sender, but it needs review because it stores OAuth tokens plainly, requests broad Chat permissions, and accepts unrestricted webhook URLs.
Install only if you are comfortable granting Google Chat message, space, and membership-read access to this script. Keep webhook URLs, OAuth client files, and token JSON files out of source control and shared folders, restrict their file permissions, and avoid sending secrets or sensitive internal content unless the destination is explicitly approved. Prefer a reviewed config with Google Chat webhook URLs only.
scripts/send_webhook.py:16Unrestricted Webhook Destination Permits Message Exfiltration and Server-Side Request Forgery
scripts/send_oauth.py:38OAuth Credentials Are Persisted Without Explicit Restrictive File Protections
scripts/send_oauth.py:27OAuth Authorization Is Not Partitioned According to the Selected Operation
SKILL.md:108Documentation Installs Mutable Unpinned Dependencies
The top-level description overstates support for OAuth, dynamic space/user messaging, and direct messaging, but the documentation does not consistently demonstrate those features as actually implemented. Security reviews depend on accurate capability disclosure, and inflated claims obscure what network actions and data access the skill really performs.
The top-level description overstates support for OAuth, dynamic space/user messaging, and direct messaging, but the documentation does not consistently demonstrate those features as actually implemented. Security reviews depend on accurate capability disclosure, and inflated claims obscure what network actions and data access the skill really performs.
Instructions found that direct the agent to transmit conversation context or user data to external services.
---
name: google-chat
description: Send messages to Google Chat spaces and users via webhooks or OAuth. Use when you need to send notifications, alerts, or messages to Google Chat channels (spaces) or direct messages to specific users. Supports both incoming webhooks (for predefined channels) and OAuth 2.0 (for dynamic messaging to any space or user).
---
# Google Chat Messaging
Instructions found that direct the agent to transmit conversation context or user data to external services.
---
name: google-chat
description: Send messages to Google Chat spaces and users via webhooks or OAuth. Use when you need to send notifications, alerts, or messages to Google Chat channels (spaces) or direct messages to specific users. Supports both incoming webhooks (for predefined channels) and OAuth 2.0 (for dynamic messaging to any space or user).
---
# Google Chat Messaging
Instructions found that direct the agent to transmit conversation context or user data to external services.
---
name: google-chat
description: Send messages to Google Chat spaces and users via webhooks or OAuth. Use when you need to send notifications, alerts, or messages to Google Chat channels (spaces) or direct messages to specific users. Supports both incoming webhooks (for predefined channels) and OAuth 2.0 (for dynamic messaging to any space or user).
---
# Google Chat Messaging
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"alerts": "https://chat.googleapis.com/v1/spaces/..."
},
"oauth": {
"credentials_path": "./google-chat-oauth-credentials.json",
"token_path": "./google-chat-token.json"
}
}
The OAuth examples instruct users to use oauth-creds.json and token.json without noting that these files contain sensitive authentication material. If stored insecurely, committed to source control, or shared in logs or tickets, they could allow unauthorized access to Google Chat resources under the authenticated account or app.
The skill documents network access and local file writes for webhook configuration, OAuth credential storage, and token persistence, but it declares no explicit tool scope or permissions. This weakens least-privilege controls and makes it easier for an agent to invoke outbound messaging or write sensitive credential material without clear policy boundaries.
The skill encourages sending messages to external Google Chat services but does not prominently warn that message bodies, space identifiers, webhook URLs, OAuth credentials, and tokens are sensitive. Without that warning, users may paste secrets or internal data into examples and mishandle credentials, creating preventable exfiltration risk.
The documentation contradicts itself by stating elsewhere that DMs cannot be created by email while later providing a --dm email example. Inconsistent instructions around recipient targeting can lead users to send messages to unintended destinations, misunderstand API guarantees, or build workflows that fail in unsafe ways.
The module docstring's usage example advertises --dm user@domain.com as a supported way to send a DM. However, create_dm_space later states that OAuth cannot create DMs by email and always returns None, causing the --dm path to fail. This is an active contradiction between the documented intent and actual behavior.
The README advertises listing spaces and DMs but does not warn that this capability exposes workspace structure, channel names, and direct-message metadata that may be sensitive in some environments. While discovery is a legitimate feature of the Google Chat API, documenting it without any caution increases the risk of unnecessary metadata enumeration and casual misuse.
No suspicious patterns detected.