Back to skill

Security audit

Network Hot - 全网热搜榜

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward TianAPI hot-trends skill, but users should handle the required API key carefully.

Install only if you are comfortable sending a TianAPI API key to TianAPI to retrieve hot-search data. Prefer a dedicated, low-privilege key in an environment variable, avoid passing real keys on the command line, do not commit scripts/.env, and rotate the key if it has appeared in shell history, logs, or shared URLs.

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
scripts/fetch_network_hot.py:133
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
``` ### Technical Analysis The script accepts the TianAPI credential through the `--key` command-line argument. Secrets supplied as process arguments may be exposed through: - Shell history files. - Process inspection utilities and operating-system process metadata. - Command logging performed by terminal, automation, monitoring, or endpoint-management systems. - CI/CD job definitions and execution logs. The documentation increases the likelihood of exposure by explicitly recommending command-line entry. It also shows a positional argument even though the implementation only accepts `--key`, creating a documentation mismatch; however, use of the implemented `--key` option still exposes the secret. ### Attack Path 1. A user follows the documented approach or invokes the script with `--key`. 2. The API key becomes part of the command line. 3. The shell records the command in history, or process-monitoring software captures the argument. 4. A local user, administrator, support operator, or party with access to collected logs retrieves the key. 5. The party submits requests to TianAPI using the exposed credential. 6. The attacker consumes the account's API quota or accesses any other API capabilities authorized for that key. ### Impact Assessment This issue does not grant operating-system privileges by itself. Its scope is the TianAPI account and permissions associated with the expos ...[truncated 186 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_network_hot.py:90
Finding

API Key Transmitted in URL Query String

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description understates important operational behavior: it relies on a third-party API, transmits an API key externally, and claims broad multi-platform aggregation that is actually delegated to a single external provider. This mismatch can mislead users and reviewers about trust boundaries, data flow, and what the skill really does, increasing the chance of unsafe approval or misuse.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill instructs users to create a scripts/.env file containing a live API credential in the working directory. Secrets stored in local plaintext files are commonly leaked through backups, accidental commits, permissive file permissions, or other tooling that reads project files.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

md
# 方式一:环境变量(推荐,一次配置永久生效)
    export TIANAPI_NETWORK_HOT_KEY=你的APIKey

    # 方式二:.env 文件(在脚本目录创建)
    echo "TIANAPI_NETWORK_HOT_KEY=你的APIKey" > scripts/.env

    # 方式三:每次命令行传入

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The documented use of a plaintext .env file and direct command-line key passing creates multiple credential exposure paths, including process arguments, shell history, and repository leakage. In a skill whose core operation depends on an external API key, this materially raises the risk of credential compromise and unauthorized API usage.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
export TIANAPI_NETWORK_HOT_KEY=你的APIKey

    # 方式二:.env 文件(在脚本目录创建)
    echo "TIANAPI_NETWORK_HOT_KEY=你的APIKey" > scripts/.env

    # 方式三:每次命令行传入
    python3 scripts/fetch_network_hot.py 你的APIKey

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_network_hot.py (reported line 17)May include surrounding context.

python
Env Config:
    export TIANAPI_NETWORK_HOT_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_NETWORK_HOT_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_network_hot.py (reported line 37)May include surrounding context.

python
Env Config:
    export TIANAPI_NETWORK_HOT_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_NETWORK_HOT_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_network_hot.py (reported line 42)May include surrounding context.

python
Env Config:
    export TIANAPI_NETWORK_HOT_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_NETWORK_HOT_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_network_hot.py (reported line 51)May include surrounding context.

python
Env Config:
    export TIANAPI_NETWORK_HOT_KEY=your_api_key
    # 或在脚本同级目录创建 .env 文件: TIANAPI_NETWORK_HOT_KEY=your_api_key
"""

import os

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fetch_network_hot.py (reported line 52)May include surrounding context.

python
if env_val: return env_val
        
        # 2. .env 文件
        env_file = Path(__file__).parent / ".env"
        if env_file.exists():
            try:
                content = env_file.read_text(encoding="utf-8")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill metadata declares required bins and environment variables but does not explicitly declare tool scope or permissions despite clearly requiring file reads, environment access, and outbound network access. This weakens sandboxing and reviewability because an agent or platform may allow broader execution than users expect, especially for a skill that transmits credentials to a third-party API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation recommends passing the API key on the command line or storing it in scripts/.env without warning that these methods can expose credentials via shell history, process listings, logs, backups, or accidental source control commits. Because this is a credential-handling skill, insecure key-handling guidance directly increases the likelihood of credential leakage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's descriptive text and runtime messages are primarily in Chinese, and the script does not offer any language selection or indicate that the locale restriction is intentional. This can violate language/locale policy when users are not given a choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring documents python3 fetch_network_hot.py --key YOUR_KEY --json as supported usage, implying the script accepts a JSON-mode flag. However, the argument parser only defines --key at L136-L138, while the code later accesses args.json at L148, so the documented interface contradicts the implemented CLI behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documentation shows direct API invocation but does not warn that the request sends the API key to an external service. While expected for API use, omitting this disclosure reduces transparency about credential transmission and third-party data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code constructs an HTTP request to an external API endpoint and includes the user's API key in the query string. While the script's purpose implies network access, there is no user-facing warning or disclosure that credentials are transmitted off-host as part of the request.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.