Back to skill

Security audit

LegionSpace 大群空间版本查询

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent LegionSpace version-checking skill, but it automatically installs unpinned dependencies and forces direct network connections in ways users should review before running.

Install only if you are comfortable with the skill contacting the listed app-store sites, bypassing configured proxies during the run, and installing Python packages plus Playwright Chromium on demand. Prefer running it in an isolated virtual environment or container, and review or preinstall pinned dependencies yourself before execution.

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/大群空间版本查询.sh:34
Finding

Automatic Installation of Unpinned Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: scripts/大群空间版本查询.sh, lines 34-47
Vulnerability Type: Supply-chain exposure through unpinned dependencies and dynamically downloaded browser components
Risk Level: Medium

bash
# requests
if ! $PYTHON -c "import requests" 2>/dev/null; then
    echo "[*] 安装 requests ..."
    $PYTHON -m pip install requests --quiet
fi
echo "[OK] requests"

# playwright
if ! $PYTHON -c "from playwright.sync_api import sync_playwright" 2>/dev/null; then
    echo "[*] 安装 playwright ..."
    $PYTHON -m pip install playwright --quiet
    echo "[*] 安装 Chromium (playwright) ..."
    $PYTHON -m playwright install chromium --with-deps 2>/dev/null || \
    $PYTHON -m playwright install chromium 2>/dev/null
fi

Technical Analysis

The documented entry script automatically installs requests, playwright, Chromium, and potentially Chromium operating-system dependencies when they are absent. The Python package installations do not specify versions, hashes, a lockfile, or a fixed trusted package index. The Chromium artifact is also selected and downloaded dynamically.

As a result, the source code reviewed in this audit does not fully determine which third-party code will be installed and executed. Package resolution is affected by the configured Python package index, mirrors, local pip configuration, and the package versions available when the script runs. If any relevant package repository, mirror, release, or artifact distribution channel is compromised, a malicious component could be supplied to the user.

The --with-deps option further expands the installation scope by permitting Playwright's installer to request operating-system dependencies. The exact privilege impact depends on the host configuration and the privileges under which the script is invoked.

Attack Path

  1. A user runs the documented scripts/大群空间版本查询.sh entry point.
  2. The script d ...[truncated 1237 chars]
Remediation
View remediation

Remediation Suggestions

  1. Move Python dependencies into a reviewed lockfile with exact versions and cryptographic hashes.

  2. Install them with hash verification, for example:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Configure a fixed, trusted package index and prevent unexpected fallback to untrusted or environment-controlled mirrors.

  4. Pin the Playwright version and its corresponding Chromium revision, and verify downloaded browser artifacts using trusted checksums or signatures.

  5. Remove automatic dependency installation from the runtime entry point. Provide a separate, explicit setup procedure that requires user approval.

  6. Avoid automatically invoking playwright install --with-deps. Document required operating-system packages and let administrators install reviewed versions through the platform's package-management process.

  7. Run the Skill in an isolated virtual environment or container under a dedicated, unprivileged account.

  8. Add dependency vulnerability and integrity checks to the release process, and update pinned versions only after review and testing.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares executable behavior that uses environment access, network access, and local file writes, but it does not declare any tool scope such as permissions or allowed-tools. This weakens review and enforcement boundaries, making it easier for an agent to invoke code with broader side effects than a user may expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that the entry script will automatically install Python dependencies and Chromium, but it does not present this as a clear pre-execution warning or require user confirmation. Automatic package and browser installation introduces supply-chain and system-modification risk, especially in environments where skill execution is expected to be read-only or minimally invasive.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script globally sets no_proxy/NO_PROXY to '*' before making outbound requests, forcing all connections to bypass configured proxies. In managed environments, this can circumvent monitoring, egress controls, DLP inspection, or corporate routing policies, which is unnecessary for a simple version-checking skill and makes the behavior more suspicious in context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically installs Python packages and Playwright browser binaries at runtime, which modifies the host system and expands the skill's capabilities beyond a read-only version check. This creates supply-chain and environment integrity risk because executing the skill can pull and run unpinned third-party code and dependencies from external sources without explicit user approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill writes results to a local file, but this side effect is not prominently disclosed as a warning before execution. Undisclosed file creation can surprise users, overwrite expectations about workspace cleanliness, and become more problematic in sensitive or restricted environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file's natural-language interface and descriptions are written entirely in Chinese, including the tool description and all user-facing console output, with no indication of language choice or opt-in. Under the stated policy, forcing a specific language without user selection is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code file makes HTTP requests to external app-store services, beginning with the iTunes Lookup API call at L035 and similarly via Playwright page loads in later handlers. Although the script's purpose is version checking, the code does not include an explicit disclosure that it will contact third-party services and transmit system/network metadata such as IP address and user-agent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest scopes the skill to checking LegionSpace's latest versions across app stores. While network access is expected for that purpose, the code also persists the aggregated results to a local file (LegionSpace_versions.txt), which is an additional side effect not described in the manifest or module documentation.

Content

No source excerpt is available for this finding.