Back to skill

Security audit

glmv-prd-to-app

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent full-stack app builder, but it asks agents to install dependencies, reset data, start services, and auto-install browser tooling without enough explicit user control.

Install only in a disposable or version-controlled workspace. Review generated start.sh before running it, especially any database reset, cleanup, package installation, system dependency installation, or server startup commands. Avoid using real secrets or private customer data in PRDs/prototypes unless you first redact them, and prefer preinstalling pinned Playwright/browser dependencies rather than allowing runtime installation.

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/render_page.py:35
Finding

Unpinned Runtime Dependency and Browser Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/render_page.py, lines 35–42
Vulnerability Type: Unpinned third-party dependency installation at runtime
Risk Level: Medium

Vulnerable Code

python
def ensure_playwright():
    """Ensure playwright and browsers are installed."""
    try:
        from playwright.sync_api import sync_playwright
        return True
    except ImportError:
        print("Installing playwright...")
        import subprocess
        subprocess.run([sys.executable, "-m", "pip", "install", "playwright"], check=True)
        subprocess.run([sys.executable, "-m", "playwright", "install", "chromium"], check=True)
        return True

Technical Analysis

When Playwright is unavailable, the screenshot utility automatically installs the latest version of the unpinned playwright package from pip and then downloads a Chromium binary. Neither artifact is constrained by a reviewed lock file, exact version, cryptographic hash, or equivalent integrity verification.

Consequently, the code executed by this reviewed project may change whenever the script is run. A compromised package registry, upstream release, distribution path, or browser artifact could introduce attacker-controlled code. Installation and subsequent imports occur with the same operating-system identity and permissions as the user or agent running the Skill.

This is a supply-chain weakness rather than evidence that the current Playwright package is malicious.

Attack Path

  1. An agent or user invokes scripts/render_page.py in an environment where Playwright is not installed.
  2. Importing playwright.sync_api raises ImportError.
  3. ensure_playwright() executes python -m pip install playwright without a version or hash constraint.
  4. pip retrieves mutable package content from its configured package source.
  5. The script executes python -m playwright install chromium, retrieving an additional browser artifact without project-level integrity ...[truncated 918 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic dependency installation from ensure_playwright() and fail with a clear setup error when Playwright is unavailable.
  2. Declare an exact, reviewed Playwright version in a dependency lock file.
  3. Generate and enforce cryptographic package hashes, such as by installing from a requirements file with pip install --require-hashes.
  4. Pin the Chromium/browser revision compatible with the reviewed Playwright release and verify downloaded artifacts against trusted checksums.
  5. Install dependencies during a controlled build or provisioning phase rather than during normal script execution.
  6. Use a trusted internal package mirror or restricted package index where practical.
  7. Run rendering in a sandbox or container with minimal filesystem access, restricted network access, no unnecessary credentials, and a non-privileged user.
  8. Include dependency and browser artifacts in routine supply-chain scanning and update them through an explicit review process.
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill creates a complete production-ready application from requirements and design materials. The supplied code does nothing of that sort. It is an API checking script: it parses CLI arguments, optionally loads endpoint definitions from JSON, sends HTTP requests, validates status codes and JSON responses, summarizes results, and exits nonzero on failure. This is a materially different primary purpose and introduces an undeclared capability—probing/checking remote API endpoints—while lacking the declared generation capabilities entirely. Therefore the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises an end-to-end application generation skill driven by PRDs and prototypes. The supplied code chunk is narrowly focused on rendering existing web pages and taking screenshots for one or multiple routes. While screenshot capture could be a supporting part of visual verification in a larger system, this code by itself does not implement the core claimed behavior: no PRD parsing, no code generation, no backend/frontend creation, no database work, and no deployment script generation. Its primary purpose is materially different from the declared purpose, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose is a broad end-to-end app generation capability triggered by PRD/prototype-based development requests. The actual code does not build applications or process PRDs, images, schemas, APIs, UIs, or deployment assets. It only performs runtime availability checks against a web server and optional route validation. This is a narrow testing/health-check utility, not a full-stack app builder. The behavior is materially different from the declared primary purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger guidance is broad enough to activate on generic requests like '帮我开发' or 'build this' whenever materials are present. Overbroad activation can cause the agent to launch a high-privilege, multi-phase build workflow unexpectedly, including file inspection, code generation, shell actions, and networked verification, without the user explicitly requesting such invasive behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill directs file reads, shell execution, and network activity but declares no explicit tool scope or permissions boundary. In an agent environment, that increases the chance of overbroad tool access and unintended execution paths, especially because the workflow includes installation, startup, and external requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs dependency installation, environment modification, and destructive reset actions such as cleaning previous state and resetting databases, but does not require an explicit warning or confirmation first. In a real workspace this can erase data, alter the host environment, or start untrusted services, making the workflow significantly riskier than ordinary code generation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly instructs exact transcription of all visible prototype content, including names, comments, dates, prices, avatars, and other UI text, but provides no data minimization, redaction, or privacy screening. In the context of a skill that turns PRDs and prototypes into production-ready applications and seed data, this can propagate real personal, confidential, or regulated data from mockups into databases, code, fixtures, and deployments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

In verbose mode, the script includes response bodies in its output, which can expose sensitive API data such as tokens, user records, or internal error details to terminal logs, CI logs, or shared debugging artifacts. Because this skill is designed to build and validate production-ready applications, the checker is likely to be run against real services and realistic data, which increases the chance of unintended disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script silently installs Python packages and a browser binary when an import fails, which exceeds the stated purpose of rendering screenshots and can unexpectedly modify the host environment. In a high-privilege or automated agent context, this creates supply-chain and integrity risk because execution triggers network retrieval and installation of executable code without explicit operator approval.

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

python
except ImportError:
        print("Installing playwright...")
        import subprocess
        subprocess.run([sys.executable, "-m", "pip", "install", "playwright"], check=True)
        subprocess.run([sys.executable, "-m", "playwright", "install", "chromium"], check=True)
        return True

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

python
print("Installing playwright...")
        import subprocess
        subprocess.run([sys.executable, "-m", "pip", "install", "playwright"], check=True)
        subprocess.run([sys.executable, "-m", "playwright", "install", "chromium"], check=True)
        return True

def render_url(url: str, output_path: str, width: int = 1280, height: int = 800,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The checklist explicitly calls out "Chinese characters" as a correctness requirement, which introduces a locale-specific expectation in natural language. Since the file does not explain that this guide is region-specific or offer language/locale flexibility, it may conflict with the policy against forcing a specific language or locale without user opt-in.

Content

No source excerpt is available for this finding.