Back to skill

Security audit

Thunder Core

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it can start or cancel real Thunder downloads, pass cookies, and includes a direct-run test that downloads an unrelated executable without confirmation.

Review before installing. Use it only for explicit Thunder/Xunlei download tasks, avoid passing cookies unless necessary, confirm destinations before committing downloads, do not run the module directly as a test, and avoid administrator shells unless you understand the COM registration issue.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T08 · Insecure Dependencies

Note
Location
SKILL.md:25
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 25
Vulnerability Type: Unpinned dependency and insufficient supply-chain integrity controls
Risk Level: Low

Vulnerable Code

markdown
**Prerequisites**: Windows OS with Thunder client installed. Python packages: `pywin32` (`pip install pywin32`).

Technical Analysis

The installation instructions direct users to install pywin32 without specifying an audited version or cryptographic hash. Consequently, the package version and installation artifacts can change after the skill has been reviewed.

The command also relies on the user's configured Python package indexes. If an index, package release, network configuration, or package-management environment is compromised, a malicious or unexpectedly modified distribution could be installed. Python packages may execute build or installation logic, making dependency installation a code-execution boundary.

No evidence indicates that pywin32 itself is malicious. The issue is the lack of version and integrity controls around its installation.

Attack Path

  1. A user follows the prerequisite and executes pip install pywin32.
  2. pip resolves the latest compatible release through the user's configured package indexes.
  3. An attacker compromises a configured index, a future package release, or the dependency delivery chain.
  4. The user retrieves the compromised distribution because no version or hash is pinned.
  5. Malicious package installation logic executes with the privileges of the user running pip.

Impact Assessment

Successful exploitation could execute arbitrary code under the installing user's account and affect that user's files, Python environment, credentials accessible to the process, and network resources. If the installation command is run from an elevated administrator shell, the impact could extend to system-wide Python files and other resources available to that adminis ...[truncated 133 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin pywin32 to a specific version that has been reviewed and tested.

  • Publish a lock file or requirements file containing cryptographic hashes.

  • Require hash verification during installation, for example:

    text
    pywin32==<reviewed-version> --hash=sha256:<verified-hash>
    
  • Recommend installation from the official Python Package Index or an authenticated, organization-controlled mirror.

  • Document the expected package publisher and verification procedure.

  • Periodically review and deliberately update the pinned version rather than implicitly accepting every future release.

  • Advise users not to run dependency installation with administrator privileges unless system-wide installation is explicitly required.

T09 · Insecure Skill Coding Practices

Note
Location
thunder_core.py:145
Finding

Automatic External Executable Download When the Module Is Run Directly

Content
View full analysis

Vulnerability Details

File Location: thunder_core.py, lines 145-153
Vulnerability Type: Unconfirmed network and filesystem side effect in executable example code
Risk Level: Low

Vulnerable Code

python
if __name__ == "__main__":
    # Test
    result = download(
        url="https://ollama.com/download/OllamaSetup.exe",
        save_path="F:\\Ollama\\OllamaSetup.exe"
    )
    print(f"Download task added: {result}")

The comments and output text above are translated into English for reporting; the executable statements, URL, and path are unchanged.

Technical Analysis

Executing python thunder_core.py immediately attempts to initialize Thunder and queue the download of an external Windows executable. The operation requires no command-line argument, explicit confirmation, or test-mode option.

This behavior creates network and filesystem side effects merely from running what is otherwise presented as a reusable library module. The downloaded artifact is obtained at runtime, so its bytes are not part of the audited project. The code does not verify a checksum, signature, expected size, or final content before storing it.

The module does not execute the downloaded file, and the fixed HTTPS URL is not attacker-controlled through local input. Therefore, this is not confirmed remote payload execution under T03. It is an insecure coding practice involving an unexpected executable download and absent artifact verification.

Attack Path

  1. A user, test runner, packaging process, or automation job executes python thunder_core.py.
  2. The __main__ block invokes download() without requesting confirmation.
  3. The code initializes the installed Thunder COM component.
  4. Thunder queues a request to https://ollama.com/download/OllamaSetup.exe.
  5. The returned content is written to F:\Ollama\OllamaSetup.exe without local integrity validation.
  6. The operation consumes network band ...[truncated 777 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the live-download behavior from the module's __main__ block.
  • Move integration tests that perform downloads into a separate, clearly identified test script.
  • Require explicit command-line URL and destination arguments rather than embedding an unrelated executable URL.
  • Require affirmative user confirmation before initiating a download in an interactive example.
  • Use a harmless local fixture or mock COM object for routine tests.
  • If downloading executable artifacts is a supported workflow, validate an expected cryptographic digest and, where applicable, the publisher's digital signature before treating the file as trusted.
  • Avoid fixed destination paths; validate a user-selected destination and define an explicit overwrite policy.
  • Ensure documentation clearly distinguishes importing the library from intentionally running a network-enabled command-line interface.
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill description and notes describe functionality but omit clear user-facing warnings that it can initiate external downloads, write files to disk, send custom headers such as cookies, and control a local desktop application's task state. Without these warnings, users may not understand the privacy and system-impacting consequences of using the skill, increasing the chance of unsafe or uninformed use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad terms like 'download', 'thunder', and 'manage downloads', which are likely to match normal user conversation and invoke the skill unintentionally. Because this skill can create and manage real download tasks through a Windows COM interface, accidental activation can cause unauthorized network activity, file writes, or disruption of existing download jobs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file handles a safety-relevant operation by taking a cookie parameter and passing it into AddTask, which may transmit authentication or session data to the external Thunder download engine. Although parameters are documented, there is no confirmation prompt or explicit warning that sensitive credentials may be used or sent as part of the request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

add_and_commit triggers a download to save_path and immediately commits the task, which affects the local filesystem by creating or overwriting downloaded content. The file contains basic docstrings but no explicit user disclosure, confirmation, or warning about starting downloads and writing data to disk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest includes multiple blocks of unrelated Bilibili 'learning' content that have no functional connection to a Thunder download-control skill. Extraneous content in a skill manifest increases supply-chain risk by hiding meaningful changes, complicating review, and signaling poor integrity controls over the package contents.

Content

No source excerpt is available for this finding.