T08 · Insecure Dependencies
- Location
scripts/html_to_png.py:29- Finding
Automatic Installation of Unpinned Playwright and Chromium Dependencies
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent, but its optional PNG export can automatically install browser tooling and render active HTML with network access, so it should be reviewed before use.
Use HTML-only mode or run this skill in an isolated environment unless you specifically need PNG export. Before PNG export, preinstall pinned Playwright/Chromium yourself or require approval, and avoid rendering untrusted HTML or sensitive content with external fonts or network access enabled.
scripts/html_to_png.py:29Automatic Installation of Unpinned Playwright and Chromium Dependencies
scripts/html_to_png.py:56Unrestricted JavaScript and Network Execution During HTML Rendering
The declared skill purpose is article-to-infographic transformation, but the instructions also include browser automation, screenshot rendering, local server startup, and auto-installation of Playwright/Chromium dependencies. This mismatch can cause users or orchestrators to invoke the skill under the assumption of simple content transformation while it actually performs broader code execution and environment modification.
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
The skill instructs the agent to use shell-capable behaviors such as starting a local HTTP server and running a Python Playwright script, but it does not declare any explicit tool scope or allowed-tools boundary. This increases the risk of unintended command execution or overbroad agent behavior because the runtime permissions are implicit rather than constrained and auditable.
The manifest description says to use the skill when the user wants to convert text into an infographic, create a visual summary, or generate one from a URL, file, or pasted text. These triggers are broad and lack clear boundaries or exclusion conditions, which could cause unintended invocation for many ordinary summarization or formatting requests.
The skill tells the agent to fetch remote URLs, read local files, and later write output files, but it does not prominently disclose these actions up front. Users may provide content without understanding that network access, local file access, and file creation are part of execution, undermining informed consent and increasing data exposure risk.
The PNG export workflow omits a clear warning that it may start a local web server, launch a headless browser, and run a script/toolchain that can install dependencies. These are materially higher-risk actions than document generation and could surprise users or violate least-privilege expectations in restricted environments.
The PNG export section authorizes starting a local HTTP server, injecting JavaScript into rendered pages, and running a Playwright-based screenshot pipeline. Those behaviors exceed the narrow expectation of summarizing an article into HTML and introduce additional attack surface through local execution, browser automation, and dependency handling.
The skill first says output format must be confirmed before generation, but later instructs the agent to ask for PNG export after HTML delivery. Contradictory control flow weakens the safety boundary around user consent and can lead to unexpected extra actions after generation, including execution of export tooling the user may not have approved upfront.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Fontshare example:
<link href="https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=satoshi@300,400,500,700&display=swap" rel="stylesheet">
The skill performs package and browser installation in addition to its stated document-rendering function, which broadens its capabilities to network access and system modification. This mismatch increases risk because a content transformation tool should not need to alter the host environment at runtime to complete a user request.
Automatic package and browser installation executes subprocesses that fetch and install software without user confirmation, creating both supply-chain exposure and unauthorized system changes. In an agent setting, this is especially dangerous because a seemingly simple file-conversion action can unexpectedly trigger network activity and persistent modifications.
This code automatically runs pip install at runtime, including the '--break-system-packages' flag, which can modify the host Python environment and pull code from package indexes without prior approval. In a skill that should only convert HTML to PNG, this is an unnecessary expansion of privileges and creates supply-chain and environment-integrity risk.
import playwright
except ImportError:
print("[html_to_png] Installing playwright...", file=sys.stderr)
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "playwright", "-q",
"--break-system-packages"],
stdout=subprocess.DEVNULL
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
)
# Check if chromium is installed
chromium_check = subprocess.run(
[sys.executable, "-m", "playwright", "install", "--dry-run", "chromium"],
capture_output=True, text=True
)
This code automatically installs the Chromium runtime at execution time, causing network-backed system modification from within the skill. In an agent environment, this expands the tool's authority beyond rendering HTML and can introduce unreviewed binaries or fail-open behavior in restricted environments.
)
if chromium_check.returncode != 0 or "chromium" not in chromium_check.stdout.lower():
print("[html_to_png] Installing chromium browser...", file=sys.stderr)
subprocess.check_call(
[sys.executable, "-m", "playwright", "install", "chromium"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
)
Line L25 advertises "中文字体优化" as a feature, and the document does not mention whether language or locale behavior is optional or limited to CJK-specific use cases. Because SQP-3 applies to all file types and covers forced language or locale behavior, this wording can suggest a locale preference without user opt-in.
The manifest text highlights 'Chinese typography optimization' and a 'chinese-anime' style, and the changelog states these were added as built-in behavior. Because the file does not indicate that Chinese-language or locale-specific behavior is optional or user-selected, this can conflict with a policy requiring language/locale choice rather than imposing one implicitly.
No suspicious patterns detected.