Back to skill

Security audit

Free A Share Real Time Data

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed market-data helper, with manageable setup and dependency risks but no evidence of hidden, destructive, or deceptive behavior.

Install only in a virtual environment or container, prefer pinned and hash-verified dependencies if you rely on this in production, and treat the trading-hour bypass as a data-quality choice rather than a guarantee that market data is valid for every timestamp.

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
scripts/setup_and_verify.py:17
Finding

Unpinned and Unverified Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/setup_and_verify.py:17-22; installation is also documented at SKILL.md:11-17
Vulnerability Type: Supply-chain risk caused by mutable, unverified dependencies
Risk Level: Medium

Vulnerable Code

scripts/setup_and_verify.py:17-22:

python
def install():
    """Install mootdx via pip."""
    print("Installing mootdx...")
    subprocess.check_call([sys.executable, "-m", "pip", "install", "mootdx"])
    print()

SKILL.md:11-17:

markdown
## Installation

```bash
pip install mootdx

mootdx depends on tdxpy internally. Both are installed together.

text

### Technical Analysis

The installation process requests `mootdx` without a pinned version, dependency lockfile, package hash, or explicitly controlled package index. Pip therefore resolves the package and its transitive dependencies, including `tdxpy`, using the active package-index configuration at execution time.

The effective installed code can consequently change after this project has been reviewed. Package installation can execute package-controlled build and installation logic, while imported dependencies subsequently execute with the privileges of the user running the verification script. Running the script without `--check` invokes this installation automatically before package verification.

This does not prove that the current `mootdx` package is malicious. The vulnerability is the absence of controls ensuring that the installed artifacts are the exact versions and contents that were reviewed.

### Attack Path

1. An attacker compromises a future `mootdx` release, one of its transitive dependencies, or a package index configured in the execution environment.
2. The attacker publishes or serves a malicious package version that satisfies the unconstrained dependency request.
3. A user or automated Agent follows the documented instructions or runs `scripts/setup_a
...[truncated 1120 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin mootdx and every transitive dependency to versions that have been reviewed.

  2. Generate a lockfile or requirements file containing cryptographic hashes for all distributions.

  3. Install dependencies with hash verification, for example:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  4. Use an explicitly configured, trusted package repository or an internally controlled package mirror.

  5. Separate setup from verification. The verification script should fail with clear installation instructions rather than automatically modifying the environment.

  6. Perform installation in an isolated virtual environment or container under a non-privileged account.

  7. Add dependency vulnerability and provenance checks to CI, and review dependency updates before regenerating the lockfile.

  8. Update SKILL.md so its installation instructions use the same pinned, hash-verified dependency manifest.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill includes shell execution instructions (pip install, running verification/demo scripts) but does not declare any tool scope such as permissions or allowed-tools. That mismatch weakens policy enforcement and transparency, because an agent or reviewer cannot reliably tell from the manifest that the skill expects command execution and network/package-install behavior.

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

python
def install():
    """Install mootdx via pip."""
    print("Installing mootdx...")
    subprocess.check_call([sys.executable, "-m", "pip", "install", "mootdx"])
    print()

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 · scripts/setup_and_verify.py (reported line 31)May include surrounding context.

python
ok = True
    for pkg, label in [("mootdx", "mootdx"), ("tdxpy", "tdxpy (internal dep)"), ("pandas", "pandas")]:
        try:
            mod = __import__(pkg)
            ver = getattr(mod, "__version__", "OK")
            print(f"  [OK] {label} — {ver}")
        except ImportError:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script monkey-patches tdxpy.hq.time_frame to always return True, globally disabling the library's trading-hour gate without user opt-in. In this skill context, that can cause the tool to fetch or present market/tick data outside intended constraints, producing misleading results and bypassing upstream safety or business logic checks in dependent workflows.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.