Back to skill

Security audit

App基础指标+智能巡检(异动报告)

Security checks for vulnerabilities and agentic risk

Overview

This UMeng analytics skill is mostly coherent, but it also exposes account-changing API wrappers and credential-handling risks that should be reviewed before installation.

Install only if you are comfortable giving the skill UMeng credentials that may authorize more than read-only analytics. Prefer scoped or read-only UMeng credentials if available, avoid running the diagnostic module directly, keep umeng-config.json out of version control with owner-only permissions, and review or remove the create/edit request wrappers if you only need analytics queries.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
umeng_get_outlier_points.py:50
Finding

Umeng API Credentials Exposed in GET Query Parameters

Content
View full analysis

Vulnerability Details

File Location: umeng_get_outlier_points.py, lines 50-60
Vulnerability Type: Sensitive information exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

python
# 构建请求 URL
base_url = "https://mobile.umeng.com/ht/api/v3/ai/getOutlierPoints"
params = {
    "ak": api_key,
    "sk": api_security,
    "appkey": appkey,
    "ds": ds
}

try:
    # 发送 GET 请求
    response = requests.get(base_url, params=params, timeout=30)

Technical Analysis

The function places both the Umeng API key and API security secret in the query string of a GET request. The requests library serializes params into a URL resembling:

text
https://mobile.umeng.com/ht/api/v3/ai/getOutlierPoints?ak=API_KEY&sk=API_SECRET&appkey=APP_KEY&ds=DATE

HTTPS encrypts the URL while it is in transit, but it does not prevent the complete URL from being recorded by the client, application monitoring systems, forward or reverse proxies, API gateways, debugging tools, exception telemetry, or destination server access logs. Query strings are commonly treated as loggable request metadata.

Because sk is an authentication secret rather than ordinary request data, its inclusion in the URL creates an unnecessary credential-disclosure risk. The code does not redact the query string or otherwise constrain downstream logging.

Attack Path

  1. A legitimate user invokes get_umeng_outlier_points.
  2. The function constructs a GET request containing ak and sk in its query string.
  3. A proxy, API gateway, monitoring agent, diagnostic system, or destination server records the complete request URL.
  4. An attacker who has access to those logs searches for requests to getOutlierPoints.
  5. The attacker extracts the ak and sk values from the recorded URL.
  6. Subject to the permissions and validity of those credentials, the attacker can submit authenticated requ ...[truncated 726 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use a POST request body or an authorization header for credentials if the Umeng endpoint supports either mechanism.
  2. Prefer short-lived, scoped tokens over reusable API secrets where supported.
  3. If the upstream API strictly requires query-based authentication:
    • Disable query-string logging for this endpoint.
    • Configure proxies, gateways, tracing systems, and error-reporting tools to redact ak and sk.
    • Avoid including prepared request URLs in exceptions or debug output.
    • Restrict access to network and server logs.
  4. Use credentials with the minimum required permissions and isolate them per environment.
  5. Rotate credentials that may already have appeared in URL logs.
  6. Add automated tests that verify secrets are absent from application logs and exception messages.

T09 · Insecure Skill Coding Practices

Note
Location
umeng_config.py:180
Finding

Partial API Secret Disclosure Through Standard Output

Content
View full analysis

Vulnerability Details

File Location: umeng_config.py, lines 180-185
Vulnerability Type: Sensitive information disclosure through diagnostic output
Risk Level: Low

Vulnerable Code

python
# 使用示例
if __name__ == "__main__":
    # 示例:获取认证信息
    try:
        creds = get_umeng_credentials()
        print(f"认证信息来源:{creds['source']}")
        print(f"API Key: {creds['apiKey'][:10]}...")
        print(f"API Security: {creds['apiSecurity'][:10]}...")

Technical Analysis

When umeng_config.py is executed directly, it loads active credentials and prints the first ten characters of both the API key and API security secret to standard output.

Secret masking should not reveal a fixed prefix of reusable credentials. Standard output is frequently retained by CI/CD systems, terminal capture tools, agent transcripts, container logs, and centralized logging platforms. Although the complete secret is not printed, exposing ten characters reduces its confidentiality and can enable credential correlation across environments or assist attacks where the remaining format or entropy is limited.

The disclosure occurs only when this module is run as the main program; importing it does not execute this block.

Attack Path

  1. Valid Umeng credentials are present in a discovered configuration file or the named environment variables.
  2. A user, support workflow, CI job, or automation process executes python umeng_config.py.
  3. The module loads the credentials and writes their first ten characters to standard output.
  4. The output is retained in a terminal transcript, CI log, container log, or centralized monitoring service.
  5. A party with access to that output obtains the disclosed credential prefixes.
  6. The prefixes may be used to correlate credentials, identify reused secrets, or reduce the search space in combination with another weakness.

This code alone does not disclose the remaining secret ch ...[truncated 548 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove all output containing any portion of apiSecurity.
  2. Report only non-sensitive state, such as:
    • Whether credentials were found.
    • Which source supplied them.
    • Whether a connectivity test succeeded.
  3. If credential identification is operationally necessary, display a short irreversible fingerprint derived with a cryptographic hash rather than a literal prefix.
  4. Require an explicit debug option before emitting diagnostic credential metadata, and ensure the option still never reveals secret characters.
  5. Review existing CI, container, terminal, and centralized logs for exposed prefixes and remove them according to retention policy.
  6. Rotate credentials if the disclosed prefix materially weakens the secret or if related leakage is suspected.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (118)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as a narrow, read-oriented UMeng analytics query tool, but the referenced SDK surface appears to expose broader generic API and management capabilities, including operations outside simple APPKEY-based metrics lookup. This kind of description-behavior mismatch is dangerous because an agent may invoke the skill under false assumptions and perform broader remote actions or access data not implied by the user request.

Content

No source excerpt is available for this finding.