Back to skill

Security audit

妖币信号探测器(可搭配自动交易系统)

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed remote crypto-analysis client with automatic billing, but it needs Review because paid trading advice, identity headers, and recharge links are handled over an unencrypted and under-scoped remote API.

Install only if you are comfortable with a remote crypto-trading signal service that can charge per call. Treat returned trading advice and recharge links cautiously; the current artifact uses an unencrypted default API endpoint and does not verify payment destinations or clearly explain the identity header it sends.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/analyze.py:5
Finding

Cleartext API Transport and Caller-Controlled Billing Identity

Content
View full analysis

Vulnerability Details

File Location: scripts/analyze.py, lines 5–24
Vulnerability Type: Plaintext transmission and insufficient identity authentication
Risk Level: High

Vulnerable Code

python
API_HOST = os.environ.get("DEMON_API_HOST", "http://43.103.7.227:5001")


def analyze(ccy: str, user_id: str = None) -> dict:
    headers = {}
    if user_id:
        headers["X-User-Id"] = user_id
    resp = requests.get("{}/analyze/{}".format(API_HOST, ccy.upper()), headers=headers, timeout=120)
    return resp.json()


def scan(user_id: str = None) -> dict:
    headers = {}
    if user_id:
        headers["X-User-Id"] = user_id
    resp = requests.get("{}/scan".format(API_HOST), headers=headers, timeout=180)
    return resp.json()


if __name__ == "__main__":
    mode = sys.argv[1] if len(sys.argv) > 1 else "scan"
    user_id = os.environ.get("DEMON_USER_ID", "cli_user")

Technical Analysis

The default API endpoint uses plaintext HTTP. Consequently, the confidentiality, integrity, and authenticity of requests and responses are not protected in transit. An attacker with a suitable network position can inspect or modify the user identifier, requested asset, analysis result, error response, and other server-provided content.

The client also treats the caller-controlled DEMON_USER_ID environment variable as an identity and sends it directly in the X-User-Id header. No API credential, request signature, session token, or other proof that the caller owns the asserted identity is present in the reviewed client. If the backend relies on this header for billing or authorization without independent validation, another identity could be impersonated.

