Back to skill

Security audit

Crypto Market Analysis

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it can automatically install an unpinned Python package and run helper scripts with broad inherited environment access, so it needs human review before installation.

Review this skill before installing. It should only be used in an isolated Python environment where automatic package installation is acceptable, or after TA-Lib has been installed and pinned through a controlled setup process. Do not treat the generated analysis as financial advice, and be aware that requested symbols and intervals are sent to Binance public APIs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/main_analysis.py:39
Finding

Unpinned Automatic Runtime Installation of TA-Lib

Content
View full analysis

Vulnerability Details

File Location: scripts/main_analysis.py:39-58
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

python
def install_ta_lib():
    try:
        # Attempt to import TA-Lib using the explicitly defined PYTHON_EXECUTABLE
        result = subprocess.run(
            [PYTHON_EXECUTABLE, "-c", "import talib"],
            capture_output=True, text=True, check=False
        )
        if result.returncode == 0:
            print("TA-Lib is already installed.", file=sys.stderr)
            return True
        else:
            print("TA-Lib not found. Attempting to install TA-Lib...", file=sys.stderr)
            # Use pip to install TA-Lib. Use the explicit Python executable.
            subprocess.run(
                [PYTHON_EXECUTABLE, "-m", "pip", "install", "TA-Lib"],
                check=True,
                capture_output=True
            )
            print("TA-Lib installed successfully.", file=sys.stderr)
            return True
    except subprocess.CalledProcessError as e:
        print(f"Error installing TA-Lib: {e.stderr}", file=sys.stderr)
        print("Please install TA-Lib manually using: pip install TA-Lib", file=sys.stderr)
        return False
    except Exception as e:
        print(f"An unexpected error occurred during TA-Lib installation: {e}", file=sys.stderr)
        return False

Technical Analysis

The Skill automatically invokes pip install TA-Lib during ordinary analysis when the talib import check fails. The package is installed without a fixed version, hash verification, lockfile, approved package-index enforcement, or explicit user confirmation.

This creates a software supply-chain risk because the package selected at execution time depends on the active pip configuration and the state of its configured indexes. Installation can also run package build or installation logic ...[truncated 2069 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic package installation from the runtime analysis path.
  2. Declare TA-Lib as a deployment-time dependency with an exact, reviewed version.
  3. Use a lockfile or requirements file containing cryptographic hashes, and install with hash enforcement such as pip install --require-hashes.
  4. Install dependencies in an isolated virtual environment during a controlled setup phase rather than modifying the Agent's active interpreter.
  5. Restrict installation to an approved, authenticated package index and prevent fallback to untrusted extra indexes.
  6. Verify wheels or source distributions before approval and maintain dependency vulnerability monitoring.
  7. If automated setup is unavoidable, require explicit user consent, display the exact package version and source, and run installation in a sandbox with minimal filesystem and network permissions.
  8. Replace the hardcoded interpreter path with a validated configuration or sys.executable so the dependency check and execution consistently target the intended isolated environment.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This mismatch is security-relevant because the skill is presented as a market-analysis tool, while documentation indicates additional risky behavior such as runtime package installation and invocation of a hardcoded local Python/subprocess path. Hidden execution and installation behavior expands the attack surface significantly and can lead to arbitrary code execution, environment compromise, or supply-chain exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This mismatch is security-relevant because the skill is presented as a market-analysis tool, while documentation indicates additional risky behavior such as runtime package installation and invocation of a hardcoded local Python/subprocess path. Hidden execution and installation behavior expands the attack surface significantly and can lead to arbitrary code execution, environment compromise, or supply-chain exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

This mismatch is security-relevant because the skill is presented as a market-analysis tool, while documentation indicates additional risky behavior such as runtime package installation and invocation of a hardcoded local Python/subprocess path. Hidden execution and installation behavior expands the attack surface significantly and can lead to arbitrary code execution, environment compromise, or supply-chain exposure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill self-modifies its runtime by checking for and installing TA-Lib via pip, which exceeds the stated purpose of market analysis and materially expands privilege and execution scope. Runtime dependency installation can be abused through poisoned package sources, dependency confusion, or environment compromise to execute arbitrary code on the host.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
91% confidence
Finding

Copying the full environment into subprocesses can propagate sensitive variables such as API tokens, proxy credentials, or internal configuration to child processes that do not need them. In combination with dynamic package installation and local helper execution, this increases the chance that secrets are exposed or misused if any child process or dependency is compromised.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 155)May include surrounding context.

python
# Prepare environment for subprocesses to ensure Python path is correct
    env_for_subprocess = os.environ.copy()
    python_path_extra = os.pathsep.join(site.getsitepackages()) # Get all site-packages paths
    if "PYTHONPATH" in env_for_subprocess:
        env_for_subprocess["PYTHONPATH"] = python_path_extra + os.pathsep + env_for_subprocess["PYTHONPATH"]

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 315)May include surrounding context.

