Back to skill

Security audit

DiT360 Panorama Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it automatically installs an unpinned dependency and starts a background file server with broader network exposure than users are told.

Install only if you are comfortable sending prompts to Hugging Face, allowing the script to install Python packages from the network, and running a local file server. Prefer reviewing or modifying it first to pin dependencies, use an isolated virtual environment, bind the server to 127.0.0.1, and add a clear shutdown path.

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

Warning
Location
scripts/generate.sh:21
Finding

Unpinned Third-Party Dependency Installed During Normal Execution

Content
View full analysis

Vulnerability Details

File Location: scripts/generate.sh:21
Vulnerability Type: Unpinned runtime dependency installation and supply-chain exposure
Risk Level: Medium

Vulnerable Code

bash
uv pip install gradio_client --quiet 2>/dev/null || pip3 install gradio_client --quiet 2>/dev/null

Technical Analysis

The script automatically installs gradio_client during normal execution without specifying a reviewed version, lockfile, or package hash. Package resolution can therefore retrieve a different package release or different transitive dependencies each time the Skill runs.

The fallback from uv pip to pip3 also makes the installation environment unpredictable. Depending on the user's configuration and permissions, pip3 may modify a shared user or system Python environment rather than an isolated environment. Suppressing standard error further obscures installation failures and relevant security warnings.

The panorama generator legitimately requires a Gradio client, but modifying the Python environment on every invocation exceeds the minimum behavior needed to generate a panorama. Dependency installation should be a separate, explicit setup operation using reviewed and reproducible versions.

Attack Path

  1. An attacker compromises a future gradio_client release, one of its transitive dependencies, or the applicable package-distribution channel.
  2. A user invokes scripts/generate.sh.
  3. The script resolves and installs the unpinned package or compromised dependency.
  4. Malicious package code executes during installation or when generator.py imports gradio_client.
  5. The code runs with the permissions of the user who launched the Skill.

This is a supply-chain exposure rather than evidence that the current gradio_client package is malicious.

Impact Assessment

Successful exploitation could permit arbitrary code execution with the invoking user's privileges. Th ...[truncated 315 chars]

Remediation
View remediation

Remediation Suggestions

  • Move dependency installation out of the normal generation workflow and require an explicit setup step.
  • Pin gradio_client and all transitive dependencies to reviewed versions in a lockfile.
  • Require package hashes where supported.
  • Install dependencies into a dedicated virtual environment rather than falling back to an unspecified pip3 environment.
  • Remove error suppression so users can inspect package-resolution and integrity failures.
  • Configure the package installer to use an explicitly trusted index.
  • Periodically review and deliberately update pinned dependencies after security testing.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generator.py:124
Finding

Generated Files Exposed on All Network Interfaces

Content
View full analysis

Vulnerability Details

File Location: scripts/generator.py:124-129
Vulnerability Type: Unrestricted network binding and unauthenticated file serving
Risk Level: Medium

Vulnerable Code

python
subprocess.Popen(
    ['python3', '-m', 'http.server', str(port)],
    cwd=str(output_dir),
    stdout=subprocess.DEVNULL,
    stderr=subprocess.DEVNULL
)

Technical Analysis

python3 -m http.server binds to all available network interfaces by default when no --bind address is supplied. This differs from the documented and displayed localhost behavior.

The server exposes all files beneath output_dir without authentication. Python's basic HTTP server can also provide directory listings where no index file is present. The process is started in the background and no process handle, timeout, or shutdown procedure is retained, so exposure may continue after panorama generation is complete.

The Skill only needs a local browser viewer. Binding the service beyond the loopback interface exceeds the minimum network privileges necessary for that function.

Attack Path

  1. A user generates a panorama or places other files in the project's output directory.
  2. The Skill launches python3 -m http.server 8899 without a loopback binding.
  3. The server listens on reachable host interfaces rather than only 127.0.0.1.
  4. An attacker on a network able to reach the host connects to TCP port 8899.
  5. The attacker requests known filenames or uses directory listings to discover and download files from the output directory.

Exploitation requires network reachability to port 8899 and is subject to host firewall and network controls.

Impact Assessment

A reachable attacker may obtain generated panorama images, the viewer page, and any other files stored beneath the served output directory. The server does not itself grant access to files outside that directory, and no direct operating-system pri ...[truncated 200 chars]

Remediation
View remediation

Remediation Suggestions

  • Bind the server explicitly to the IPv4 loopback interface:
    python
    ['python3', '-m', 'http.server', str(port), '--bind', '127.0.0.1']
    
  • If IPv6 localhost support is required, configure and test an explicit loopback-only IPv6 listener.
  • Serve only the required viewer and generated image rather than the entire output directory.
  • Disable directory listing through a restricted custom request handler.
  • Retain the Popen handle and terminate the server when viewing is complete.
  • Display a clear warning and require explicit user consent before allowing non-loopback binding.
  • Report startup errors instead of discarding all server diagnostics.
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · scripts/generator.py (reported line 67)May include surrounding context.

python
# 转换为 jpg
    jpg_path = output_dir / f"panorama_{timestamp}.jpg"
    os.system(f'sips -s format jpeg "{webp_path}" --out "{jpg_path}" > /dev/null 2>&1')
    
    print(f"✅ 转换完成: {jpg_path}")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises shell, file read, and file write behavior through its documented scripts and outputs, but it does not declare any explicit tool scope or permissions. This creates a transparency and containment problem: a host may allow broader execution than users expect, increasing the risk of unintended file access or command execution when the skill is invoked.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that it calls a Hugging Face DiT360 Space, but it does not clearly warn that user-supplied prompt text will be transmitted to a third-party remote service. This can expose sensitive prompts, internal project details, or personal data if users assume generation happens locally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script automatically installs a Python package from the network at runtime (uv pip install ... || pip3 install ...) without pinning a version, integrity verification, or explicit user consent. This expands the skill’s behavior from panorama generation into software installation, creating supply-chain risk if the package, index, or transport path is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The function sends the user's prompt to a third-party Hugging Face Space, but the interface and docstring do not clearly disclose that user input leaves the local environment. This can cause privacy and data-handling issues if users submit sensitive prompts, especially in enterprise or regulated environments where remote transmission requires notice or consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes generating a 360 panorama, converting formats, and creating a viewer. While creating a viewer HTML file fits that purpose, automatically launching a persistent local HTTP server via subprocess goes beyond image generation/conversion and introduces an additional serving capability not explicitly justified by the stated scope.

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

python
if result != 0:
        # 端口空闲,启动服务器
        subprocess.Popen(
            ['python3', '-m', 'http.server', str(port)],
            cwd=str(output_dir),
            stdout=subprocess.DEVNULL,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file's operative description and usage guidance are presented in Chinese, which can impose a language constraint on users. The policy allows this only when the skill offers a language choice or clearly documents a justified locale-specific limitation, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's comments and user-facing messages are entirely in Chinese, including installation guidance and status output. This imposes a specific language on users without any documented opt-in or alternative, which matches the language/locale policy concern for natural-language content.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
15% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/generate.sh (reported line 17)May include surrounding context.

sh
# 检查 uv
if ! command -v uv &> /dev/null; then
    echo "❌ 请先安装 uv: curl -LsSf https://astral.sh/uv/install.sh | sh"
    exit 1
fi

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

User-facing strings, docstrings, and usage guidance in this file are written exclusively in Chinese, which effectively forces a specific language for interaction. The policy allows language constraints when users are given a choice or the limitation is justified, but neither is present here.

Content

No source excerpt is available for this finding.