const MAX_EVENT_LENGTH = 80; // Substrings that indicate attack/spam payloads const BLOCKED_SUBSTRINGS = [ // === Security Scanner Domains === 'oastify.com', 'burpcollaborator', 'interact.sh', 'oast.me', // === SQL Injection === 'pg_sleep', 'waitfor delay', 'xp_dirtree', 'load_file(', 'extractvalue(', 'dbms_pipe.receive_message', 'union select', // === Command Injection === 'nslookup ', '/bin/sleep', '/bin/bash', 'cmd.exe', 'wget+http', 'wget http', 'chmod+777', 'chmod 777', // === Java/Code Execution === 'processbuilder', 'runtime.getruntime', 'java.lang.processbuilder', 'eval-stdin.php', // === Path Traversal === '../', '..\\', '%2e%2e', '%u002e%u002e', '/etc/passwd', '/etc/shadow', 'win.ini', 'system.ini', // === Template/SSTI Injection === '${', '%{', // === XXE / XML Attacks === ' MAX_EVENT_LENGTH) return true; // Contains newlines (always suspicious for event names) if (name.includes('\n') || name.includes('\r')) return true; // Substring blocklist (case-insensitive) const lower = name.toLowerCase(); if (BLOCKED_SUBSTRINGS.some((blocked) => lower.includes(blocked))) { return true; } // Path scanning patterns if (PATH_SCAN_PATTERNS.some((pattern) => pattern.test(name))) { return true; } return false; }