Mempool Intrusion Detection System
Audited by Socket on Aug 3, 2026
2 alerts found:
Anomalyx2This module is a mempool-based IDS/defender wrapper. In MONITOR_ONLY it mostly analyzes and logs. In ACTIVE_DEFENSE mode it can sign and submit an on-chain pause transaction using a provided defender_private_key, with the target derived from untrusted pending transaction data. The fragment shows no direct signs of classical malware (no eval/exec, no exfiltration, no persistence), but it does contain a potentially high-impact autonomous action path that should be reviewed along with the imported dependencies (especially DefenseExecutor and the classifier/payload analyzer) for malicious behavior or misuse. Overall risk is moderate due to private-key usage and autonomous transaction execution, not because of clear malicious code in this fragment.
This module appears to be an ML-based payload/threat classifier with standard sklearn training/inference logic. No overt malware (exfiltration, shell execution, persistence) is evident in the shown code. The primary supply-chain security concern is unsafe model deserialization: load_model() uses pickle.load() on a caller-provided filepath, which can enable arbitrary code execution if the model artifact is untrusted or tampered with. Code truncation and the unseen payload_analyzer/PayloadFeatures implementation lower confidence in the completeness of the review.