baoyu-post-to-x
Audited by Socket on Jul 13, 2026
2 alerts found:
SecurityAnomalyThis dependency implements cross-platform OS-level keystroke injection to perform a real paste (Cmd+V/Ctrl+V) into the active UI context, explicitly aiming to bypass detection of synthetic events. The snippet does not show direct data theft or network exfiltration, but it is inherently abuse-prone (clipboard/automation enabling) and contains a concrete script-injection risk on macOS by interpolating the unvalidated --app value into an AppleScript program executed by osascript. Overall, treat as a security-sensitive automation component and restrict/control how CLI inputs and execution context are provided.
No direct malware payload is visible in this file fragment (no explicit exfiltration, backdoor, or command-and-control). However, it has elevated security risk due to (a) automated extraction/verification of X/Twitter authentication cookies via CDP and (b) executing clipboard operations by spawning local helper scripts through `npx -y bun` with inherited stdio and caller-influenced arguments, plus (c) deleting lock artifacts in a supplied profile directory. This warrants careful review of the helper scripts and the downstream handling of retrieved session cookies.