Back to skill

Security audit

ssq-analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent as a paid lottery-analysis tool, but its payment verification is locally forgeable and its paid generator can be run directly, so users should review it before installation.

Install only if you are comfortable with a Chinese-first lottery-analysis skill that writes a local SQLite database, Markdown report, and order JSON files. Do not put sensitive personal details in the order question. Treat the paid-feature enforcement as weak client-side gating, and avoid the optional npx sandbox command unless you trust the clawtip package and registry path.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/service.py:27
Finding

Payment Credential Validation Can Be Forged

Content
View full analysis
bool: credential = order_data.get("payCredential") if not credential: return False credential_ts = order_data.get("credentialTimestamp") if credential_ts and time.time() - credential_ts > CREDENTIAL_TTL: return False return True ``` ```python order_data = load_order(indicator, args.order_no) if is_credential_valid(order_data): pay_status = order_data.get("payStatus", "SUCCESS") if pay_status == "SUCCESS" or pay_status == "TEST_SUCCESS": print("\n" + "=" * 60) print(" Payment Verified - Adding Recommendation Numbers") print("=" * 60) recommendation = run_paid_recommendation() print(recommendation) ``` ### Technical Analysis The payment authorization decision trusts fields read from a locally writable JSON file. Any nonempty `payCredential` value is treated as valid. The code does not cryptographically verify: - The credential issuer or signature. - The order number associated with the credential. - The required payment amount. - The payment recipient. - The Skill indicator. - Whether the credential has already been used. - Whether the payment provider actually reported a successful transaction. The timestamp check is also optional: a credential without `credentialTimestamp` never expires. In addition, a missing `payStatus` defaults to `"SUCCESS"`, causing incomplete or attacker-created records to be accepted. ### Attack Path 1. Create an ordinary local order by running `scripts/create_order.py`, or create an order JSON file with a valid numeric filename. 2. Edit the order file under `~/.openclaw/skills/orders//.json`. 3. Add an arbitrary nonempty value such as: ```json { ...[truncated 694 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/recommend_ssq.py:186
Finding

Paid Recommendation Generator Can Be Executed Directly

Content
View full analysis
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Note
Location
scripts/service.py:123
Finding

Service Unconditionally Reports Successful Payment Status

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:110
Finding

Documented Sandbox Workflow Downloads and Executes Registry-Hosted Code

