baoyu-danger-x-to-markdown
Audited by Socket on Sep 9, 2026
2 alerts found:
SecurityAnomalyThis module is configuration-like, but it embeds and exports a hardcoded bearer token and exposes Chrome-profile-path derivation and cookie-name configuration that strongly suggest downstream automated authenticated access to X. While the fragment itself contains no explicit malicious execution or exfiltration logic, the presence of embedded credential material and local session/credential-handling indicators make the supply-chain security risk high and warrant immediate review of downstream usage, token legitimacy/rotation, and any local cookie-reading behavior.
This module is security-sensitive: it captures authentication cookies for x.com/twitter.com from a live Chrome session via CDP (and/or from environment variables/local files), optionally writes those credentials to disk, and can generate a Cookie header string for authenticated HTTP usage. While the snippet does not show classic malware/exfiltration mechanisms or obfuscation, it provides strong credential-harvesting and credential-replication capabilities and includes partial token logging, which increases the risk of account/session compromise if misused or deployed in an insecure environment. Review surrounding project usage, file permissions, log handling, and whether cookies are ever transmitted to unintended destinations.