trace-mode
Audited by Socket on Sep 8, 2026
2 alerts found:
AnomalyMalwareThis code is a telemetry/log shipping mechanism that exfiltrates the caller-provided `event` object (including all its fields) to an external logging endpoint, attaching a session identifier and using sendBeacon with a fetch keepalive fallback. While it does not show overt malware behaviors like remote shells, destructive actions, or dynamic payload execution, it presents a moderate security/privacy risk due to verbatim event serialization (no redaction/allowlisting) and silent error suppression.
This code behaves like a telemetry/exfiltration logger: it takes an arbitrary object provided by the caller, serializes all its fields without redaction, attaches a hardcoded session identifier, and sends it via outbound HTTP POST to a fixed remote endpoint. The silent error handling further increases stealth/observability risk. While it could be legitimate logging, the generic forwarding of entire event objects to a hardcoded remote destination is a strong red flag in a supply-chain context and warrants review of who calls `logServerLog`, what data is passed as `event`, and why the destination/session are hardcoded.