Playwright Browser Automation
Warn
Audited by Gen Agent Trust Hub on Nov 12, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: The skill is designed to generate and execute dynamic JavaScript code at runtime. The
run.jsscript acts as a universal executor that takes input from files, arguments, or stdin, wraps it in an asynchronous template, and executes it usingrequire(). This creates a significant surface for executing arbitrary code. - Evidence in
run.js: ThewrapCodeIfNeededandmainfunctions facilitate the creation of temporary execution files (.temp-execution-*.js) which are then loaded viarequire(tempFile). - [COMMAND_EXECUTION]: The skill instructions in
SKILL.mdexplicitly direct the agent to execute shell commands to detect servers and run the generated scripts. This involves usingnode -eand calling the customrun.jsexecutor. - Evidence in
SKILL.md:cd $SKILL_DIR && node run.js /tmp/playwright-test-*.jsandcd $SKILL_DIR && node -e "require('./lib/helpers').detectDevServers()...". - [INDIRECT_PROMPT_INJECTION]: As a browser automation tool, the skill is highly susceptible to indirect prompt injection. It navigates to external websites and retrieves content (page titles, table data, links) which is then returned to the agent's context. If a website contains malicious instructions hidden in metadata or page content, it could influence the agent's subsequent actions.
- Ingestion points:
page.goto(TARGET_URL),extractTexts,extractTableDatainlib/helpers.js. - Capability inventory: The skill has full file system write access (via
fs.writeFileSyncinrun.js) and network access (via Playwright's browser andhttp.requestinlib/helpers.js). - Sanitization: There is no evidence of sanitization or filtering of the content retrieved from web pages before it is processed by the agent.
Audit Metadata