playwright
Audited by Socket on Jun 26, 2026
3 alerts found:
Anomalyx3This code is a WebSocket interception and scraping/monitoring utility that captures both text and (partially) binary WebSocket payloads, including CDP-level payloadData, then logs and retains the content in memory. No overt malware mechanics are present in the fragment (no execution/persistence/exfiltration code shown). The main concern is confidentiality: verbose, non-redacted console logging and in-memory accumulation can leak sensitive session/user data contained in WebSocket messages, and multiple listener registrations can amplify unintended data capture.
This fragment is best characterized as a Playwright scraping/automation harness that actively intercepts and manipulates network traffic: it globally injects request headers (including fixed Referer), blocks analytics/tracking resources, captures and parses API JSON, and mocks specific API responses with static cached data. It also collects request/response metadata broadly and writes downloaded files using a server-suggested filename without visible sanitization. No direct evidence of overt malware (e.g., exfiltration, command execution, credential theft) is present in the shown code, but the combination of response tampering, header spoofing, broad interception, and filesystem write risk makes it moderately risky and highly susceptible to misuse.
This module is primarily an authenticated scraping/automation utility: it navigates to caller-supplied URLs and returns full page content, supports anti-detection/rotation, and can use proxies/basic-auth plus persisted browser sessions. The snippet does not show clear malware actions, but it contains security-relevant risk factors—TLS verification is disabled, credentials/session material are handled as plaintext in code/examples, arbitrary URL navigation is allowed without allowlisting, and it persists session state to disk. Overall, it appears capable of being used for unauthorized data collection or bypassing controls, warranting review and tighter secret handling and TLS safety.