Back to skill

Security audit

Avalanche Analytics AVAX生态分析

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly an Avalanche analytics helper, but it includes under-disclosed paid-access code that sends wallet identifiers to SkillPay and exposes a payment API key.

Review this skill before installing. Its analytics content is straightforward, but paid-use enforcement should be clearly disclosed, the exposed SkillPay key should be rotated and removed, and users should know that wallet identifiers may be sent to SkillPay for verification.

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

other

Warning
Location
payment.py:30
Finding

Undisclosed Transmission of Wallet-Identifying Data to a Third Party

Content
View full analysis

Vulnerability Details

File Location: payment.py:30-47
Vulnerability Type: Undisclosed external transmission of wallet data
Risk Level: Medium

python
data = json.dumps({
    "skill_slug": SKILL_SLUG,
    "user_address": user_address,
    "timestamp": datetime.utcnow().isoformat()
}).encode('utf-8')

req = urllib.request.Request(
    f"{SKILLPAY_API_URL}/verify",
    data=data,
    headers=headers,
    method='POST'
)

with urllib.request.urlopen(req, timeout=10) as response:
    result = json.loads(response.read().decode('utf-8'))
    return result

Technical Analysis

The verify_payment() function sends a user-supplied blockchain wallet address to https://api.skillpay.io/v1/verify, together with a stable Skill identifier and a precise timestamp.

A wallet address is a persistent pseudonymous identifier whose public blockchain activity can be analyzed and correlated. The external service can associate the wallet with use of this specific Skill and the time of access. The Skill documentation does not disclose this transfer, identify the recipient, state a retention policy, or request informed user consent.

Payment verification may legitimately require an account or transaction identifier, but transmitting a wallet address is not necessary for the Skill's declared Avalanche analytics and validator-calculation functionality. This network behavior therefore exceeds the minimum privileges required for the core analytics features.

Attack Path

  1. A caller obtains or supplies a user's Avalanche-compatible wallet address.
  2. The caller passes that address to require_payment(user_address).
  3. require_payment() invokes verify_payment(user_address).
  4. The function serializes the wallet address, Skill slug, and timestamp into JSON.
  5. The data is sent through an authenticated HTTPS POST request to the third-party SkillPay endpoint.
  6. The recipient can retain or correlat ...[truncated 733 chars]
Remediation
View remediation

Remediation Suggestions

  1. Document the network request prominently in SKILL.md, including:
    • The destination domain.
    • Every transmitted field.
    • The purpose of collection.
    • Data retention and deletion policies.
    • Whether data is shared with additional parties.
  2. Obtain explicit user consent before transmitting a wallet identifier.
  3. Invoke payment verification only when a user explicitly requests a paid operation.
  4. Prefer a payment receipt, signed nonce, transaction identifier, or privacy-preserving proof rather than a reusable wallet address.
  5. Minimize transmitted metadata and avoid sending precise timestamps unless strictly required.
  6. Isolate the optional payment module from the analytics execution path.
  7. Provide a privacy-preserving offline or locally verifiable payment mechanism where feasible.

T09 · Insecure Skill Coding Practices

Warning
Location
payment.py:15
Finding

Hard-Coded Payment API Credential in Distributed Project Files

Content
View full analysis

Vulnerability Details

File Location: payment.py:15 and _meta.json:14
Vulnerability Type: Hard-coded secret
Risk Level: Medium

payment.py contains the credential directly in executable source:

python
SKILLPAY_API_KEY = "sk_f03aa8f8bbcf79f7aa11c112d904780f22e62add1464e3c41a79600a451eb1d2"

The same credential is duplicated in _meta.json:

json
"apiKey": "sk_f03aa8f8bbcf79f7aa11c112d904780f22e62add1464e3c41a79600a451eb1d2"

The credential is then used as a bearer token:

python
headers = {
    "Authorization": f"Bearer {SKILLPAY_API_KEY}",
    "Content-Type": "application/json"
}

Technical Analysis

A bearer API credential is embedded in both source code and distributable metadata. Anyone who can download, inspect, cache, or redistribute the Skill can recover and reuse the credential. Source code and metadata cannot provide confidentiality for a shared secret.

Because bearer tokens generally confer access based solely on possession, an attacker does not need additional proof of identity. The credential must be treated as compromised even if its exact server-side permissions are unknown.

Attack Path

  1. An attacker downloads or otherwise accesses the Skill package.
  2. The attacker reads payment.py or _meta.json.
  3. The attacker extracts the sk_... bearer credential.
  4. The attacker constructs requests to the SkillPay API with the header Authorization: Bearer <extracted-key>.
  5. Subject to the credential's server-side permissions, the attacker can consume API resources, impersonate this Skill, query verification behavior, or cause quota and billing abuse.

No claim is made that the key grants administrative access; the precise scope depends on controls implemented by the external API.

Impact Assessment

