imap-smtp-email
Audited by Socket on May 19, 2026
2 alerts found:
Anomalyx2No explicit malicious behavior (e.g., direct exfiltration, reverse shell, or hardcoded secrets) is evident in this orchestration snippet. The primary security concern is elevated execution/supply-chain risk: it runs a bash credential-refresh script via spawnSync and delegates to local Node scripts while forwarding the entire process environment and passing through additional CLI arguments to child processes. JSON parsing failures are silently ignored, which may reduce visibility into unexpected refresh output. Overall: moderate security risk—focus review on GET_TOKEN_SH usage, how selectedPlatform/platform is constrained, and strict validation/least-privilege handling in the invoked smtp.js/imap.js and refresh logic.
This module is best characterized as a credential provisioning/refresh utility: it fetches or accepts email access tokens and persists them as IMAP/SMTP passwords in a project-local plaintext .env file (chmod 600). No explicit malicious behaviors (backdoor, exfiltration logic, reverse shell, or obfuscated payload execution) are present in the fragment. The dominant security concern is the high-value credential lifecycle (writing secrets to disk) and the strong dependency on a local proxy that is instructed via a Remote-URL header to reach a specific external forwarding endpoint; compromise or misconfiguration of that proxy would directly impact what secrets get written.