Back to skill

Security audit

Trading_Agents_for_Futures

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed futures-analysis tool with normal market-data, caching, and reporting behavior, but users should treat its dependency installation and trading recommendations cautiously.

Install it only in a virtual environment, avoid running setup.py as administrator/root, and review or pin dependencies before use. Expect network calls to public market-data sources, local cache/output files, and Chinese-language reports. Do not treat the buy/sell/position outputs as investment advice; verify data freshness and suitability independently, and avoid putting proxy credentials in config unless logging is fixed or logs are protected.

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

T08 · Insecure Dependencies

Warning
Location
setup.py:9
Finding

Automatic Installation of Unpinned Third-Party Dependencies

Content
View full analysis
=1.14.0", "pandas>=2.0.0", "numpy>=1.24.0", "pyarrow>=12.0.0", "pyyaml>=6.0", "requests>=2.28.0", "python-dotenv>=1.0.0", ] missing = [] for dep in deps: name = dep.split(">=")[0].split("<")[0] try: __import__(name.replace("-", "_")) except ImportError: missing.append(dep) if not missing: print("All dependencies are installed.") return print(f"Installing: {' '.join(missing)}") cmd = [sys.executable, "-m", "pip", "install"] + missing try: subprocess.run(cmd, check=True) ``` ### Technical Analysis The documented `python setup.py` installation workflow launches pip and resolves mutable versions directly from the configured package index. The installer specifies only minimum versions and does not use an exact lock file, package hashes, or upper bounds. This creates a supply-chain trust boundary in which the code ultimately installed may differ from the code reviewed. A compromised future release, compromised package-index account, malicious transitive dependency, or unsafe private package-index configuration could introduce arbitrary code. The import checks also incorrectly derive import names from distribution names: - `pyyaml` is imported as `yaml`, not `pyyaml`. - `python-dotenv` is imported as `dotenv`, not `python_dotenv`. Consequently, these packages may be treated as missing even when already installed, unnecessarily invoking network-based dependency resolution. `requirements.txt` applies some upper bounds, but it still does not pin exact versions or hashes. Moreover, `setup.py` does not use those upper bounds, so the two installation mechanisms do not enforce equivalent dependency ...[truncated 1464 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
core/core_engine.py:107
Finding

Authenticated Proxy Credentials Exposed in Application Logs

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (56)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

A skill presented as a futures analysis engine reportedly installs Python packages via pip and uses subprocesses for environment setup. Executing package managers or shell commands from a skill significantly increases supply-chain and command-execution risk, especially when that behavior is not clearly scoped in the skill manifest.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A skill presented as a futures analysis engine reportedly installs Python packages via pip and uses subprocesses for environment setup. Executing package managers or shell commands from a skill significantly increases supply-chain and command-execution risk, especially when that behavior is not clearly scoped in the skill manifest.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A skill presented as a futures analysis engine reportedly installs Python packages via pip and uses subprocesses for environment setup. Executing package managers or shell commands from a skill significantly increases supply-chain and command-execution risk, especially when that behavior is not clearly scoped in the skill manifest.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A skill presented as a futures analysis engine reportedly installs Python packages via pip and uses subprocesses for environment setup. Executing package managers or shell commands from a skill significantly increases supply-chain and command-execution risk, especially when that behavior is not clearly scoped in the skill manifest.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

A skill presented as a futures analysis engine reportedly installs Python packages via pip and uses subprocesses for environment setup. Executing package managers or shell commands from a skill significantly increases supply-chain and command-execution risk, especially when that behavior is not clearly scoped in the skill manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly positions decision mode for human traders and promises risk control plus CIO position recommendations, but it does not include a prominent disclaimer that outputs are informational only and can be wrong, stale, or incomplete. In a financial context, presenting decision support without a warning increases the risk that users over-trust the system and act on unsuitable trading recommendations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares no explicit tool restrictions even though its documented behavior implies access to shell, network, file read/write, and possibly environment data. In an agent ecosystem, missing scope boundaries can let the skill invoke overly powerful capabilities, increasing the blast radius if the skill is compromised, misused, or behaves differently than advertised.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