Potential impact includes:

  • Unauthorized use of the SkillPay API.
  • Impersonation of the distributed Skill when calling the pa ...[truncated 447 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed credential.
  2. Remove the key from payment.py, _meta.json, repository history, release archives, logs, and cached build artifacts.
  3. Load credentials at runtime from a protected secret manager or environment variable controlled by the deployment operator.
  4. Do not distribute a shared server-side secret to end-user installations.
  5. Prefer short-lived, per-installation credentials obtained through an authenticated exchange.
  6. Restrict the credential server-side to the minimum endpoint and operations required.
  7. Apply rate limits, anomaly detection, rotation policies, and usage alerts.
  8. Review API logs for unauthorized use of the exposed credential.
  9. Add automated secret scanning to the development and release pipeline.

T09 · Insecure Skill Coding Practices

Warning
Location
payment.py:69
Finding

Environment-Controlled Payment Verification Bypass

Content
View full analysis

Vulnerability Details

File Location: payment.py:69-72
Vulnerability Type: Fail-open authorization bypass
Risk Level: Medium

python
# Check whether an environment variable skips verification (test mode)
if os.environ.get('SKILLPAY_SKIP_VERIFICATION') == 'true':
    print("⚠️  [DEV MODE] Payment verification skipped")
    return True

Technical Analysis

The require_payment() authorization decision can be forced to succeed by setting the SKILLPAY_SKIP_VERIFICATION environment variable to the literal value true. The bypass does not require a signed development configuration, restricted test build, privileged control channel, or other authentication.

Environment variables are often controllable by the user launching a local process, container configuration, CI job, wrapper script, or hosting configuration. If such a user is not already trusted to bypass payment, this creates a direct fail-open access-control weakness.

The bypass affects payment gating only if an integration relies on require_payment() as its authorization control. The supplied monitoring script does not import or invoke this function.

Attack Path

  1. An attacker gains the ability to launch or configure the process that uses the Skill.
  2. The attacker sets SKILLPAY_SKIP_VERIFICATION=true.
  3. The application calls require_payment().
  4. The function returns True before calling the remote payment verifier.
  5. The surrounding application interprets the result as successful payment authorization and grants access to paid functionality.

Example process invocation:

bash
SKILLPAY_SKIP_VERIFICATION=true python3 application_using_payment_module.py

Impact Assessment

If payment verification is integrated as the sole authorization gate, an attacker can obtain access to paid Skill functionality without completing payment. Potential consequences include:

  • Unauthorized use of paid features.
  • Reve ...[truncated 345 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the environment-controlled bypass from production distributions.
  2. Use dependency injection or a mock verification client in automated tests instead of production bypass logic.
  3. If a development mode is essential, compile or package it only in a clearly separate non-production build.
  4. Require a cryptographically authenticated administrative configuration rather than a user-controlled environment variable.
  5. Make authorization fail closed when verification cannot be performed.
  6. Ensure the server or trusted host independently enforces payment instead of relying solely on client-side Python code.
  7. Add tests confirming that production builds cannot return successful authorization without a valid verifier response.
  8. Log verification decisions without recording unnecessary wallet or credential data.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a serious description-behavior mismatch: a skill presented as Avalanche analytics reportedly performs payment-gating, calls an external SkillPay API, uses or exposes a hardcoded API key, and emits payment links and billing details on a different chain. Hidden monetization/authentication logic and embedded credentials are dangerous because they can mislead users, exfiltrate data to third parties, and enable unauthorized use of secrets or deceptive payment flows.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
74% confidence
Finding

The skill manifest does not declare any tool/permission boundaries, yet the analyzed content indicates capabilities consistent with environment access, file writing, and network use. When a skill can access these resources without explicit scoping, reviewers and runtime policy layers may not correctly constrain it, increasing the chance of overprivileged execution or unnoticed data exfiltration.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description says the skill triggers whenever a user needs to analyze the Avalanche ecosystem, evaluate AVAX projects, monitor subnet development, or get Avalanche intelligence. These conditions are high-level and open-ended, with no explicit trigger phrases, scope limits, or exclusion examples, which could cause unintended invocation for general crypto questions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description and the substantive user-facing content are presented in Chinese, which effectively imposes a language preference on users. There is no indication that the skill offers multilingual output, user opt-in, or a documented reason for restricting the skill to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description is written entirely in Chinese, which indicates a language-specific experience without any visible note that users can choose another language. Under the policy rules, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The file contains a hardcoded SkillPay API key alongside the external API endpoint. Embedding a live secret in source code is dangerous because anyone with code access can extract and abuse it to query or act against the payment API, potentially causing unauthorized verification, account misuse, or billing-related compromise.

Content

Scanner excerpt · payment.py (reported line 15)May include surrounding context.

python
from datetime import datetime

# SkillPay API 配置
SKILLPAY_API_URL = "https://api.skillpay.io/v1"
SKILLPAY_API_KEY = "sk_f03aa8f8bbcf79f7aa11c112d904780f22e62add1464e3c41a79600a451eb1d2"
SKILL_SLUG = "shenmeng-avalanche-analytics"
PRICE = "0.01"  # USDT

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes an Avalanche ecosystem analysis tool for subnet analysis, DeFi monitoring, project evaluation, and intelligence gathering. This file instead implements SkillPay payment verification and access control logic, which is not mentioned in the skill description and is not an obvious part of Avalanche analytics functionality itself.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

For an Avalanche analytics skill, verifying off-platform payments through SkillPay and directing users to a payment portal on BNB Chain is a distinct monetization capability rather than an analytics capability. The manifest does not state that the skill performs payment checks or interacts with a third-party billing service, so this capability is contextually out of scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function transmits a user wallet address and timestamp to an external service without any visible consent flow, disclosure, or minimization. Wallet addresses are persistent identifiers that can be correlated with on-chain activity, so undisclosed transmission creates privacy risk and potential user deanonymization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file’s user-facing descriptions and formatted reports are written entirely in Chinese, indicating a fixed language choice. Under the policy, locale or language constraints should not be imposed without user opt-in or a clearly documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and user-facing payment instructions are presented in Chinese, which imposes a language choice on users without opt-in or an alternative locale path. This can violate language/locale policy where skills should not force a specific language unless clearly justified or user-selected.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes Avalanche ecosystem analysis, monitoring, evaluation, and intelligence gathering, which suggests producing analytics for the user. In addition to generating reports, the script persists data to /tmp as a JSON file, which is extra behavior not stated in the manifest and goes beyond pure analysis output.

Content

No source excerpt is available for this finding.