Playwright Browser Automation
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: CRITICALREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [REMOTE_CODE_EXECUTION] (CRITICAL): The
mainfunction inrun.jsreads input fromprocess.argvorprocess.stdin, saves it to a temporary file (.temp-execution-...js), and executes it usingrequire(). This is a direct vector for arbitrary code execution. - [COMMAND_EXECUTION] (HIGH): The
installPlaywrightfunction useschild_process.execSyncto runnpm installandnpx playwright install, which executes shell commands with inherited permissions. - [EXTERNAL_DOWNLOADS] (LOW): The skill automatically downloads the
playwrightnpm package and browser binaries. While these are from a standard source, the automated installation and execution of external binaries is a risk. - [INDIRECT_PROMPT_INJECTION] (HIGH): \n 1. Ingestion points: Untrusted data enters the script via CLI arguments and standard input in the
getCodeToExecutefunction. \n 2. Boundary markers: No boundary markers or 'ignore' instructions are used to sanitize or delimit the code being executed. \n 3. Capability inventory: The script has full access to the file system (fs.writeFileSync,fs.unlinkSync), shell execution (execSync), and dynamic JavaScript execution (require). \n 4. Sanitization: There is no validation or sanitization of the input before it is written to a file and executed. - [DYNAMIC_EXECUTION] (HIGH): The script dynamically generates and wraps code in an async IIFE template before execution. It also attempts to require a local module
./lib/helperswhich is not provided in the skill manifest, suggesting potential for side-loading or missing file dependencies.
Recommendations
- AI detected serious security threats
Audit Metadata