45 deterministic engine rules (22 Python, 23 JS/TS) plus pattern detectors. No code execution, no AI inference.
| Rule | Severity | Category | What it catches | Remediation |
|---|---|---|---|---|
PY-DANGEROUS-EVAL | critical | dynamic_execution | Dynamic eval() invocation detected. | Replace eval() with an explicit allowlisted operation or literal parsing (ast.literal_eval). |
PY-DANGEROUS-EXEC | critical | dynamic_execution | Dynamic exec() invocation detected. | Replace dynamic execution with an explicit allowlisted operation. |
PY-OS-SYSTEM | critical | shell_execution | os.system() shell invocation detected. | Use subprocess with an argument list and shell=False, validating inputs. |
PY-PRIVATE-KEY | critical | secret | Private key material detected in source. | Never embed private keys; load from a secure secret store at runtime. |
PY-SEED-PHRASE | critical | secret | Likely BIP39 seed phrase / mnemonic detected. | Never embed seed phrases; load from a secure secret store. |
PY-SHELL-EXEC | critical | shell_execution | Shell execution via shell=True or os.popen detected. | Pass an argument list with shell=False and never interpolate untrusted input. |
PY-UNSAFE-DESERIALIZE | critical | deserialization | Unsafe deserialization (pickle/marshal/shelve) detected. | Use a safe format (JSON) or validate/authenticate serialized data before loading. |
PY-DANGEROUS-COMPILE | high | dynamic_execution | compile() into exec/eval mode detected. | Avoid compiling code from runtime data; use static functions. |
PY-DYNAMIC-ATTRIBUTE | high | dynamic_attribute | A callable attribute name is resolved dynamically and cannot be proven safe. | Replace dynamic getattr()/attribute dispatch with an explicit allowlisted mapping. |
PY-FS-DESTRUCTIVE | high | filesystem | Destructive filesystem operation (rmtree/remove/unlink) detected. | Guard destructive operations behind explicit, validated paths. |
PY-HARDCODED-SECRET | high | secret | Likely hardcoded credential/secret detected. | Move secrets to environment variables or a secret manager. |
PY-OBFUSCATION | high | obfuscation | Encoded/obfuscated payload detected. | Do not decode-and-execute payloads; keep logic in plain source. |
PY-PARSER-ABUSE | high | parser_abuse | Excessive nesting / parser-stress input detected. | Simplify deeply nested structures; reject machine-generated abuse input. |
PY-SCANNER-BYPASS | high | scanner_bypass | Attempt to disable/bypass a scanner or tamper with builtins detected. | Remove scanner-suppression directives and builtin tampering. |
PY-SYNTAX-ERROR | high | syntax | Source is not valid Python; deterministic AST analysis is incomplete. | Fix the syntax error and resubmit so the code can be fully analyzed. |
PY-UNSAFE-YAML | high | deserialization | yaml.load without SafeLoader detected. | Use yaml.safe_load() or Loader=yaml.SafeLoader. |
PY-DYNAMIC-IMPORT | medium | dynamic_import | Dynamic import (__import__/importlib) detected. | Import modules statically where possible; validate any dynamic module name against an allowlist. |
PY-FS-WRITE | medium | filesystem | Filesystem write detected. | Restrict writes to a sandboxed path and validate the target. |
PY-NETWORK | medium | network | Outbound network request detected. | Validate destinations against an allowlist; avoid exfiltration channels. |
PY-SENSITIVE-MODULE | medium | sensitive_module | Security-sensitive module import detected. | Confirm this low-level module is required; prefer higher-level safe APIs. |
PY-SUBPROCESS | medium | process_spawn | subprocess invocation detected. | Ensure arguments are an explicit list, shell=False, and inputs are validated. |
PY-TEMPFILE | medium | tempfile | Insecure temporary-file handling detected. | Use tempfile.NamedTemporaryFile/mkstemp instead of mktemp or hardcoded /tmp paths. |
| Rule | Severity | Category | What it catches | Remediation |
|---|---|---|---|---|
JS-DANGEROUS-EVAL | critical | dynamic_execution | Dynamic eval() invocation detected. | Replace eval() with an explicit allowlisted operation or JSON.parse for data. |
JS-DANGEROUS-EXEC | critical | shell_execution | Shell command execution via child_process.exec() detected. | Use child_process.execFile() with an explicit argument list, validating all inputs. |
JS-DANGEROUS-EXEC-SYNC | critical | shell_execution | Synchronous shell execution via execSync()/spawnSync() detected. | Use async execFile() with validated arguments instead. |
JS-DANGEROUS-FUNCTION | critical | dynamic_execution | new Function() constructor detected — equivalent to eval(). | Never construct functions from runtime strings; use static functions. |
JS-DANGEROUS-SPAWN | critical | shell_execution | Process spawning via child_process.spawn() detected. | Ensure arguments are an explicit list, shell option is false, and inputs are validated. |
JS-PRIVATE-KEY | critical | secret | Private key material detected in source. | Never embed private keys; load from a secure secret store at runtime. |
JS-SEED-PHRASE | critical | secret | Likely BIP39 seed phrase / mnemonic detected. | Never embed seed phrases; load from a secure secret store. |
JS-VM-EXECUTION | critical | dynamic_execution | vm.runInNewContext() or similar VM execution detected. | Avoid running untrusted code in VM contexts; use sandboxed Web Workers if needed. |
JS-DANGEROUS-SETTIMEOUT | high | dynamic_execution | setTimeout/setInterval with a string argument detected — equivalent to eval(). | Pass a function reference, not a string, to setTimeout/setInterval. |
JS-FS-DESTRUCTIVE | high | filesystem | Destructive filesystem operation (rm/rmSync/unlink/unlinkSync) detected. | Guard destructive operations behind explicit, validated paths. |
JS-HARDCODED-SECRET | high | secret | Likely hardcoded credential/secret detected. | Move secrets to environment variables (process.env) or a secret manager. |
JS-OBFUSCATION | high | obfuscation | Encoded/obfuscated payload detected (atob, btoa, Buffer.from base64). | Do not decode-and-execute payloads; keep logic in plain source. |
JS-PARSER-ABUSE | high | parser_abuse | Excessive nesting / parser-stress input detected. | Simplify deeply nested structures; reject machine-generated abuse input. |
JS-PROTOTYPE-POLLUTION | high | prototype | Potential prototype pollution via __proto__ or constructor.prototype assignment. | Use Object.create(null) for user-controlled keys; freeze Object.prototype. |
JS-SCANNER-BYPASS | high | scanner_bypass | Attempt to disable/bypass a scanner or linter detected. | Remove scanner-suppression directives. |
JS-SYNTAX-ERROR | high | syntax | Source is not valid JavaScript/TypeScript; deterministic AST analysis is incomplete. | Fix the syntax error and resubmit so the code can be fully analyzed. |
JS-UNSAFE-DESERIALIZE | high | deserialization | Potentially unsafe deserialization pattern detected. | Use JSON.parse with schema validation; never eval() or new Function() on untrusted data. |
JS-DANGEROUS-REGEX | medium | regex | Regular expression constructed from a variable — potential ReDoS vector. | Use static regex literals where possible; validate and limit dynamic patterns. |
JS-DYNAMIC-IMPORT | medium | dynamic_import | Dynamic import() with a non-literal argument detected. | Import modules statically where possible; validate dynamic module names against an allowlist. |
JS-DYNAMIC-REQUIRE | medium | dynamic_import | require() with a non-literal argument detected. | Use static import statements; validate any dynamic require against an allowlist. |
JS-FS-WRITE | medium | filesystem | Filesystem write detected. | Restrict writes to a sandboxed path and validate the target. |
JS-NETWORK | medium | network | Outbound network request detected. | Validate destinations against an allowlist; avoid exfiltration channels. |
JS-SENSITIVE-MODULE | medium | sensitive_module | Security-sensitive module import detected. | Confirm this module is required; prefer higher-level safe APIs. |
Engine rules are shown above; additional pattern detectors run alongside them and report the same finding schema.