python
#### 4. 總結與建議
    请根据上述数据,生成一份专业的市场分析和投资建议。
    """
    return llm_prompt, report_data # Return prompt and data to agent for LLM call

if __name__ == '__main__':
    if len(sys.argv) < 2:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises capabilities that imply network, shell, and environment access, but the manifest does not declare any explicit tool restrictions or permissions. In practice, undocumented capability scope makes it harder to review and constrain what the skill can do, increasing the chance of unexpected command execution, package installation, or data access if the backing implementation is invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

An overly broad trigger description increases the chance that the skill is invoked in contexts beyond its intended use, causing unnecessary network access, code execution, or data processing. In a skill with indications of shell/network/package-install behavior, loose invocation criteria make accidental or policy-bypassing activation more dangerous.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage section lacks clear scope, constraints, and activation boundaries, which can lead to the skill being invoked with ambiguous or unsafe inputs. Because the skill may access external APIs and potentially perform environment-modifying actions, poor trigger hygiene raises the likelihood of unintended execution paths and review gaps.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatic installation of TA-Lib at runtime introduces package-installation capability into a skill that users expect to perform analysis, not modify the environment. This creates supply-chain and arbitrary code execution risk because package installation executes code from external sources and may alter the host unexpectedly, especially in privileged or shared environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly describes technical indicators as buy/sell signals (e.g., 金叉/死叉) without any accompanying disclaimer that the material is informational only and not financial advice. In the context of a crypto-market-analysis skill that generates market analysis reports, this increases the chance that users will treat the output as actionable investment guidance, which can influence real financial decisions and losses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script prints the DataFrame head and full column dtypes to stderr during normal execution, which can expose input market data and metadata into logs. In an agent skill context, stderr is often captured by orchestrators, CI systems, or platform logs, so data may be retained or disclosed beyond the user's expectation without any opt-in or redaction.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/get_binance_data.py (reported line 6)May include surrounding context.

python
import sys

def get_klines(symbol, interval, limit=500):
    base_url = "https://api.binance.com/api/v3/klines"
    params = {
        "symbol": symbol.upper(),
        "interval": interval,

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 18)May include surrounding context.

python
import sys

def get_klines(symbol, interval, limit=500):
    base_url = "https://api.binance.com/api/v3/klines"
    params = {
        "symbol": symbol.upper(),
        "interval": interval,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
def install_ta_lib():
    try:
        # Attempt to import TA-Lib using the explicitly defined PYTHON_EXECUTABLE
        result = subprocess.run(
            [PYTHON_EXECUTABLE, "-c", "import talib"],
            capture_output=True, text=True, check=False # Don't check=True initially, as it might not be installed
        )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Automatic pip installation occurs with no user-facing notice or consent, allowing the skill to change the local system state unexpectedly. Even if not overtly malicious, silent installation increases the risk of unreviewed code being fetched and executed and violates least surprise for a market-analysis tool.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The script performs automatic runtime package installation via pip using a local interpreter, which gives the skill code execution capability beyond market analysis. If package sources, indexes, or the local Python environment are compromised, this can result in arbitrary code execution or unauthorized modification of the host environment.

Content

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

python
else:
            print("TA-Lib not found. Attempting to install TA-Lib...", file=sys.stderr)
            # Use pip to install TA-Lib. Use the explicit Python executable.
            subprocess.run([PYTHON_EXECUTABLE, "-m", "pip", "install", "TA-Lib"], check=True, capture_output=True)
            print("TA-Lib installed successfully.", file=sys.stderr)
            return True
    except subprocess.CalledProcessError as e:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Natural-language strings in the report template and the LLM prompt require output in Chinese, and the prompt explicitly says to output a Chinese analysis report. This imposes a language choice without user opt-in, which matches the locale/language policy violation criteria.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code copies the full process environment and rewrites PYTHONPATH, PYTHONHOME, and PYTHONSTARTUP before launching subprocesses. This creates unnecessary exposure of host environment data to child processes and can alter interpreter behavior in ways that increase the blast radius of any compromised helper script or package.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 195)May include surrounding context.

python
# Only attempt if TA-Lib was successfully installed or no error in initial check
    if "error" not in report_data.get("short_term_indicators", {}):
        try:
            klines_short_process = subprocess.run(
                [PYTHON_EXECUTABLE, GET_BINANCE_DATA_SCRIPT, symbol + "USDT", short_term_interval, "500"],
                capture_output=True, text=True, check=False, env=env_for_subprocess # check=False here
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 206)May include surrounding context.

python
short_klines_data = json.loads(klines_short_process.stdout)
            
            indicators_short_process = subprocess.run(
                [PYTHON_EXECUTABLE, CALCULATE_INDICATORS_SCRIPT],
                input=json.dumps(short_klines_data), capture_output=True, text=True, check=False, env=env_for_subprocess # check=False here
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 233)May include surrounding context.

python
# Only attempt if TA-Lib was successfully installed or no error in initial check
    if "error" not in report_data.get("long_term_indicators", {}):
        try:
            klines_long_process = subprocess.run(
                [PYTHON_EXECUTABLE, GET_BINANCE_DATA_SCRIPT, symbol + "USDT", long_term_interval, "500"],
                capture_output=True, text=True, check=False, env=env_for_subprocess # check=False here
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main_analysis.py (reported line 244)May include surrounding context.

python
long_klines_data = json.loads(klines_long_process.stdout)

            indicators_long_process = subprocess.run(
                [PYTHON_EXECUTABLE, CALCULATE_INDICATORS_SCRIPT],
                input=json.dumps(long_klines_data), capture_output=True, text=True, check=False, env=env_for_subprocess # check=False here
            )

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's natural-language content is entirely in Chinese and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. This matches the policy concern for forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
99% confidence
Finding

Line L055 comments that J is calculated as '3D - 2K', but the code actually computes 3 * d_value - 2 * k_value, which matches the formula 3D - 2K; wait, this is not contradictory. However, no other manifest-intent mismatch exists in the file. After reviewing the file, there is no genuine contradiction here, so this should not be reported.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.