deepstream-sop
Audited by Socket on Aug 16, 2026
2 alerts found:
AnomalySecurityNo direct evidence of overt malware behavior (e.g., credential theft, network exfiltration, reverse shells, or embedded payload execution) is visible in this fragment. The primary supply-chain/security concerns are (1) import-path manipulation via sys.path.append('../../') and sys.path.append(os.getcwd()) which can enable import hijacking, and (2) high-impact subprocess execution to build/export TensorRT engines and then deserialize them without integrity checks, using paths and build parameters sourced from environment variables. Additionally, logging may leak inference details depending on deployment configuration, and the finalize() snippet appears typo/truncated, reducing confidence in safe cleanup.
This module is primarily an ML model loader, but it includes two security-relevant behaviors that materially increase risk in untrusted environments: (1) deserializing a user-provided PyTorch checkpoint via torch.load (potential pickle/code execution risk if the checkpoint is malicious), and (2) dynamically importing model code by manipulating sys.path based on environment variables and os.getcwd() (import-path hijacking/supply-chain risk if filesystem contents can be influenced). There is no direct evidence of overt malware (e.g., exfiltration, shell execution, keylogging) in the provided snippet; the main concerns are untrusted deserialization and dynamic import resolution.