ScanPay rule catalog

45 deterministic engine rules (22 Python, 23 JS/TS) plus pattern detectors. No code execution, no AI inference.

← service · JSON · llms.txt

Python (22)

RuleSeverityCategoryWhat it catchesRemediation
PY-DANGEROUS-EVALcriticaldynamic_executionDynamic eval() invocation detected.Replace eval() with an explicit allowlisted operation or literal parsing (ast.literal_eval).
PY-DANGEROUS-EXECcriticaldynamic_executionDynamic exec() invocation detected.Replace dynamic execution with an explicit allowlisted operation.
PY-OS-SYSTEMcriticalshell_executionos.system() shell invocation detected.Use subprocess with an argument list and shell=False, validating inputs.
PY-PRIVATE-KEYcriticalsecretPrivate key material detected in source.Never embed private keys; load from a secure secret store at runtime.
PY-SEED-PHRASEcriticalsecretLikely BIP39 seed phrase / mnemonic detected.Never embed seed phrases; load from a secure secret store.
PY-SHELL-EXECcriticalshell_executionShell execution via shell=True or os.popen detected.Pass an argument list with shell=False and never interpolate untrusted input.
PY-UNSAFE-DESERIALIZEcriticaldeserializationUnsafe deserialization (pickle/marshal/shelve) detected.Use a safe format (JSON) or validate/authenticate serialized data before loading.
PY-DANGEROUS-COMPILEhighdynamic_executioncompile() into exec/eval mode detected.Avoid compiling code from runtime data; use static functions.
PY-DYNAMIC-ATTRIBUTEhighdynamic_attributeA callable attribute name is resolved dynamically and cannot be proven safe.Replace dynamic getattr()/attribute dispatch with an explicit allowlisted mapping.
PY-FS-DESTRUCTIVEhighfilesystemDestructive filesystem operation (rmtree/remove/unlink) detected.Guard destructive operations behind explicit, validated paths.
PY-HARDCODED-SECREThighsecretLikely hardcoded credential/secret detected.Move secrets to environment variables or a secret manager.
PY-OBFUSCATIONhighobfuscationEncoded/obfuscated payload detected.Do not decode-and-execute payloads; keep logic in plain source.
PY-PARSER-ABUSEhighparser_abuseExcessive nesting / parser-stress input detected.Simplify deeply nested structures; reject machine-generated abuse input.
PY-SCANNER-BYPASShighscanner_bypassAttempt to disable/bypass a scanner or tamper with builtins detected.Remove scanner-suppression directives and builtin tampering.
PY-SYNTAX-ERRORhighsyntaxSource is not valid Python; deterministic AST analysis is incomplete.Fix the syntax error and resubmit so the code can be fully analyzed.
PY-UNSAFE-YAMLhighdeserializationyaml.load without SafeLoader detected.Use yaml.safe_load() or Loader=yaml.SafeLoader.
PY-DYNAMIC-IMPORTmediumdynamic_importDynamic import (__import__/importlib) detected.Import modules statically where possible; validate any dynamic module name against an allowlist.
PY-FS-WRITEmediumfilesystemFilesystem write detected.Restrict writes to a sandboxed path and validate the target.
PY-NETWORKmediumnetworkOutbound network request detected.Validate destinations against an allowlist; avoid exfiltration channels.
PY-SENSITIVE-MODULEmediumsensitive_moduleSecurity-sensitive module import detected.Confirm this low-level module is required; prefer higher-level safe APIs.
PY-SUBPROCESSmediumprocess_spawnsubprocess invocation detected.Ensure arguments are an explicit list, shell=False, and inputs are validated.
PY-TEMPFILEmediumtempfileInsecure temporary-file handling detected.Use tempfile.NamedTemporaryFile/mkstemp instead of mktemp or hardcoded /tmp paths.

JavaScript / TypeScript (23)

RuleSeverityCategoryWhat it catchesRemediation
JS-DANGEROUS-EVALcriticaldynamic_executionDynamic eval() invocation detected.Replace eval() with an explicit allowlisted operation or JSON.parse for data.
JS-DANGEROUS-EXECcriticalshell_executionShell command execution via child_process.exec() detected.Use child_process.execFile() with an explicit argument list, validating all inputs.
JS-DANGEROUS-EXEC-SYNCcriticalshell_executionSynchronous shell execution via execSync()/spawnSync() detected.Use async execFile() with validated arguments instead.
JS-DANGEROUS-FUNCTIONcriticaldynamic_executionnew Function() constructor detected — equivalent to eval().Never construct functions from runtime strings; use static functions.
JS-DANGEROUS-SPAWNcriticalshell_executionProcess spawning via child_process.spawn() detected.Ensure arguments are an explicit list, shell option is false, and inputs are validated.
JS-PRIVATE-KEYcriticalsecretPrivate key material detected in source.Never embed private keys; load from a secure secret store at runtime.
JS-SEED-PHRASEcriticalsecretLikely BIP39 seed phrase / mnemonic detected.Never embed seed phrases; load from a secure secret store.
JS-VM-EXECUTIONcriticaldynamic_executionvm.runInNewContext() or similar VM execution detected.Avoid running untrusted code in VM contexts; use sandboxed Web Workers if needed.
JS-DANGEROUS-SETTIMEOUThighdynamic_executionsetTimeout/setInterval with a string argument detected — equivalent to eval().Pass a function reference, not a string, to setTimeout/setInterval.
JS-FS-DESTRUCTIVEhighfilesystemDestructive filesystem operation (rm/rmSync/unlink/unlinkSync) detected.Guard destructive operations behind explicit, validated paths.
JS-HARDCODED-SECREThighsecretLikely hardcoded credential/secret detected.Move secrets to environment variables (process.env) or a secret manager.
JS-OBFUSCATIONhighobfuscationEncoded/obfuscated payload detected (atob, btoa, Buffer.from base64).Do not decode-and-execute payloads; keep logic in plain source.
JS-PARSER-ABUSEhighparser_abuseExcessive nesting / parser-stress input detected.Simplify deeply nested structures; reject machine-generated abuse input.
JS-PROTOTYPE-POLLUTIONhighprototypePotential prototype pollution via __proto__ or constructor.prototype assignment.Use Object.create(null) for user-controlled keys; freeze Object.prototype.
JS-SCANNER-BYPASShighscanner_bypassAttempt to disable/bypass a scanner or linter detected.Remove scanner-suppression directives.
JS-SYNTAX-ERRORhighsyntaxSource 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-DESERIALIZEhighdeserializationPotentially unsafe deserialization pattern detected.Use JSON.parse with schema validation; never eval() or new Function() on untrusted data.
JS-DANGEROUS-REGEXmediumregexRegular expression constructed from a variable — potential ReDoS vector.Use static regex literals where possible; validate and limit dynamic patterns.
JS-DYNAMIC-IMPORTmediumdynamic_importDynamic import() with a non-literal argument detected.Import modules statically where possible; validate dynamic module names against an allowlist.
JS-DYNAMIC-REQUIREmediumdynamic_importrequire() with a non-literal argument detected.Use static import statements; validate any dynamic require against an allowlist.
JS-FS-WRITEmediumfilesystemFilesystem write detected.Restrict writes to a sandboxed path and validate the target.
JS-NETWORKmediumnetworkOutbound network request detected.Validate destinations against an allowlist; avoid exfiltration channels.
JS-SENSITIVE-MODULEmediumsensitive_moduleSecurity-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.