Back to skill

Security audit

Lottery Predictor V3 8

Security checks for vulnerabilities and agentic risk

Overview

This is a local lottery prediction/backtesting skill with some documentation and dependency hygiene issues, but no evidence of hidden, destructive, or exfiltrating behavior.

Install this only if you are comfortable with a Chinese-language lottery tool that reads a local OpenClaw lottery SQLite database and may write backtest reports in the OpenClaw workspace. Prefer a virtual environment and pinned dependencies, and treat all lottery predictions as entertainment rather than reliable financial guidance.

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
SKILL.md:151
Finding

Unpinned Third-Party Python Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:151-153, README.md:14-18, and package.json:39-43
Vulnerability Type: Unpinned supply-chain dependencies
Risk Level: Medium

Vulnerable Code

SKILL.md:151-153:

bash
pip3 install scikit-learn numpy pandas

README.md:14-18:

bash
pip3 install scikit-learn numpy pandas

package.json:39-43:

json
"pip": [
  "scikit-learn",
  "numpy",
  "pandas"
]

Technical Analysis

The project instructs users and package tooling to install three third-party Python packages without exact version constraints, integrity hashes, or a lock file. Dependency resolution therefore selects package versions available from the configured Python package index at installation time rather than a reproducible set of previously reviewed artifacts.

Python package installation may execute package build-system or installation code with the privileges of the user running pip. If a selected dependency release, transitive dependency, package-index account, distribution artifact, or configured package mirror is compromised, the effective installation behavior can change after this project has been audited.

The reviewed project does not reference an untrusted package index or an apparent typosquatted package. The risk arises from unrestricted and non-reproducible dependency resolution rather than evidence that the currently named packages are malicious.

Attack Path

  1. An attacker compromises a declared dependency, one of its transitive dependencies, its publishing account, or a package mirror used by the victim.
  2. The attacker publishes an affected distribution containing malicious build or installation behavior.
  3. A user follows the documented pip3 install scikit-learn numpy pandas command, or compatible Skill tooling processes the unpinned pip requirements.
  4. The package resolver selects and downloads the attacker-controlled rele ...[truncated 727 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed requirements file that pins every direct and transitive dependency to an exact version.

  2. Record cryptographic hashes for all accepted distributions and enforce them with:

    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Generate and maintain the lock file with a dependency-management tool such as pip-tools, and review dependency changes before updating it.

  4. Prefer binary wheels from the official package index where appropriate, and explicitly configure trusted package indexes rather than inheriting uncontrolled mirror settings.

  5. Run dependency installation in a dedicated virtual environment or restricted container without administrator privileges.

  6. Add automated dependency vulnerability and provenance scanning to the release process.

  7. Update SKILL.md, README.md, and package.json so that all installation paths reference the same pinned and verified dependency set.

Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This second mismatch finding reinforces that the skill's metadata and narrative cannot be trusted as an accurate representation of runtime behavior. Undisclosed local database access and misleading claims about model structure and accuracy increase operational risk, especially in agent ecosystems where permissions, trust, and user expectations depend heavily on the manifest.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This second mismatch finding reinforces that the skill's metadata and narrative cannot be trusted as an accurate representation of runtime behavior. Undisclosed local database access and misleading claims about model structure and accuracy increase operational risk, especially in agent ecosystems where permissions, trust, and user expectations depend heavily on the manifest.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises code-related dependencies and references scripts that can write output files, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: a host may allow broader execution than users expect, and reviewers cannot easily verify whether file-writing behavior is intended or constrained.

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 natural-language strings and docstrings entirely in Chinese, including the title, usage notes, and author-facing descriptions. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header states both that V3.8 uses 'Gradient Boosting 预测蓝球' and that it is '简化模型(只用随机森林)', which is internally contradictory, and the implementation does in fact still train a GradientBoostingClassifier for blue-ball prediction at L178-L212. Separately, the docstring and output text claim reduced or recent-500-period training, but CONFIG actually uses 2000 rows at L42 and main prints that value at L358, so the documentation actively misdescribes what the code trains on.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description is written entirely in Chinese and the rest of the skill instructions and trigger examples are also Chinese-only, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless it is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The package description is written entirely in Chinese, which indicates a language-specific presentation without offering any language choice or noting that the skill is region/language-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest describes a 双色球预测工具 focused on machine-learning prediction, while this file implements persistent report generation by creating a markdown file under the user's workspace. Writing reports is not inherently malicious, but it is a behavior beyond pure prediction/backtesting semantics stated in the manifest.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

For a lottery prediction skill, training on historical data is expected, but automatically persisting markdown reports to a hard-coded location is an additional capability unrelated to generating predictions themselves. The fixed path under ~/.openclaw/workspace also assumes access to a broader user directory context than the manifest description suggests.

Content

No source excerpt is available for this finding.