Back to skill

Security audit

Playwright.Tmp

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Playwright browser-automation skill with disclosed npm installation and browser data flows, though users should prefer pinned dependencies.

Install only in environments where you trust npm and the sites being automated. For safer use, install Playwright and Playwright MCP as pinned project dependencies with a committed lockfile, run local binaries through the project package manager, keep browser auth state temporary unless explicitly needed, and avoid running production or high-stakes account actions without clear confirmation.

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:33
Finding
Unpinned npm Package Retrieval and Execution Through npx## Vulnerability Details **File Location**: `SKILL.md`, lines 8 and 31-34 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium **Affected code:** ```yaml metadata: {"clawdbot":{"emoji":"P","requires":{"bins":["node","npx"]},"os":["linux","darwin","win32"],"install":[{"id":"npm-playwright","kind":"npm","package":"playwright","bins":["playwright"],"label":"Install Playwright"},{"id":"npm-playwright-mcp","kind":"npm","package":"@playwright/mcp","bins":["playwright-mcp"],"label":"Install Playwright MCP (optional)"}]}} ``` ```bash ### MCP browser path npx @playwright/mcp --headless ``` ### Technical Analysis The Skill recommends executing `@playwright/mcp` with `npx` without specifying an exact reviewed version, lockfile, or integrity value. Its installation metadata likewise names `playwright` and `@playwright/mcp` without version constraints. When the requested package is unavailable locally, `npx` may download the registry-selected package release and execute its lifecycle or runtime code immediately. The effective code can therefore change after this Skill has been audited. A compromise of the package publisher, npm account, registry delivery path, or a future malicious package release could cause users to execute code that was not included in the reviewed project. The package names appear to correspond to the declared Playwright functionality, and there is no evidence in the reviewed files that the Skill intentionally selects a typosquatted or known-malicious package. The risk arises from unpinned remote dependency execution rather than embedded malicious behavior. ### Attack Path 1. An attacker compromises the publication credentials or release process for one of the referenced npm packages, or otherwise causes a malicious release to be selected by the package manager. 2. The attacker publishes a package version containing malicious installation or runtime code. 3. A user follows ...[truncated 1509 chars]
Remediation
## Remediation Suggestions 1. Pin each dependency to an exact, reviewed version instead of relying on the registry-selected release, for example: ```bash npm install --save-dev --save-exact @playwright/mcp@REVIEWED_VERSION ``` 2. Commit the generated lockfile and install dependencies using a lockfile-enforcing command such as: ```bash npm ci ``` 3. Execute only the locally installed, lockfile-resolved binary. Where appropriate, use: ```bash npx --no-install playwright-mcp --headless ``` Alternatively, invoke the binary through a pinned package script. 4. Add exact versions to the Skill installation metadata if its schema supports version constraints. 5. Verify package provenance, publisher identity, signatures or attestations, and registry integrity before approving dependency updates. 6. Review dependency changes and lockfile diffs through a controlled update process. Use automated vulnerability and supply-chain scanning as an additional control. 7. Run browser tooling in a sandbox or minimally privileged container with only the required workspace paths, secrets, and network destinations exposed. 8. Avoid placing unrelated credentials in the environment used to install or run the package, especially on CI runners.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (14)

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs users to execute `npx @playwright/mcp --headless` without pinning an exact package version. Because `npx` may fetch the latest published package at execution time, a compromised upstream release or typosquatted resolution path could result in arbitrary code execution on the host running the skill. This is more dangerous here because the package is an MCP server intended to control browser automation and process local inputs, making it a high-trust executable dependency.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The command `npx playwright test` relies on whatever Playwright version resolves in the current environment, and if Playwright is not already installed locally `npx` can fetch and execute a package dynamically. That creates supply-chain risk and non-reproducible execution, though the risk is somewhat lower than the MCP server case because this is a common test runner invocation that often resolves to a project-pinned dependency when used correctly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The unpinned `npx playwright test --headed` command has the same core issue: it may execute an unreviewed package version obtained at runtime if no local pinned installation exists. In a security-sensitive agent skill, normalizing unpinned executable package resolution increases the chance of supply-chain compromise or inconsistent behavior across environments.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The command `npx playwright test --trace on` is another unpinned runtime package execution path. If resolved remotely, it exposes users to arbitrary code execution from a malicious or compromised package release, and the tracing context may additionally capture sensitive test data during a compromised run.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The example `npx playwright codegen https://example.com` also uses an unpinned executable package and may download and run the latest Playwright release at invocation time. Although intended for developer convenience, it still creates a supply-chain execution risk on the local machine and encourages unsafe dependency hygiene.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.