Back to skill

Security audit

Playwright Browser Automation

Security checks for vulnerabilities and agentic risk

Overview

This Playwright automation skill is mostly coherent, but it needs review because it teaches anti-bot evasion and recommends unsafe system-wide dependency installation.

Review before installing. Use a virtual environment, pin Playwright to a reviewed version, and avoid --break-system-packages. Only automate websites where you have permission, do not use the anti-bot evasion guidance, and avoid running it on sensitive accounts or pages unless you have explicitly reviewed what will be submitted or saved.

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
SKILL.md:20
Finding
Unpinned Dependency Installation Bypasses System Package Protections## Vulnerability Details **File Location**: `SKILL.md`, lines 20-23 **Vulnerability Type**: Unpinned third-party dependency installation in the system Python environment **Risk Level**: Medium ### Vulnerable Code ```bash # Install the Python library pip3 install playwright --break-system-packages # Install the browser python3 -m playwright install chromium ``` ### Technical Analysis The installation instructions retrieve `playwright` without an exact version or cryptographic hash. Dependency resolution therefore selects whichever compatible package release is available from the configured Python package index at installation time. The effective installed content can change after the skill has been audited. The `--break-system-packages` option bypasses the protection for externally managed Python environments. If the invoking account has sufficient filesystem permissions, this can install or replace packages in an OS-managed Python environment, potentially causing dependency conflicts or affecting other applications that share that interpreter. The subsequent Playwright command also downloads a Chromium browser binary associated with the resolved Playwright release. Neither the package version nor the resulting browser version is fixed by these instructions. No evidence was found that the current `playwright` package or downloaded browser is malicious. The risk arises from mutable, unverified supply-chain inputs and the explicit bypass of package-management safeguards. ### Attack Path 1. A user follows the documented installation instructions. 2. `pip3` contacts the configured package index and resolves the current available Playwright release rather than a previously audited exact version. 3. If the configured index, upstream account, release process, or local package-index configuration is compromised, attacker-controlled package content may be returned. 4. Package installation operations execute with the privil ...[truncated 1124 chars]
Remediation
## Remediation Suggestions 1. Remove `--break-system-packages` and install the dependency inside a dedicated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --upgrade pip ``` 2. Pin Playwright to a specifically reviewed version rather than using an unconstrained package name: ```text playwright==<reviewed-version> ``` 3. Generate and enforce cryptographic hashes for all resolved Python dependencies, for example through a locked requirements file and: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Use the official Python package index or an authenticated, controlled internal mirror, and document the expected index configuration. 5. Pin the lock file and Playwright version together so the expected Chromium revision remains reproducible. 6. Perform installation as an unprivileged user and avoid sharing the environment with system services or unrelated applications. 7. Review dependency updates before changing the pinned version, including package provenance, release notes, checksums, and transitive dependencies.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (5)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The natural-language content consistently forces a specific language/locale for all users, and the file does not provide an opt-in, alternative language, or justification that this is a region-specific skill. This matches the language/locale policy violation criteria.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown skill description includes browser automation behaviors that can capture page contents to local files, submit form data, and send requests to external websites. Under the markdown-specific warning rule, the document should disclose that these actions may affect user data, privacy, or system integrity, but it presents them only as normal usage examples.

Ssd 2

Medium
Confidence
97% confidence
Finding
The skill explicitly advises hiding automation characteristics and spoofing the User-Agent to bypass anti-bot detection. That guidance facilitates deceptive automation against websites' protective controls, increasing the likelihood of unauthorized scraping, abuse of web services, or policy evasion.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file’s docstrings, comments, and printed messages are entirely in Chinese, including user-facing status output. This imposes a specific language/locale without any opt-in, fallback, or documentation that the skill is intentionally limited to a Chinese-language context.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The file’s natural-language strings and description are entirely in Chinese, including the title and runtime messages, with no indication that language choice is optional or that the skill is intended only for a Chinese-speaking context. Under the policy for natural-language violations, this constitutes a locale/language constraint without user opt-in or explicit justification.

Static analysis

No suspicious patterns detected.