llm-torch-profiler-analysis
Audited by Socket on Aug 28, 2026
2 alerts found:
SecurityAnomalyThis snippet does not show obvious direct malware behavior, but it is a high-risk supply-chain runner/orchestrator. The optional --trust-remote-code flag can enable execution of code originating from remote model repositories, and the script passes Hugging Face authentication tokens into the container while also mounting a writable host directory ($RUN_DIR). Combined with host-network exposure and a broadly accessible server binding, compromise of the image/model (or of MODEL/TRUST_REMOTE_CODE inputs) would have elevated impact by granting untrusted code access to credentials and host-writable artifacts.
No clear evidence of overt malware (no reverse shell, no outbound exfiltration endpoints, no explicit persistence). However, the script contains high-risk behaviors for supply-chain security: it can enable model repository code execution (--trust_remote_code) and it executes a dynamically assembled bash command string inside the container using interpolated variables (potential command injection if inputs are attacker-controlled). It also injects Hugging Face tokens into the container environment and allows optional host-controlled code override via OVERRIDE_PY_EXECUTOR mount.