The code parses the body immediately with resp.json() and does not call raise_for_status(). This is primarily a robustness issue, but it also means that the client does not explicitly reject unexpected HTTP error responses before processing ...[truncated 1502 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace the default endpoint with an HTTPS URL protected by a valid certificate.
  • Reject DEMON_API_HOST values that do not use HTTPS, except through an explicit development-only configuration.
  • Use authenticated, unique credentials or short-lived access tokens instead of treating X-User-Id as proof of identity.
  • Bind billing operations to a server-validated account and prevent clients from selecting arbitrary billing identities.
  • Consider signing sensitive server responses or using authenticated application-level messages where additional integrity assurance is required.
  • Call resp.raise_for_status() before parsing the response body.
  • Validate the response against an expected schema and reject unexpected fields, types, or response states.
  • Avoid a shared default identity such as cli_user; require explicit account initialization.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/analyze.py:31
Finding

Unvalidated Server-Supplied Payment URL

Content
View full analysis

Vulnerability Details

File Location: scripts/analyze.py, lines 31–34
Vulnerability Type: Untrusted payment destination presentation
Risk Level: High

Vulnerable Code

python
if result.get("error") == "payment_required":
    print("余额不足,请充值: {}".format(result.get("payment_url", "")))
else:
    print(json.dumps(result, ensure_ascii=False, indent=2))

Technical Analysis

When the service returns a payment_required response, the client extracts payment_url and presents it as the recharge destination without validating its scheme, hostname, port, or path.

This value originates from a remote response delivered over plaintext HTTP by default. Therefore, it can be controlled by a compromised API server or replaced by a network attacker. The client provides no indication that the destination was unverified and does not constrain the URL to an official payment origin.

Attack Path

  1. A user invokes the skill and the client contacts the configured analysis API.
  2. A malicious server or network-positioned attacker returns JSON similar to:
    json
    {
      "error": "payment_required",
      "payment_url": "https://attacker.example/fake-recharge"
    }
    
  3. The client accepts the payment_url without validation.
  4. The attacker-controlled destination is displayed as the recharge location.
  5. The user follows the destination and may disclose credentials, connect a wallet, approve a malicious transaction, or transfer cryptocurrency to the attacker.

Impact Assessment

Successful exploitation can redirect users to phishing or fraudulent payment infrastructure. Depending on subsequent user actions, this could result in credential theft, wallet compromise, malicious transaction approval, or irreversible cryptocurrency loss.

This issue does not itself automatically open the URL or execute remote content. Exploitation requires the user to trust and follow the displayed dest ...[truncated 77 chars]

Remediation
View remediation

Remediation Suggestions

  • Maintain an allowlist containing the exact official HTTPS payment hostname and permitted ports.
  • Parse the returned URL with a standards-compliant URL parser and reject non-HTTPS schemes, embedded credentials, unexpected ports, and non-allowlisted hosts.
  • Do not rely on suffix-only hostname checks, which can accept attacker-controlled names such as trusted.example.attacker.test.
  • Authenticate the API response through HTTPS and server-side account authorization.
  • Prefer constructing the payment destination locally from a trusted base URL and a narrowly validated transaction identifier rather than accepting an arbitrary complete URL.
  • Clearly display the verified hostname and warn users not to send funds when destination validation fails.

T08 · Insecure Dependencies

Note
Location
SKILL.md:30
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 30 and lines 62–64
Vulnerability Type: Non-reproducible dependency resolution
Risk Level: Low

Vulnerable Code

bash
pip install requests

The same unconstrained installation instruction is repeated in the dependency section:

bash
pip install requests

Technical Analysis

The installation documentation requests the latest version of requests available from the configured package index. It does not pin a reviewed version, verify package hashes, identify a trusted index explicitly, or provide a lock file.

The package name is correctly spelled, and the audit found no evidence that requests itself is malicious. The risk arises because future installations may resolve to a different dependency set than the one originally reviewed. A compromised package release, compromised package index, or unsafe local index configuration could introduce unreviewed code.

Attack Path

  1. A user follows the documented pip install requests instruction.
  2. pip resolves the package and transitive dependencies using the user's configured indexes and the versions available at installation time.
  3. A compromised release, maliciously configured index, or future vulnerable version is selected.
  4. Package installation or later import executes or exposes the affected third-party code in the user's Python environment.

This is a supply-chain hardening weakness rather than evidence of an active malicious dependency in the reviewed project.

Impact Assessment

A malicious dependency release could execute with the privileges of the user running pip or the skill. Potential scope includes access to that user's files, environment variables, network credentials, and application data. Installing as an administrator would increase the possible system-wide impact.

Under normal conditions with the legitimate package index and uncompromised releases, ...[truncated 119 chars]

Remediation
View remediation

Remediation Suggestions

  • Declare dependencies in a dedicated requirements or lock file.
  • Pin an audited requests version and its transitive dependencies.
  • Use hash verification, such as pip install --require-hashes -r requirements.txt.
  • Regenerate pins regularly through a controlled dependency-update process so security fixes are not indefinitely blocked.
  • Install dependencies in an isolated virtual environment rather than into a system Python environment.
  • Explicitly use the intended trusted package index and review any organization-wide or user-level pip index configuration.
  • Add automated dependency vulnerability and integrity scanning to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Tainted flow: 'API_HOST' from os.environ.get (line 5, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The request target is derived from the DEMON_API_HOST environment variable without validation, so whoever controls the runtime environment can redirect this client to an arbitrary server. Because the client also sends X-User-Id and trusts the JSON response, this enables SSRF-like redirection, data exfiltration, and deceptive output while the tool appears to be performing legitimate analysis.

Content

Scanner excerpt · scripts/analyze.py (reported line 12)May include surrounding context.

python
headers = {}
    if user_id:
        headers["X-User-Id"] = user_id
    resp = requests.get("{}/analyze/{}".format(API_HOST, ccy.upper()), headers=headers, timeout=120)
    return resp.json()

Tainted flow: 'API_HOST' from os.environ.get (line 5, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

This scan path has the same issue: an unvalidated environment-controlled host determines where outbound requests are sent. An attacker who can influence environment variables can force the skill to contact a malicious endpoint, leak the user identifier, and return arbitrary scan results to the operator.

Content

Scanner excerpt · scripts/analyze.py (reported line 20)May include surrounding context.

python
headers = {}
    if user_id:
        headers["X-User-Id"] = user_id
    resp = requests.get("{}/scan".format(API_HOST), headers=headers, timeout=180)
    return resp.json()

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented behavior says this is an analysis engine, but the skill text indicates cloud-side execution, automatic billing, and likely external server communication without clearly disclosing operational details or trust boundaries. That mismatch is dangerous because users and orchestrators may treat the skill as local analytical logic while it actually sends requests off-platform and triggers payment-related actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises executable usage that implies network and possibly environment access, but it does not declare any explicit tool scope or permission boundaries. This creates a transparency and containment problem: hosts or users cannot easily assess what external communication or local data access the skill may perform before invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The user-facing description, usage guidance, trigger examples, and sample output are all presented in Chinese, including response text like “建议做多”, without indicating that language is optional or user-selectable. This can violate language/locale policy when a skill implicitly forces a specific language without opt-in or a documented regional constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad enough to match common market-chat questions, which can cause the skill to activate unexpectedly in ordinary conversation. Because the skill appears to invoke remote analysis and automatic charging, overbroad triggering increases the chance of unintended network calls and surprise paid actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest presents the skill as a multi-dimensional contract signal analysis engine that scans the market and produces independent long/short judgments. However, the code here does not implement that analysis logic locally; as stated in the module docstring and shown by the HTTP calls, it merely forwards requests to a remote API and returns the server response.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code makes outbound requests to a hard-coded external IP-based host with no visible disclosure to the user. Because the skill claims to be an analysis engine, hidden remote execution/delegation materially changes the trust model and can expose prompts, symbols queried, and identifiers to infrastructure the user did not knowingly choose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The client transmits a user identifier in an HTTP header to a remote service without any notice, consent, or explanation to the user. In this skill context, the tool is presented as a market-analysis engine, so silent identity transmission to an external server is more concerning because users may reasonably expect local processing or at least explicit disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

For a skill described as a contract signal analysis engine, accessing local environment configuration for host routing and user identification is not part of the stated analytical purpose. The environment-derived user ID is then transmitted to the backend, adding a local configuration and identity-handling capability that the manifest does not describe.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The payment-required message is hard-coded in Chinese, which imposes a specific language on users regardless of locale or preference. The file contains no language selection, fallback, or opt-in mechanism to justify this constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.