L576声明输出必须“绝对禁止任何英文单词、缩写或术语”,但同一文件前文和后文明确要求输出 JSON 字段与固定枚举值,如 technical_analysis、risk_assessment、long/short/neutral、buy/sell/hold 等,且这些都是英文标识。这不是简单的不完整,而是文档内部对输出形式的直接冲突,容易误导实现者或调用方。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The markdown explicitly says '纯中文,绝对禁止任何英文单词、缩写或术语,' which forces a specific language/locale behavior. Under the policy rules, language constraints are only acceptable when the user is given a choice or the restriction is clearly justified as region-specific, which is not stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains user-facing natural language in Chinese in the module description, and later emits a human-readable report entirely in Chinese. The file does not indicate that Chinese output is optional, configurable, or required for a region-specific compliance reason, which violates the language/locale policy criteria for all file types.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes the skill as a pure rule engine with no API-key dependency, which suggests a self-contained analytics workflow. In this file, the engine explicitly supports HTTP/HTTPS proxy setup and later enables online data access, indicating the skill is designed to reach external network resources rather than operate purely locally.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest emphasizes structured output, decision reports, and generation of search actions when APIs are missing, but does not clearly state that the engine itself performs live online retrieval. Here, the DataProvider is instantiated with online access enabled by default, which expands the operational behavior beyond a plainly offline 'pure rule engine' description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The engine dynamically imports Python modules from a writable skills directory and executes their run/analyze entrypoints without any allowlist, signature verification, or trust boundary enforcement. If an attacker can place or modify a module in that directory, arbitrary code will run in the host process, which is especially sensitive because this is an extensible agent skill system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The _write_report method builds a human-readable report using fixed Chinese strings, including headings and disclaimer text. Because this is user-facing output and no language selection or opt-in is provided, it constitutes a natural-language locale policy violation under the stated rules.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest emphasizes a zero-API-key, rule-engine futures analysis engine, which suggests local/rule-based processing from available inputs. In this file, the provider is explicitly designed to fetch live remote data (enable_online=True by default) via AkShare-backed external sources for prices, basis, inventory, positions, and news, making network-backed data acquisition a core runtime behavior rather than a minor implementation detail.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a data/decision analysis engine and does not mention filesystem cleanup or maintenance operations. This file exposes a general-purpose cache deletion function that removes files from a configurable directory, which is an operational file-modification capability outside the core analytical purpose described.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code performs file deletion across the configured cache directory via f.unlink() but provides no confirmation prompt, user-facing log/print, or explicit warning in the function docstring about the destructive action. For a code file, deleting user-local files is a safety-relevant operation that should be disclosed clearly before execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The top-level natural-language description and user-facing help text are presented in Chinese only, with no indication that users may choose another language. This can violate language or locale policy when a skill forces a specific language without offering opt-in or alternatives.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The docstring states '纯本地规则引擎驱动' while also mentioning AkShare, and the skill manifest similarly emphasizes '纯规则引擎' and '零 API Key'. The actual behavior clearly includes external data acquisition through AkShare-backed analysis flows (e.g., engine.run_analysis / run_full_pipeline), so the wording about being purely local is misleading rather than merely incomplete.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · main.py (reported line 60)May include surrounding context.

python
for mod_name in ["akshare", "pyarrow", "pyyaml", "pandas", "numpy"]:
        pkg = "yaml" if mod_name == "pyyaml" else mod_name
        try:
            __import__(pkg)
        except ImportError:
            missing.append(mod_name)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The argparse description, examples, argument help, and error text are all presented only in Chinese. Because the skill does not offer a language selection or document a justified region-specific constraint, it enforces a single language for user interaction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description is entirely in Chinese and presents the skill's operating modes and outputs without offering any language choice or documenting that the skill is intentionally limited to Chinese-speaking users. This creates a natural-language locale policy concern because the skill appears to assume a fixed language by default rather than obtaining user opt-in.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · setup.py (reported line 23)May include surrounding context.

python
for dep in deps:
        name = dep.split(">=")[0].split("<")[0]
        try:
            __import__(name.replace("-", "_"))
        except ImportError:
            missing.append(dep)

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 · setup.py (reported line 35)May include surrounding context.

python
cmd = [sys.executable, "-m", "pip", "install"] + missing

    try:
        subprocess.run(cmd, check=True)
        print("安装完成。")
    except subprocess.CalledProcessError:
        print("安装失败。请确认 pip 可用并重试。")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python skill's docstring and extensive user-facing reasoning/report strings are written exclusively in Chinese, indicating the skill is designed to communicate in a fixed language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.