Back to skill

Security audit

pushplus

Security checks for vulnerabilities and agentic risk

Overview

This PushPlus notification skill is mostly disclosed, but it includes broad account-management powers and unsafe verbose logging that users should review before installing.

Install only if you intend to let an agent manage your PushPlus account, not just send simple notifications. Use least-privileged message tokens where possible, avoid verbose mode with real tokens or private message content, and require explicit confirmation before any OpenAPI operation that creates, changes, deletes, or redirects account configuration.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pushplus.py:160
Finding
Verbose Logging Exposes PushPlus Credentials and Sensitive Message Data## Vulnerability Details **File Location**: `scripts/pushplus.py:160-162` and `scripts/pushplus.py:265-267` **Vulnerability Type**: Sensitive information exposure through unredacted diagnostic logging **Risk Level**: Medium ### Vulnerable Code Single-channel message sending: ```python if verbose: print(f"Request URL: {API_BASE_URL}") print(f"Request data: {data.decode('utf-8')}") ``` Batch message sending: ```python if verbose: print(f"Request URL: {API_BATCH_URL}") print(f"Request data: {data.decode('utf-8')}") ``` ### Technical Analysis Both message-sending functions serialize the complete request payload before transmitting it to PushPlus. The payload includes the PushPlus `token` and message `content`. Depending on the selected options, it may also include recipient identifiers, group identifiers, webhook configuration codes, preprocessing codes, and callback URLs. When verbose mode is enabled, the code decodes and prints the complete serialized payload without redaction. Standard output is frequently captured by CI/CD systems, process supervisors, agent transcripts, terminal recording systems, and centralized log collectors. Consequently, a temporary diagnostic option can cause credentials and private notification content to persist outside their intended security boundary. Transmitting these values to the fixed HTTPS PushPlus endpoints is necessary for the declared notification functionality. Printing them locally is not necessary and exceeds the minimum data exposure required to perform that function. ### Attack Path 1. A user, administrator, troubleshooting workflow, or automated agent invokes the script with `--verbose`, or calls `send_message()` or `send_batch_message()` with `verbose=True`. 2. The script constructs a JSON payload containing the PushPlus token, message content, and optional routing or recipient data. 3. The complete payload is printed to standard output without ...[truncated 1268 chars]
Remediation
## Remediation Suggestions 1. Never print the complete serialized request payload. Construct a separate sanitized diagnostic representation. 2. Replace sensitive values with fixed placeholders. At minimum, redact: - `token` - `content` - `to` - `option` - `callbackUrl` - `pre` 3. Log only operational metadata needed for troubleshooting, such as endpoint name, channel, template, payload byte length, and whether optional fields were supplied. 4. If limited content diagnostics are essential, require a separate explicit opt-in and truncate the value. Do not enable that behavior in shared, CI, or agent environments. 5. Document that credentials passed through command-line arguments can also be exposed through shell history or process listings; recommend environment variables or a protected credential provider. 6. Add automated tests verifying that known token and message-content values never appear in verbose output. Example hardening pattern: ```python if verbose: safe_payload = { "token": "[REDACTED]", "content": f"[REDACTED: {len(normalized_content)} characters]", "template": normalized_template, "channel": normalized_channel, "hasTopic": bool(topic), "hasRecipient": bool(to), "hasCallbackUrl": bool(callback_url), } print(f"Request URL: {API_BASE_URL}") print(f"Request metadata: {json.dumps(safe_payload, ensure_ascii=False)}") ```
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose frames the skill as a notification sender/query tool, but the documented capabilities extend into broad account administration, token lifecycle management, group/user deletion, friend management, QR-code flows, and even preprocessing code testing/execution. This mismatch is dangerous because users or orchestrators may authorize the skill for low-risk messaging while it actually exposes high-impact state-changing operations that can modify accounts, revoke access, or run server-side processing features.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The skill exposes APIs to store, edit, delete, and test server-side preprocessing code, explicitly allowing JavaScript content to be submitted to the remote service. Even though execution occurs on the provider side, this gives an agent a pathway to deploy active logic that can transform messages, persist behavior, or create hidden downstream effects well beyond simple notification delivery.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares environment-variable and network-dependent behavior but does not specify any explicit tool scope such as allowed tools or permissions. In an agent runtime, this can cause the skill to receive broader-than-necessary execution privileges, increasing the chance of unauthorized outbound requests or credential access if the runtime defaults are permissive.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This is a markdown file, so SQP-2 applies to missing warnings in the skill description. The document describes sending message content to a remote API and includes sensitive fields such as token, webhook, and callbackUrl, but it does not warn users to protect tokens or to avoid sending sensitive data to third-party endpoints.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
In verbose mode the script prints the entire JSON request body before sending it, which includes the PushPlus token and message content. This can expose credentials and sensitive notification data to terminal history, CI logs, shared consoles, or centralized log collectors, enabling unauthorized message sending or disclosure of private alert contents.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The file implements a very broad administrative client for the PushPlus account, including token management, group administration, webhook configuration, default settings, friend management, and other state-changing operations far beyond the stated skill purpose of sending notifications, configuring message notifications, and querying results. In an agent/tool setting, this excessive scope violates least privilege and materially increases blast radius if the skill is invoked incorrectly, prompt-injected, or misused by a downstream agent.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
This code reads PUSHPLUS_USER_TOKEN and PUSHPLUS_SECRET_KEY from environment variables and sends them to a remote API to obtain an access key. Although the module docstring documents the variables for developers, there is no runtime disclosure, confirmation, or explicit user-facing warning that local credentials will be accessed and transmitted off-host.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The webhook management functions allow creation and modification of arbitrary outbound destinations, including custom URLs, headers, HTTP methods, and bodies. In an agent context, this can be abused to reconfigure notifications toward attacker-controlled endpoints or establish covert exfiltration channels unrelated to the advertised messaging use case.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This markdown file contains user-facing natural-language guidance entirely in Chinese, including the description, usage instructions, and safety rules. Under the policy for language or locale constraints, forcing a specific language without opt-in can be a natural-language policy violation when no alternative or choice is provided.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
Natural-language strings throughout the module, including the top-level description and CLI help text, are exclusively Chinese. Under the stated policy, forcing a specific language without opt-in or a documented region-specific justification is a language/locale policy violation.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/pushplus_openapi.py:27