Content
View full analysis
-i -v 1.0.12 ``` ### Technical Analysis The documented sandbox workflow instructs developers to use `npx`, which can download and execute package code from the configured npm registry. The package version is pinned, reducing unintended version drift, but the project does not provide or verify an expected package integrity hash or signature. The behavior is not required for the free lottery-analysis functionality and is documented only for sandbox payment testing. Nevertheless, users who follow the instruction execute third-party code with their local account's privileges. ### Attack Path 1. A developer follows the sandbox testing instructions. 2. `npx` resolves and downloads `@clawtip/clawtip-sandbox-cli@1.0.0` from the configured registry or package cache. 3. Package lifecycle or runtime code executes under the developer's account. 4. If the package, registry response, local cache, or registry configuration is compromised, attacker-controlled code can execute with the user's available filesystem, environment, and network access. ### Impact Assessment A compromised package or distribution channel could execute arbitrary code with the invoking user's privileges, potentially accessing files, environment variables, and network resources available to that user. No evidence was found that the referenced package is currently malicious; the finding concerns the unsafe trust and execution model. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A description-behavior mismatch involving local order storage and payment infrastructure without corresponding lottery-analysis implementation is a real trust and security issue. The skill context makes this more concerning because it combines monetization, credential access, filesystem access, and claims of third-party verification, which could be used to normalize unnecessary sensitive operations for a relatively simple analysis task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A description-behavior mismatch involving local order storage and payment infrastructure without corresponding lottery-analysis implementation is a real trust and security issue. The skill context makes this more concerning because it combines monetization, credential access, filesystem access, and claims of third-party verification, which could be used to normalize unnecessary sensitive operations for a relatively simple analysis task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A description-behavior mismatch involving local order storage and payment infrastructure without corresponding lottery-analysis implementation is a real trust and security issue. The skill context makes this more concerning because it combines monetization, credential access, filesystem access, and claims of third-party verification, which could be used to normalize unnecessary sensitive operations for a relatively simple analysis task.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring asserts that no personal information is stored, but the script persists the user-provided question field into the local order JSON. User questions can easily contain personal, financial, health, or account data, so this is a misleading privacy claim that can cause unconsented local retention of sensitive information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a lottery analysis skill with paid-tier recommendation delivery, but this file implements local order creation, payment-recipient handling, encryption of payment metadata, and persistence of user questions to an order store. Payment workflow support may be related to monetization, but those operations are materially different from the described statistical-analysis functionality and are not reflected in the manifest description itself.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code reads CLAWTIP_PAY_TO and CLAWTIP_SM4_KEY from environment variables and uses them to prepare encrypted payment payloads for fee processing. While the manifest mentions a paid tier, it does not state that the skill itself handles payment credentials or cryptographic payment-order generation, which is a distinct capability from SSQ data analysis and recommendation generation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

The script creates a persistent local order record containing payment metadata and the user’s question under a predictable per-skill path. Even without network exfiltration, unnecessary session persistence can expose sensitive user input to other local users, backups, logs, or later compromise, especially because the skill context involves paid transactions and free-form user text.

Content

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

python
if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Create SSQ analyzer order")
    parser.add_argument("question", help="User question / consultation content")
    args = parser.parse_args()

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Several docstrings and user-facing error messages are written only in Chinese, such as the file-missing error and function descriptions. This imposes a specific language on users and maintainers without offering a language choice or documenting a justified locale constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest focuses on lottery-data analysis and paid recommendation delivery, but this code reads arbitrary prior order records from a hidden application directory. That behavior is not described as part of the skill's user-visible scope, creating a description-to-code mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes fetching draw data, computing statistics, and delivering paid recommendations, but this file implements persistent local storage of order data under a user home directory. Storing and managing order records is not mentioned in the skill description and goes beyond the stated analytics-focused behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and all user-facing messages are written only in Chinese, and the skill presents no option for users to select another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the restriction is clearly justified as region-specific.

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/service.py (reported line 44)May include surrounding context.

python
def run_free_analysis() -> str:
    """Run data fetch + free analysis. Always available."""
    print("[STEP 1/3] Fetching latest SSQ data from cwl.gov.cn...")
    result = subprocess.run(
        [sys.executable, FETCH_SCRIPT],
        capture_output=True, text=True, timeout=120
    )

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/service.py (reported line 55)May include surrounding context.

python
raise RuntimeError("Data fetch failed")

    print("\n[STEP 2/3] Generating free analysis report...")
    result = subprocess.run(
        [sys.executable, ANALYZE_SCRIPT],
        capture_output=True, text=True, timeout=120
    )

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/service.py (reported line 74)May include surrounding context.

python
def run_paid_recommendation() -> str:
    """Run recommendation generation (only after payment verification)."""
    print("\n[STEP 3/3] Generating paid recommendation numbers...")
    result = subprocess.run(
        [sys.executable, RECOMMEND_SCRIPT],
        capture_output=True, text=True, timeout=120
    )

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest focuses on fetching official draw data and computing lottery statistics, which reads as an analysis capability. This script also persists the generated report to disk as 最新分析结果.md, adding a file-writing side effect not mentioned in the manifest description, even though the rest of the behavior aligns with the stated analytics purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

Line L172 prints the failure message only in Chinese (订单创建失败), which imposes a specific language on users in a general-purpose script. The file does not offer language selection, fallback messaging, or indicate that the skill is intentionally limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The save_order function creates directories and writes JSON order data into a user-home storage path, but there is no confirmation prompt, log message, or explicit user disclosure around this persistence behavior. Because this is a code file, file writes that affect user data should include some visible warning unless the disclosure is provided elsewhere.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The report path uses a fixed Chinese filename (最新分析结果.md), which embeds a specific language/locale choice in the skill behavior. In this code file there is no indication that users can choose a locale or that the Chinese-only naming is required for a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.