diff --git a/Dockerfile b/Dockerfile index 01043b3..c86f1a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM python:3.9 -COPY . /cq WORKDIR /cq -RUN pip install regex +COPY . /cq +RUN pip install --no-cache-dir -r requirements.txt +CMD ["python" "cq.py"] diff --git a/cq.py b/cq.py index 20601a8..b00a7db 100755 --- a/cq.py +++ b/cq.py @@ -3,49 +3,49 @@ import signal import sys import fn -import regex +from regex import compile , search # Directories / files to skip (these are regexes) SKIP_DIRS = [ - regex.compile('/External/'), - regex.compile('/Samples/'), - regex.compile('/NuGet/'), - # regex.compile('/Setup/'), - regex.compile('/i18n/'), - regex.compile('/li8n/'), - regex.compile('/node_modules/'), - regex.compile('/packages/'), - regex.compile('(?i)/test/'), - regex.compile('/third_party/'), - regex.compile('/vendor/'), - regex.compile(r'/\.svn/'), - regex.compile(r'/\.git/'), - regex.compile('example'), + compile('/External/'), + compile('/Samples/'), + compile('/NuGet/'), + # compile('/Setup/'), + compile('/i18n/'), + compile('/li8n/'), + compile('/node_modules/'), + compile('/packages/'), + compile('(?i)/test/'), + compile('/third_party/'), + compile('/vendor/'), + compile(r'/\.svn/'), + compile(r'/\.git/'), + compile('example'), ] SKIP_EXTS = [ - regex.compile(r'\.DS_Store$'), - regex.compile(r'\.css$'), - regex.compile(r'\.deps\.json$'), - regex.compile(r'\.dll$'), - regex.compile(r'\.eot$'), - regex.compile(r'\.exe$'), - regex.compile(r'\.gif$'), - regex.compile(r'\.ico$'), - regex.compile(r'\.jar$'), - regex.compile(r'\.jpg$'), - regex.compile(r'\.min\.js$'), - regex.compile(r'\.mov$'), - regex.compile(r'\.mp4$'), - regex.compile(r'\.png$'), - regex.compile(r'\.svg$'), - regex.compile(r'\.tif$'), - regex.compile(r'\.tiff$'), - regex.compile(r'\.ttf$'), - regex.compile(r'\.woff$'), - regex.compile(r'\.zip$'), - regex.compile(r'salt\.7$'), + compile(r'\.DS_Store$'), + compile(r'\.css$'), + compile(r'\.deps\.json$'), + compile(r'\.dll$'), + compile(r'\.eot$'), + compile(r'\.exe$'), + compile(r'\.gif$'), + compile(r'\.ico$'), + compile(r'\.jar$'), + compile(r'\.jpg$'), + compile(r'\.min\.js$'), + compile(r'\.mov$'), + compile(r'\.mp4$'), + compile(r'\.png$'), + compile(r'\.svg$'), + compile(r'\.tif$'), + compile(r'\.tiff$'), + compile(r'\.ttf$'), + compile(r'\.woff$'), + compile(r'\.zip$'), + compile(r'salt\.7$'), ] # files by mime type: @@ -100,589 +100,589 @@ # search for regex, call fn passing fname, out_fname and arg FILE_CHECKS = [ - ('exe_scan', regex.compile(r'''\.exe$'''), fn.file_scan_exe, None), - ('minor_file_h5', regex.compile(r'''\.h5$'''), fn.file_exists, None), - ('minor_file_hd5', regex.compile(r'''\.hd5$'''), fn.file_exists, None), - ('minor_file_hdf5', regex.compile(r'''\.hdf5$'''), fn.file_exists, None), - ('file_pkl', regex.compile(r'''\.pkl$'''), fn.file_exists, None), - ('minor_file_pt', regex.compile(r'''\.pt$'''), fn.file_exists, None), - ('file_secret', regex.compile(r'''secret'''), fn.file_exists, None), - ('tool_shellcheck', regex.compile(r'''\.sh$'''), fn.file_scan_shell, None), - ('minor_py_requirements', regex.compile(r'''requirements.txt'''), fn.file_run_tool, 'echo "{fname}" >> "{out_fname}"; safety check --full-report -r "{fname}" >> "{out_fname}"'), + ('exe_scan', compile(r'''\.exe$'''), fn.file_scan_exe, None), + ('minor_file_h5', compile(r'''\.h5$'''), fn.file_exists, None), + ('minor_file_hd5', compile(r'''\.hd5$'''), fn.file_exists, None), + ('minor_file_hdf5', compile(r'''\.hdf5$'''), fn.file_exists, None), + ('file_pkl', compile(r'''\.pkl$'''), fn.file_exists, None), + ('minor_file_pt', compile(r'''\.pt$'''), fn.file_exists, None), + ('file_secret', compile(r'''secret'''), fn.file_exists, None), + ('tool_shellcheck', compile(r'''\.sh$'''), fn.file_scan_shell, None), + ('minor_py_requirements', compile(r'''requirements.txt'''), fn.file_run_tool, 'echo "{fname}" >> "{out_fname}"; safety check --full-report -r "{fname}" >> "{out_fname}"'), ] HASH_EXCLUSIONS = [ - regex.compile('0000000000000000'), - regex.compile('0123456789'), - regex.compile('EXAMPLE'), - regex.compile('data:image'), - regex.compile('deadbeef'), - regex.compile('integrity'), - regex.compile('md5sum'), - regex.compile('reference'), - regex.compile('shasum'), - regex.compile(r'''\?rev='''), + compile('0000000000000000'), + compile('0123456789'), + compile('EXAMPLE'), + compile('data:image'), + compile('deadbeef'), + compile('integrity'), + compile('md5sum'), + compile('reference'), + compile('shasum'), + compile(r'''\?rev='''), ] -CS_EXCLUSIONS = [regex.compile(r'''^\s*//'''), ] -GO_EXCLUSIONS = [regex.compile(r'''^\s*//'''), ] +CS_EXCLUSIONS = [compile(r'''^\s*//'''), ] +GO_EXCLUSIONS = [compile(r'''^\s*//'''), ] LINE_CUSTOM_CHECKS = [ ] LINE_REGEX_CHECKS = [ - ('apple_keychain_item', regex.compile(r'''KeychainItem.{0,200}$'''), APPLE_FILES), - ('apple_ksecvaluedata', regex.compile(r'''kSecValueData.{0,200}$'''), APPLE_FILES), - ('apple_secitemupdate', regex.compile(r'''SecItemUpdate.{0,200}$'''), APPLE_FILES), - ('applescript_shell', regex.compile(r'''do\s+shell\s+script.{0,199}$''')), - ('asan_reference', regex.compile(r'''\W(asan|address_sanitizer|no_sanitize_address)\W.{0,200}$''')), - ('auth_basic', regex.compile(r'''Authorization.{0,20}Basic\s\w+.{0,200}$''')), - ('boost_process', regex.compile(r'''boost::process::child.{0,200}$''')), - ('c_arch_recv', regex.compile(r'''(recv|Recv|recvfrom|recvmsg|RecvFrom)\('''), C_FILES), - ('c_cpy_sizeof_src1', regex.compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*\(\s*\2\s*\)'''), C_FILES), - ('c_cpy_sizeof_src2', regex.compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*\2\W'''), C_FILES), - ('c_cpy_sizeof_src3', regex.compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*(\([^\)]*\))\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*(\()?\s*\3\s*(\))?'''), C_FILES), - ('c_cpy_sizeof_src4', regex.compile(r'''\W(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\([^,]+,\s*([^,]+)\s*,[^,;}]+\W\2\W'''), C_FILES), - ('c_cpy_sizeof_src5', regex.compile(r'''\W(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\([^,]+,\s*([^,]+)\s*,[^,;}]+\2'''), C_FILES), - ('c_fmt_off_by_one', regex.compile(r'''sprintf.*\%\.\*s.{0,99}sizeof.{0,99}$'''), C_FILES), - ('c_fscanf', regex.compile(r'''fscanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), - ('c_gets', regex.compile(r'''\Wgets\s*\(.{0,99}$'''), C_FILES), - ('c_insecure_loadlib', regex.compile(r'''\W(LoadLibrary|LoadLibraryA|LoadLibraryW|LoadLibraryEx|LoadLibraryExA|LoadLibraryExW)\([^/\n]{0,199}$'''), C_FILES), - ('c_malloc_wraparound', regex.compile(r'''k?malloc\(.*([+*]|-[^>])'''), C_FILES), - ('c_memcpy_wraparound', regex.compile(r'''memcpy\(.*([+*]|-[^>])'''), C_FILES), - ('c_memset_insecure_zeroing', regex.compile(r'''memset\s*\([^,]*,\s*0\s*.{0,99}$'''), C_FILES), - ('c_memset_zero_bytes', regex.compile(r'''memset\s*\([^,]*,[^,]*,\s*0\s*\).{0,99}$'''), C_FILES), - ('c_non_const_fmt_p1', regex.compile(r'''\W(printf|vprintf)\s*\([^",]+,[^",]+,'''), C_FILES), - ('c_non_const_fmt_p2', regex.compile(r'''\W(f|s|as|d|vf|vs|vas|vd)printf\s*\([^",]+,[^",]+,'''), C_FILES), - ('c_non_const_fmt_p3', regex.compile(r'''\W(sn|vsn)printf\s*\([^",]+,[^",]+,[^",]+,'''), C_FILES), - ('c_ntoh_length_wrap', regex.compile(r'''(length|size).*ntoh.*(-|\+|\*)'''), C_FILES), - ('c_potential_fmt_off_by_one', regex.compile(r'''sprintf.*\%\.\*s.{0,200}$'''), C_FILES), - ('c_scanf', regex.compile(r'''(f|s|vf|v|vs)\?scanf\s*\(.{0,99}$'''), C_FILES), - ('c_scanf2', regex.compile(r'''scanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), - ('c_scanf_s', regex.compile(r'''(f|s|vf|v|vs)\?scanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), - ('c_snprintf_retval_use', regex.compile(r'''\+=\s*v?snprintf.{0,99}$'''), C_FILES), - ('c_socket', regex.compile(r'''socket\('''), C_FILES), - ('c_sprintf_ls', regex.compile(r'''sprintf\s*\(.*\"[^\"]*%ls.{0,99}$'''), C_FILES), - ('c_sprintf_path', regex.compile(r'''s.?printf\(.{0,99}(/%s|%s/).{0,99}$'''), C_FILES), - ('c_sprintf_s', regex.compile(r'''sprintf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), - ('c_sscanf_s', regex.compile(r'''sscanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), - ('c_trusted_length_in_input', regex.compile(r'''len\s*=.*\*.{0,199}$'''), C_FILES), - ('c_warning_supress', regex.compile(r'''#pragma\s+warning\s*\(\s*suppress'''), C_FILES), - ('cfg_haproxy_plaintext_password', regex.compile(r'''insecure-password.{0,99}$'''), CFG_FILES), - ('chpasswd', regex.compile(r'''chpasswd.{0,200}$''')), - ('cmdi_Popen2', regex.compile(r'''\WPopen\([^)].{0,99}$''')), - ('cmdi_c_process_exec', regex.compile(r'''exec[lv][epP]*\(.{0,99}$''')), - ('cmdi_check_output', regex.compile(r'''\Wcheck_output\([^)].{0,99}$''')), - ('cmdi_child_process', regex.compile(r'''child_process.{0,99}$''')), - ('cmdi_command', regex.compile(r'''["\'](chmod|chown|cmd.exe|copy|cp|git|gzip|mkdir|mktemp|rm|ssh|tar|unzip|/bin/sh|gunzip|del|cat|sed)\s.{0,199}$''')), - ('cmdi_createProcess', regex.compile(r'''\WCreateProcess\W.{0,99}$''')), - ('cmdi_dotnet_process', regex.compile(r'''\.StartInfo.{0,99}$'''), CS_FILES, CS_EXCLUSIONS), - ('cmdi_exe_exec', regex.compile(r'''\"\w+\.exe\".{0,99}$''')), - ('cmdi_exec', regex.compile(r'''\W\.exec.{0,99}$''')), - ('cmdi_exec2', regex.compile(r'''^.{0,99}\Wexec\(.{0,99}$''')), - ('cmdi_lua_exec', regex.compile(r'''os\.execute.{0,99}$''')), - ('cmdi_options', regex.compile(r'''^.{0,199}(("[^\n"$-]*\s--[^-])|("--\w)).{0,199}$''')), - ('cmdi_perl_interp', regex.compile(r'''\Wsystem\("[^"]*\$.{0,99}$'''), PL_FILES), - ('cmdi_perl_interp2', regex.compile(r'''\Wsystem\("[^"]*@.{0,99}$'''), PL_FILES), - ('cmdi_popen', regex.compile(r'''popen\([^)].{0,99}$''')), - ('cmdi_process_new', regex.compile(r'''new\sProcess\(.{0,99}$''')), - ('cmdi_scala_cmd_bang', regex.compile(r'''\.![^!].{0,99}$''')), - ('cmdi_scala_cmd_bangbang', regex.compile(r'''\.!!.{0,99}$''')), - ('cmdi_scala_processbuilder', regex.compile(r'''ProcessBuilder\s*\(.{0,99}$''')), - ('cmdi_shell_exec', regex.compile(r'''shell_exec.{0,99}$''')), - ('cmdi_shellexec', regex.compile(r'''ShellExecute.{0,199}$''')), - ('cmdi_spawn', regex.compile(r'''^.{0,99}\Wspawn\(.{0,99}$''')), - ('cmdi_system_noempty', regex.compile(r'''\Wsystem\([^)].{0,99}$''')), - ('cmdi_win_proc_start', regex.compile(r'''ProcessStartInfo.{0,99}$''')), - ('comment_credit_card', regex.compile(r'''credit.card.{0,99}$''')), - ('comment_cvv', regex.compile(r'''\Wcvv\W.{0,99}$''')), - ('comment_inflate_version', regex.compile(r'''inflate.*[0123456789.]{3,}.*Copyright.*Mark.*Adler.{0,99}$''')), - ('comment_luck', regex.compile(r'''\Wlucky*\W''')), - ('comment_obscenities', regex.compile(r'''\W(asshole|bastard|brainfuck|cock|crap|crappy|cunt|dick|flippin|flipping|fuck|fucking|motherfucker|screwed|shit|pussy|tits)\W.{0,99}$''')), - ('comment_rubocop_disable', regex.compile(r'''rubocop:disable.{0,99}$''')), - ('comment_rubocop_disable_security', regex.compile(r'''rubocop:disable\s+Security.{0,99}$'''), RUBY_FILES), - ('comment_security_concern', regex.compile(r'''security (concern|problem|vulnerability|issue).{0,199}$''')), - ('comment_static_analysis_tool', regex.compile(r'''(?i)(NOLINT|\Wnosem\W|noinspection|safesql|coverity|fortify|veracode|Prefast|DevSkim|checkmarx|\Wnosec\W|\WNOSONAR\W|@SuppressWarnings|\Wnoqa\W).{0,99}$''')), - ('comment_todos', regex.compile(r'''\W(TODO|HACK|FIXME|XXX|BROKEN)\W.{0,99}$''')), - ('const_amazon_s3_url', regex.compile(r'''s3://[^\.].{3,199}$''')), - ('const_amazon_s3_url2', regex.compile(r'''https://s3-.{3,299}$''')), - ('const_amazon_secret_key', regex.compile(r'''["\'][A-Za-z0-9/+=]{40}["\'].{0,99}$'''), None, [regex.compile('reference')]), - ('const_aws_hosts', regex.compile(r'''\S{10,199}\.amazonaws\.com.{0,199}$''')), - ('cors_allow_all', regex.compile(r'''Access-Control-Allow-Origin.*"\*".{0,99}$''')), - ('createEvent', regex.compile(r'''CreateEvent.{0,99}$''')), - ('cred_CAPS_secret', regex.compile(r'''[A-Z0-9]{1..99}_SECRET[A-Z0-9_]*.{0,99}$''')), - ('cred_access_token', regex.compile(r'''^.{0,299}x-access-token.{0,299}$''')), - ('cred_access_token', regex.compile(r'''^\s*access_token:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{18,}\s*$''')), - ('cred_api_key', regex.compile(r'''^[^=\n]{0,199}API_KEY[^\n]{7,199}$''')), - ('cred_api_token', regex.compile(r'''api_token=[0-9a-f]{40}.{0,200}$''')), - ('cred_auth', regex.compile(r'''"AUTH"[,\s]+"[^\n]{5,99}".{0,99}$''')), - ('cred_auth_header', regex.compile(r'''Authorization:\s*\w+\s*[A-Za-z0-9.+=_@!^&*()-?]{8,200}\W''')), - ('cred_aws_access_id2', regex.compile(r'''(^|[^A-Z0-9])(AKIA|ASIA)[A-Z0-9]{16}($|[^A-Z0-9]).{0,99}$''')), - ('cred_aws_creds', regex.compile(r'''(AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY|AWS_DEFAULT_REGION).{20,199}$''')), - ('cred_aws_secret_key', regex.compile(r'''(AWSSecretKey|AwsDevSecretKey|SecretKey|ClientSecret|BasicAWSCredentials|clientSecret|AWS_SECRET_KEY|AgentToken).{0,199}$''')), - ('cred_azure_client_id', regex.compile(r'''client_id[^\n]+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}.{0,199}$''')), - ('cred_azure_client_secret', regex.compile(r'''client_secret[^\n]+\W[a-zA-Z0-9\+\-\_\/]{32}\W.{0,199}$''')), - ('cred_azure_storage_key', regex.compile(r'''[Aa]zure[Ss]torage[Kk]ey.*[Aa]ccount[Kk]ey.{0,499}$''')), - ('cred_azure_tenant_id', regex.compile(r'''tenant_id[^\n]+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}.{0,199}$''')), - ('cred_base64', regex.compile(r'''base64.{0,99}$''')), - ('cred_bcrypt_hash', regex.compile(r'''.{0,199}$''')), - ('cred_buildfile', regex.compile(r'''.{5,200}''')), - ('cred_config_key', regex.compile(r'''add\s+key="\w*key\w*".{1,99}$'''), CFG_FILES), - ('cred_config_password', regex.compile(r'''add\s+key="\w*password\w*".{1,99}$'''), CFG_FILES), - ('cred_config_secret', regex.compile(r'''add\s+key="\w*secret\w*".{1,99}$'''), CFG_FILES), - ('cred_connectionString', regex.compile(r'''ConnectionString\s*=.{0,99}$''')), - ('cred_connectionstring2', regex.compile(r'''(DSN|DATASOURCE|UID|USER\sID|USER)=[^;].{1,99}(PASSWORD|PWD)=[^;].{1,99}$''')), - ('cred_curl_auth', regex.compile(r'''^.{0,200}curl[^\n]{0,200}-u[^\n]{0,200}:[^\n]{0,200}$''')), - ('cred_dot_secret_key', regex.compile(r'''\.SecretKey.{0,99}$''')), - ('cred_dotnet_password', regex.compile(r'''^.{0,200}assword\s*=\s*"[^"]+".{0,200}$'''), CS_FILES), - ('cred_env_password', regex.compile(r'''^.{0,200}ENV\s*\w*PASS\w*\s*"[^"]+".{0,200}$''')), - ('cred_facebook', regex.compile(r'''(?i)facebook[^=]*=[^=]*[0-9a-f]{32}.{0,99}$''')), - ('cred_github', regex.compile(r'''(?i)github[^=]*=[^=]*[0-9a-zA-Z]{35,40}.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_github_token', regex.compile(r'''GITHUB_TOKEN.{0,299}$''')), - ('cred_google_clientid', regex.compile(r'''clientId.{30,80}googleusercontent.com.{0,299}$''')), - ('cred_hash_1', regex.compile(r'''\$1\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_10', regex.compile(r'''\$krb5tgs\$23\$.{0,99}$''')), - ('cred_hash_11', regex.compile(r'''\$md5\$.*\$.{0,99}$''')), - ('cred_hash_12', regex.compile(r'''\$ml\$\d+\$.{0,99}$''')), - ('cred_hash_13', regex.compile(r'''\$office\$\*2007\*.{0,99}$''')), - ('cred_hash_14', regex.compile(r'''\$office\$\*2010\*.{0,99}$''')), - ('cred_hash_15', regex.compile(r'''\$office\$\*2013\*.{0,99}$''')), - ('cred_hash_16', regex.compile(r'''\$oldoffice\$1\*\d+.{0,99}$''')), - ('cred_hash_17', regex.compile(r'''\$S\$.{0,99}$''')), - ('cred_hash_19', regex.compile(r'''\W[a-f0-9]{128}:\w+\W.{0,99}$''')), - ('cred_hash_2', regex.compile(r'''\$2a\$05\$.{0,99}$''')), - ('cred_hash_21', regex.compile(r'''\W[a-f0-9]{32}:\w+\W.{0,99}$''')), - ('cred_hash_23', regex.compile(r'''\W[a-f0-9]{40}:\w+\W.{0,99}$''')), - ('cred_hash_25', regex.compile(r'''\W[a-f0-9]{64}:\w+\W.{0,99}$''')), - ('cred_hash_26', regex.compile(r'''\W\w+\$[a-f0-9]{16}\W.{0,99}$''')), - ('cred_hash_27', regex.compile(r'''\W\w+:\d+:[a-f0-9]{32}:[a-f0-9]{32}\W.{0,99}$''')), - ('cred_hash_28', regex.compile(r'''u4-netntlm::.{0,99}$''')), - ('cred_hash_29', regex.compile(r'''\{ssha1\}06\$.*\$.{0,99}$''')), - ('cred_hash_2x', regex.compile(r'''\$2\w\$\d+\$[A-Za-z0-9./]{20,}.{0,99}$''')), - ('cred_hash_3', regex.compile(r'''\$5\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_30', regex.compile(r'''\{ssha256\}06\$.{0,199}$''')), - ('cred_hash_31', regex.compile(r'''\{SSHA512\}.{0,199}$''')), - ('cred_hash_32', regex.compile(r'''\{ssha512\}06\$.{0,199}$''')), - ('cred_hash_33', regex.compile(r'''\{x-issha,\s*1024\}.{0,199}$''')), - ('cred_hash_4', regex.compile(r'''\$6\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_5', regex.compile(r'''\$8\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_6', regex.compile(r'''\$9\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_7', regex.compile(r'''\$apr1\$\w{4,99}$\w{4,99}.{0,99}$''')), - ('cred_hash_8', regex.compile(r'''\$DCC2\$\d+#.*#.{0,99}$''')), - ('cred_hash_9', regex.compile(r'''\$keepass\$\*\d+\*\d+\*\d+\*.{0,99}$''')), - ('cred_hash_AIX', regex.compile(r'''\{ssha256\}[0-9a-zA-Z\$\+\/\.]{20,}\W.{0,99}$''')), - ('cred_hash_AIX', regex.compile(r'''\{ssha512\}[0-9a-zA-Z\$\.\-\+\/]{20,}\W.{0,99}$''')), - ('cred_hash_Android_FDE_SamsungDEK', regex.compile(r'''\W[0-9a-fA-F]{160}\W.{0,99}$''')), - ('cred_hash_ArubaOS', regex.compile(r'''\W[0-9a-fA-F]{50}\W.{0,99}$''')), - ('cred_hash_Atlassian', regex.compile(r'''\{PKCS5S2\}[0-9a-zA-Z]{64}\W.{0,99}$''')), - ('cred_hash_Cisco_IOS_type_4', regex.compile(r'''\W[0-9a-zA-Z]{43}\W.{0,99}$''')), - ('cred_hash_Cisco_PIX_MD5', regex.compile(r'''password\s+[0-9a-zA-Z\+\.\/]{16}\s+encrypted.{0,99}$''')), - ('cred_hash_ColdFusion', regex.compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{64}\W.{0,99}$''')), - ('cred_hash_DES_Oracle', regex.compile(r'''\W[0-9a-fA-F]{16}:[0-9a-fA-F]{10}\W.{0,99}$''')), - ('cred_hash_DomainCachedCredentials', regex.compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{13}\W.{0,99}$''')), - ('cred_hash_EPi', regex.compile(r'''0x[0-9a-zA-Z]{60}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_FileZillaServer_0.9.55', regex.compile(r'''\W[0-9a-fA-F]{128}:[0-9a-fA-F]{64}\W.{0,99}$''')), - ('cred_hash_FortiGate', regex.compile(r'''\W[0-9a-zA-Z\+\.\/]{46}=\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_HMAC_SHA256', regex.compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{8}\W.{0,99}$''')), - ('cred_hash_IPB2', regex.compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), - ('cred_hash_IPMI2_RAKP_HMAC_SHA1', regex.compile(r'''\W[0-9a-fA-F]{130}:[0-9a-fA-F]{40}\W.{0,99}$''')), - ('cred_hash_Joomla', regex.compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{32}\W.{0,99}$''')), - ('cred_hash_MSSQL_2000', regex.compile(r'''0x01[0-9a-zA-Z]{90}\W.{0,99}$''')), - ('cred_hash_MSSQL_2005', regex.compile(r'''0x01[0-9a-zA-Z]{50}\W.{0,99}$''')), - ('cred_hash_MSSQL_2012_2014', regex.compile(r'''0x02[0-9a-zA-Z]{138}\W.{0,99}$''')), - ('cred_hash_MySQL323', regex.compile(r'''\W[0-9a-fA-F]{16}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_NetNTLMv1', regex.compile(r'''\W[0-9a-zA-Z]{48}:[0-9a-zA-Z]{16}\W.{0,99}$''')), - ('cred_hash_OSX', regex.compile(r'''\W[0-9a-fA-F]{48}\W.{0,99}$''')), - ('cred_hash_OSXv10.7', regex.compile(r'''\W[0-9a-fA-F]{136}\W.{0,99}$''')), - ('cred_hash_OpenCart', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{9}\W.{0,99}$''')), - ('cred_hash_Oracle11', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{20}\W.{0,99}$''')), - ('cred_hash_Oracle12', regex.compile(r'''\W[0-9a-fA-F]{160}\W.{0,99}$''')), - ('cred_hash_PeopleSoft', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{126}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_PeopleSoft2', regex.compile(r'''\W[0-9a-zA-Z]{27}=.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_PostgreSQL', regex.compile(r'''\W[0-9a-zA-Z]{32}:[0-9a-zA-Z]{2,20}\W.{0,99}$''')), - ('cred_hash_PunBB', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{12}\W.{0,99}$''')), - ('cred_hash_Radmin2', regex.compile(r'''\W[0-9a-fA-F]{32}[^:0-9a-fA-F].{0,99}$''')), - ('cred_hash_Redmine', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{32}\W.{0,99}$''')), - ('cred_hash_SHA_224', regex.compile(r'''\W[0-9a-fA-F]{56}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SHA_256', regex.compile(r'''\W[0-9a-fA-F]{64}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SHA_384', regex.compile(r'''\W[0-9a-fA-F]{96}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SHA_512', regex.compile(r'''\W[0-9a-fA-F]{128}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SSHA_256', regex.compile(r'''\{SSHA256\}[0-9a-zA-Z\+\/]{47}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SSHA_512', regex.compile(r'''\{SSHA512\}[0-9a-zA-Z\+]{95}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_SamsungAndroidPassword', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{16}\W.{0,99}$''')), - ('cred_hash_SipHash', regex.compile(r'''\W[0-9a-fA-F]{16}:[0-9a-fA-F]{32}\W.{0,99}$''')), - ('cred_hash_SybaseASE', regex.compile(r'''0x[0-9a-zA-Z]{84}\W.{0,99}$''')), - ('cred_hash_WindowsPhone8', regex.compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{256}\W.{0,99}$''')), - ('cred_hash_hMailServer', regex.compile(r'''\W[0-9a-fA-F]{70}\W.{0,99}$''')), - ('cred_hash_md4_md5', regex.compile(r'''\W[0-9a-fA-F]{32}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_md5', regex.compile(r'''md5\$.{0,99}\$[a-zA-Z0-9].{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_salted_md5', regex.compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), - ('cred_hash_salted_sha1', regex.compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), - ('cred_hash_saltedsha512', regex.compile(r'''\W[0-9a-fA-F]{128}:[0-9a-fA-F]{10}\W.{0,99}$''')), - ('cred_hash_sha1', regex.compile(r'''\W[0-9a-fA-F]{40}\W.{0,99}$'''), None, HASH_EXCLUSIONS), - ('cred_hash_vBulletin', regex.compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{30}\W.{0,99}$''')), - ('cred_hex_dblquotes', regex.compile(r'''^.{0,199}"[a-f0-9]{16,}".{0,199}$'''), None, HASH_EXCLUSIONS), - ('cred_identified_by', regex.compile(r'''IDENTIFIED\s+BY\s+\'[^\n]{0,299}$''')), - ('cred_in_url', regex.compile(r'''\w+://\w+:\w+@\w+.{0,99}$''')), - ('cred_jdbc_dbl', regex.compile(r'''"jdbc:\w+://[^"]{0,99}".{0,99}$''')), - ('cred_jdbc_sgl', regex.compile(r'''\'jdbc:\w+://[^\']{0,99}\'.{0,99}$''')), - ('cred_key', regex.compile(r'''^\s*key:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{10,}\s*$''')), - ('cred_key_equals', regex.compile(r'''^[^=\n]{0,199}KEY[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), - ('cred_keys', regex.compile(r'''\-----BEGIN[A-Z\s]*KEY[A-Z\s]*-----''')), - ('cred_mysql_connect_call', regex.compile(r'''new mysqli\(.{0,99}$''')), - ('cred_mysql_passwords', regex.compile(r'''\Wmysql\s.{0,99}[^-]-p[^\$\%].{0,99}$''')), - ('cred_network_credential', regex.compile(r'''\WNetworkCredential\(.{0,399}$''')), - ('cred_password', regex.compile(r'''^\s*password:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{10,}\s*$''')), - ('cred_password01', regex.compile(r'''\s--password\s*=\s*[^\$\%].{0,99}$''')), - ('cred_password02', regex.compile(r'''password=[^\s";.]*.{0,199}$''')), - ('cred_password03', regex.compile(r'''password"[^"]*value="[^"]*.{0,199}$''')), - ('cred_password04', regex.compile(r'''password"[^",\w]{0,50}"[^"]{0,50}".{0,199}$''')), - ('cred_password05', regex.compile(r'''key=[^\s";.]*.{0,199}$''')), - ('cred_password_config', regex.compile(r'''^\s*password\s\S{5,99}\s*$''')), - ('cred_password_equals', regex.compile(r'''^[^=\n]{0,199}PASSWORD[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), - ('cred_password_equals', regex.compile(r'''password[^=\n]{0,30}=.{0,199}$''')), - ('cred_password_equals2', regex.compile(r'''password\s*=\s*".{0,99}$''')), - ('cred_postgres_pgpass_format', regex.compile(r'''^[.a-zA-Z0-9_-]+(:[.a-zA-Z0-9_-]+){4}$''')), - ('cred_private_key', regex.compile(r'''privateKey.{0,99}$''')), - ('cred_public_key', regex.compile(r'''publicKey.{0,99}$''')), - ('cred_refreshToken', regex.compile(r'''refreshToken.{16,80}$''')), - ('cred_secret', regex.compile(r'''^\s*secret:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{18,}\s*$''')), - ('cred_secret_equals', regex.compile(r'''^[^=\n]{0,199}SECRET[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), - ('cred_secretname_equals', regex.compile(r'''(accesskey|secretkey|apisecret|apikey|GSUsername|GSPassword|SteamBuildMachineUsername|SteamBuildMachinePassword|S3BucketName).{0,99}[=:].{0,99}$''')), - ('cred_signtool_password', regex.compile(r'''signtool.*/p.{0,99}$''')), - ('cred_slack', regex.compile(r'''xox[baprs]-[^=]*=[^=]*.{0,99}$''')), - ('cred_stripe_secret_token', regex.compile(r'''(?i)STRIPE[^\n]+(sk)_[0-9a-zA-Z_]{10,64}.{0,99}$''')), - ('cred_stripe_token', regex.compile(r'''(?i)(sk|pk)_(test|live)_[0-9a-zA-Z]{10,32}.{0,99}$''')), - ('cred_telegram', regex.compile(r'''(?i)telegram[^=]*=[^=]*[0-9]{1,12}+:[0-9a-zA-Z-]{32,44}.{0,99}$''')), - ('cred_token_equals', regex.compile(r'''^[^=\n]{0,199}TOKEN[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), - ('cred_twitter', regex.compile(r'''(?i)twitter[^=]*=[^=]*[0-9a-zA-Z]{35,44}.{0,99}$''')), - ('crypto_algorithm_name', regex.compile(r'''\W(AES|DES|SHA|SHA1|SHA2|SHA256|SHA512|blowfish|MD5|IDEA|RSA|DSA|MD4|SHA3|HMAC)\W.{0,99}$''')), - ('crypto_api_call', regex.compile(r'''\W(CryptAcquireContext|CryptDeriveKey|CryptGenKey|CryptGenRandom)\W.{0,99}$''')), - ('crypto_b64', regex.compile(r'''AES\.DecryptFromBase64.{0,99}$''')), - ('crypto_b64_2', regex.compile(r'''AES\.DecryptFromBase64.{0,99}$''')), - ('crypto_diffie_hellman', regex.compile(r'''[D|d]iffie.*[H|h]ellman.{0,99}$''')), - ('cve_id', regex.compile(r'''\WCVE-\d\d\d\d-.{0,200}$''')), - ('define_password', regex.compile(r'''^.{0,99}#define.{0,99}PASSWORD.{0,99}".{0,99}$'''), C_FILES, CS_EXCLUSIONS), - ('df_c_sinks', regex.compile(r'''^.{0,99}\W(system|strcpy|strcat|memcpy|sprintf)\s*\(.{0,199}$'''), C_FILES), - ('df_c_sources', regex.compile(r'''^.{0,99}\W(recv|argv|fread|fgets|scanf|fscanf).{0,199}$'''), C_FILES), - ('df_dotnet_sinks', regex.compile(r'''^.{0,99}\W(GetAsync)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('df_dotnet_sinks', regex.compile(r'''^.{0,99}\W(WriteFile|FileSystem|SimpleDB|ExecuteSqlCommand|SqlCommand|ProcessStartInfo|CreateProcess|WriteAllText|HttpClient)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('df_dotnet_sinks', regex.compile(r'''^.{0,99}\WLIKE\s*'\%\{\w+}\%'.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('df_dotnet_sources', regex.compile(r'''^.{0,99}\W(QueryString|Request|HttpGet|HttpPost|HttpPut|FromBase64String|Parse|Load)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('df_dotnet_sources', regex.compile(r'''^.{0,99}\W(string.Format)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('df_java_sinks', regex.compile(r'''^.{0,99}\W"\s*\+\s*[^"]{1,199}".{0,199}$'''), JAVA_FILES), - ('df_java_sinks', regex.compile(r'''^.{0,99}\W(HttpHeaders|URI|setHeader|uploadFile|File|createFile|save)\W.{0,199}$'''), JAVA_FILES), - ('df_java_sinks', regex.compile(r'''^.{0,99}\W(execute|HttpClient|PostMethod|exec|Runtime|executeMethod|SqlQuery|executeQuery|QueryBuilder)\W.{0,199}$'''), JAVA_FILES), - ('df_java_sources', regex.compile(r'''^.{0,99}\W(FromBase64String|Parse|Load|JSONObject|InputStreamReader|BufferedReader|readLine|params|Param|RequestMapping)\W.{0,199}$'''), JAVA_FILES), - ('df_java_sources', regex.compile(r'''^.{0,99}\W(PathVariable|RequestBody|requestBody|RequestHeader|queryString|RequestParam|getParameter|GetMapping)\W.{0,199}$'''), JAVA_FILES), - ('df_java_sources', regex.compile(r'''^.{0,99}\W(PutMapping|PostMapping)\W.{0,199}$'''), JAVA_FILES), - ('df_php_sinks', regex.compile(r'''^.{0,99}\W(assert|copy|eval|exec|file|fopen|include|mssql_query|mysqli_query|pcntl_exec|pg_query|popen|require|require_once|shell_exec|system)\s*\(.{0,199}$'''), PHP_FILES), - ('df_php_sources', regex.compile(r'''^.{0,99}\W(\$_POST|\$_GET|\$_REQUEST|\$_COOKIE|readline|fscanf|fgets|file_get_contents).{0,199}$'''), PHP_FILES), - ('df_py_sinks', regex.compile(r'''^.{0,99}\W(rename|makedirs|open|write|HTTPAdapter|Request|urlopen|make_response|dumps|redirect|jsonify|chdir|remove)\s*\(.{0,199}$'''), PY_FILES), - ('df_py_sinks_crit', regex.compile(r'''^.{0,99}\W(system|check_output|execute|subprocess.call|Popen|popen)\s*\(.{0,199}$'''), PY_FILES), - ('df_py_sources', regex.compile(r'''^.{0,99}\W(loads|load|open|route|request.args|get_json|get|read)\s*\(.{0,199}$'''), PY_FILES), - ('df_py_sources', regex.compile(r'''^.{0,99}\W(request.form|session|args|environ|\+\W*\w+\W*\+).{0,199}$'''), PY_FILES), - ('df_ruby_sinks', regex.compile(r'''^.{0,99}\W(IO.binread|IO.binwrite|IO.foreach|JSON.load|JSON.parse|popen|read|write|eval|exec|spawn|syscall|system|eval|constantize|render).{0,199}$'''), RUBY_FILES), - ('df_ruby_sources', regex.compile(r'''^.{0,99}\W(params|query_parameters|path_parameters|get|post|query_string)\W.{0,199}$'''), RUBY_FILES), - ('dllimport', regex.compile(r'''dllimport.{0,99}$''')), - ('dotnet_Rfc2898DeriveBytes', regex.compile(r'''\WRfc2898DeriveBytes.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_allow_all', regex.compile(r'''allow.{0,10}users.{0,10}\*.{0,100}$'''), DOTNET_FILES), - ('dotnet_allow_users', regex.compile(r'''allow.{0,10}users.{0,10}=.{0,100}$''')), - ('dotnet_allowanonymous', regex.compile(r'''\[AllowAnonymous\].{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_app_paths', regex.compile(r'''location.{0,10}path.{0,10}=.{0,100}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_appendformat', regex.compile(r'''\.AppendFormat.{1,80}\{\d+\}.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_binaryformatter_deserial_CA2300', regex.compile(r'''\WBinaryFormatter.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_binarywrite', regex.compile(r'''\WBinaryWrite\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_certvalidation_none', regex.compile(r'''X509CertificateValidationMode\.None.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_cookie', regex.compile(r'''HttpCookie.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_crypto', regex.compile(r'''\WSystem\.Security\.Cryptography\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dirBrowse', regex.compile(r'''directoryBrowse.{1,20}enable.{1,20}true.{0,99}$'''), DOTNET_FILES), - ('dotnet_disablesecurity', regex.compile(r'''DisableSecurity.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dotnet_interpolation', regex.compile(r'''string\.Format\(.*{.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dotnet_net', regex.compile(r'''System\.Net.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dotnet_pipes', regex.compile(r'''System\.IO\.Pipes.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dotnet_saveas', regex.compile(r'''\.SaveAs\(.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_dotnet_string_format', regex.compile(r'''string\.Format.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_forms_authentication', regex.compile(r'''FormsAuthentication.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_insecure_rsa_padding', regex.compile(r'''\.Encrypt\(.{1,99}false.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_method', regex.compile(r'''\[Http(Post|Get|Patch|Put|Delete).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_pageload', regex.compile(r'''Page_Load.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_replaceQuote', regex.compile(r'''(Replace\("\""|Replace\("\'").{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_request_object', regex.compile(r'''\WRequest\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_response_object', regex.compile(r'''\WResponse\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_route', regex.compile(r'''\.MapRoute\(.{0,299}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_skip_auth', regex.compile(r'''SkipAuthorization.{0,100}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_skip_ssl_validation', regex.compile(r'''ServerCertificateCustomValidationCallback.{0,299}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqlClient', regex.compile(r'''\W(SqlClient|SqlCommand).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqlCmd', regex.compile(r'''\W(ExecuteSqlCommand|ExecuteSqlCommandAsync|SqlQuery).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqlConnection', regex.compile(r'''\WSqlConnection.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqlclient', regex.compile(r'''\W(SqlClient|SqlCommand).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqlcommand', regex.compile(r'''\W(ExecuteSqlCommand|ExecuteSqlCommandAsync|SqlQuery).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqli_and', regex.compile(r'''".{0,99}\Wand\W.{0,99}".{0,99}\+.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqli_doubleupquote', regex.compile(r'''Replace.{0,99}\'.{0,99}\'\'.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqli_interpolation', regex.compile(r'''=\s*{.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqli_select_brace', regex.compile(r'''"select.{0,199}\{.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_sqli_simpleDB', regex.compile(r'''\sSimpleDB\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_tripledes', regex.compile(r'''TripleDESCryptoServiceProvider.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_unsafe', regex.compile(r'''\sunsafe\s.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_validateinput_false', regex.compile(r'''\[ValidateInput.{1,20}false.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_weak_ecb_mode', regex.compile(r'''CipherMode\.ECB.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_web_dotnet_weak_hash', regex.compile(r'''(RIPEMD160|SHA1|MD5|MD2|MD4).{0,99}(.{0,99}){0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_webmethod', regex.compile(r'''\[(WebMethod|WebService|ScriptMethod|ScriptService).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('dotnet_writefile', regex.compile(r'''\WWriteFile\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('endpoints', regex.compile(r'''/endpoints/.{0,99}$''')), - ('export_creds', regex.compile(r'''^(.{0,10})export .{0,99}(LOGIN|USER|KEY|SECRET|BUCKET|TOKEN|CREDS|CREDENTIAL|PASS|AUTH).{0,99}=[^$]{6,199}$''')), - ('fileSystem_call', regex.compile(r'''FileSystem\W.{0,99}$''')), - ('file_Stream', regex.compile(r'''FileStream.{0,99}$''')), - ('file_copy', regex.compile(r'''\WFile\.Copy\(.{0,99}$''')), - ('file_copyFile', regex.compile(r'''copyFile\(.{0,99}$''')), - ('file_dot', regex.compile(r'''File\..{0,99}$''')), - ('file_get_contents', regex.compile(r'''file_get_contents.{0,99}$''')), - ('go_exec', regex.compile(r'''\Wexec\..{0,99}$'''), GO_FILES, GO_EXCLUSIONS), - ('go_exec_cmdi', regex.compile(r'''\Wexec\..{0,99}(/c|-c).{0,99}$'''), GO_FILES, GO_EXCLUSIONS), - ('go_http_client', regex.compile(r'''\Whttp\.(Client|Get|Post|PostForm|NewRequest)\W.{0,99}$'''), GO_FILES), - ('go_http_cookie', regex.compile(r'''\Whttp\.(Cookie|SetCookie)\W.{0,99}$'''), GO_FILES), - ('go_http_header', regex.compile(r'''\Whttp\.Header\W.{0,99}$'''), GO_FILES), - ('go_http_server', regex.compile(r'''\Whttp\.(ListenAndServe|Handle|HandleFunc|Server)\W.{0,99}$'''), GO_FILES), - ('go_http_server_plaintext_only', regex.compile(r'''\Whttp\.ListenAndServe\(\W.{0,99}$'''), GO_FILES), - ('go_os', regex.compile(r'''\Wos\..{0,99}$'''), GO_FILES, GO_EXCLUSIONS), - ('go_reflect', regex.compile(r'''\Wreflect\..{0,99}$'''), GO_FILES, [regex.compile(r'''(DeepEqual|ValueOf)'''), ]), - ('go_sprintf_s', regex.compile(r'''Sprintf\s*\(.*\"[^\"]*%s.{0,99}$'''), GO_FILES), - ('go_sqli_select', regex.compile(r'''\.Select\(.{0,99}$'''), GO_FILES), - ('go_sqli_sqlmodule', regex.compile(r'''"database/sql"'''), GO_FILES), - ('go_ssh_ignore_host_key', regex.compile(r'''\WInsecureIgnoreHostKey.{0,99}$'''), GO_FILES, GO_EXCLUSIONS), - ('go_unsafe', regex.compile(r'''\Wunsafe\W.{0,99}$'''), GO_FILES), - ('go_world_fileperms', regex.compile(r'''(Mkdir|WriteFile|Chmod|OpenFile|FileMode|\Wos\.)\W0[0-7][0-7][1-7]\W.{0,99}$'''), GO_FILES), - ('go_world_write', regex.compile(r'''(Mkdir|WriteFile|Chmod|OpenFile|FileMode|\Wos\.)\W0[0-7][0-7](1|2|3|5|6|7)\W.{0,99}$'''), GO_FILES), - ('go_xss_writestring', regex.compile(r'''io\.WriteString\W.{0,99}$'''), GO_FILES), - ('http_user_agent', regex.compile(r'''HTTP_USER_AGENT.{0,99}$''')), - ('http_x_forwarded_for', regex.compile(r'''HTTP_X_FORWARDED_FOR.{0,99}$''')), - ('insecure_url', regex.compile(r'''http://([a-zA-Z0-9]+\.)+[a-zA-Z0-9]+.{0,200}$'''), None, [regex.compile(r'''^\s*(\*+|//|/*|#|;)\s+'''), regex.compile(r'''(readme|\.md|xlmns|doctype)''')]), # noqa - ('insecure_url2', regex.compile(r'''^.{0,200}http://.{0,200}$'''), None, [regex.compile(r'''^\s*(\*+|//|/*|#|;)\s+'''), regex.compile(r'''(readme|\.md|\|xlmns|doctype)''')]), # noqa - ('intercept_url', regex.compile(r'''intercept-url{0,200}$''')), - ('java_deserialisation', regex.compile(r'''\.readObject\(.{0,99}$'''), JAVA_FILES), - ('java_spring_expression_lang_injection', regex.compile(r'''(,]*\s+(false|0).{0,99}$'''), PHP_FILES), - ('php_strcmp_array_bypass', regex.compile(r'''strcmp.*==.{0,200}$'''), PHP_FILES), - ('php_var_func', regex.compile(r'''\$\w+\(.{0,99}$'''), PHP_FILES), - ('php_var_include', regex.compile(r'''(include|require).{0,99}\$.{0,99}$'''), PHP_FILES), - ('php_xss_tag', regex.compile(r'''<\w+>.*\$\w+.{0,200}$'''), PHP_FILES), - ('plaintext_port', regex.compile(r'''\.createInsecure\(.{0,99}$''')), - ('priv_chmod', regex.compile(r'''chmod\(.{0,199}$''')), - ('priv_chown', regex.compile(r'''chown\(.{0,199}$''')), - ('py_check_output', regex.compile(r'''check_output\(.{0,99}$'''), PY_FILES), - ('py_deserialisation', regex.compile(r'''pickle\.loads\(.{0,99}$'''), PY_FILES), - ('py_deserialisation2', regex.compile(r'''pickle\.load\(.{0,99}$'''), PY_FILES), - ('py_filesystem', regex.compile(r'''require\(\'fs\'\).{0,99}$'''), PY_FILES), - ('py_flask_debug_mode', regex.compile(r'''^.{0,200}app\.run.{0,100}debug\s*=\s*True.{0,200}$'''), PY_FILES), - ('py_flask_autoescape', regex.compile(r'''^.{0,200}autoescape\s+false.{0,200}$'''), PY_FILES + HTM_FILES), - ('py_flask_pipe_safe', regex.compile(r'''^.{0,200}\|\s*safe.{0,200}$'''), PY_FILES + HTM_FILES), - ('py_flask_markup', regex.compile(r'''^.{0,200}\WMarkup\(.{0,200}$'''), PY_FILES), - ('py_mktemp_banned', regex.compile(r'''^.{0,200}\Wmktemp\s*\(.{0,200}$'''), PY_FILES), - ('py_shell_is_true', regex.compile(r'''shell\s*=\s*True.{0,99}$'''), PY_FILES), - ('py_subprocess_call', regex.compile(r'''subprocess.call\(.{0,99}$'''), PY_FILES), - ('py_subprocess_run', regex.compile(r'''subprocess.run\(.{0,99}$'''), PY_FILES), - ('python_deserial', regex.compile(r'''\.loads\(.{0,99}$'''), PY_FILES), - ('python_format_cmdi', regex.compile(r'''"[^"]*-[^"]\{[^"]*"\.format.{0,99}$'''), PY_FILES), - ('rand_math_random', regex.compile(r'''\WMath\.random\(\W.{0,99}$''')), - ('rand_net_random', regex.compile(r'''\W(System\.Random).{0,99}$''')), - ('rand_new_random', regex.compile(r'''\Wnew\sRandom\(\W.{0,99}$''')), - ('rand_rand', regex.compile(r'''\Wrand\s*\(\W.{0,99}$''')), - ('rand_random', regex.compile(r'''\Wrandom\s*\(\W.{0,99}$''')), - ('rand_time', regex.compile(r'''\W(ftime|gettimeofday|GetTickCount|GetTickCount64|QueryPerformanceCounter|GetSystemTime|GetLocalTime|GetSystemTimeAsFileTime|NtQuerySystemTime|time|uniqid|microtime)\(.{0,99}$''')), - ('rand_util_random', regex.compile(r'''\Wutil\.Random\W.{0,99}$'''), JAVA_FILES), - ('rand_windows_good', regex.compile(r'''\W(CryptGenRandom)\W.{0,99}$''')), - ('rds_hosts', regex.compile(r'''\S{10,199}\.rds\.amazonaws\.com''')), - ('rootpwd', regex.compile(r'''[\s"\'^\(\{\[]root/[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{12,}''')), - ('routing_controller', regex.compile(r'''@Controller.{0,200}$''')), - ('routing_decorator', regex.compile(r'''\[Route\(.{0,99}$''')), - ('routing_decorator2', regex.compile(r'''\[RoutePrefix\(.{0,99}$''')), - ('routing_flask', regex.compile(r'''\badd_resource\b'''), PY_FILES), - ('routing_get', regex.compile(r'''Get\[.{0,99}$''')), - ('routing_java_get', regex.compile(r'''@GET.{0,99}$'''), JAVA_FILES), - ('routing_java_getmapping', regex.compile(r'''@GetMapping.{0,99}$'''), JAVA_FILES), - ('routing_java_path', regex.compile(r'''@Path\(.{0,99}$'''), JAVA_FILES), - ('routing_java_post', regex.compile(r'''@POST.{0,99}$'''), JAVA_FILES), - ('routing_java_requestmapping', regex.compile(r'''@RequestMapping.{0,99}$'''), JAVA_FILES), - ('routing_java_requestmethod', regex.compile(r'''RequestMethod\.[A-Z]+.{0,99}$'''), JAVA_FILES), - ('routing_node_get', regex.compile(r'''^.{0,99}\.get\(.{0,99}$'''), JS_FILES), - ('routing_node_post', regex.compile(r'''^.{0,99}\.post\(.{0,99}$'''), JS_FILES), - ('routing_node_put', regex.compile(r'''^.{0,99}\.put\(.{0,99}$'''), JS_FILES), - ('routing_python', regex.compile(r'''\.add_resource\W.{0,200}$'''), PY_FILES), - ('routing_web', regex.compile(r'''\.route\(.{0,199}$''')), - ('rpc_reg', regex.compile(r'''RpcServerRegisterIf.{0,199}$'''), C_FILES), - ('ruby_bad_hash', regex.compile(r'''(Digest::MD5|Digest::SHA1)'''), RUBY_FILES), - ('ruby_cmdi_backtick', regex.compile(r'''^[^"\n]*`[^`\n]*#\{[^`\n]+`'''), RUBY_FILES), - ('ruby_cmdi_backtick', regex.compile(r'''^[^"\n]*`[^`\n]+`'''), RUBY_FILES), - ('ruby_cmdi_backtick2', regex.compile(r'''`#\{'''), RUBY_FILES), - ('ruby_cmdi_exec', regex.compile(r'''\Wexec\W'''), RUBY_FILES), - ('ruby_cmdi_percent_x', regex.compile(r'''%x[\(\{]'''), RUBY_FILES), - ('ruby_cmdi_percent_x', regex.compile(r'''%x[\(\{].*#\{'''), RUBY_FILES), - ('ruby_cmdi_popen', regex.compile(r'''IO\.popen'''), RUBY_FILES), - ('ruby_cmdi_popen', regex.compile(r'''IO\.popen.*#\{'''), RUBY_FILES), - ('ruby_cmdi_popen2', regex.compile(r'''\Wpopen.{0,200}'''), RUBY_FILES), - ('ruby_cmdi_spawn', regex.compile(r'''Process\.spawn'''), RUBY_FILES), - ('ruby_cmdi_spawn', regex.compile(r'''Process\.spawn.*#\{'''), RUBY_FILES), - ('ruby_cmdi_system', regex.compile(r'''\Wsystem\W.*#\{'''), RUBY_FILES), - ('ruby_custom_header', regex.compile(r'''request\.headers\['''), RUBY_FILES), - ('ruby_env', regex.compile(r'''\WENV\[".*"\]'''), RUBY_FILES), - ('ruby_json_load_RCE', regex.compile(r'''JSON\.load'''), RUBY_FILES), - ('ruby_rails_version', regex.compile(r'''^\s*rails\s*\([0-9\.]+\)'''), 'Gemfile.lock'), - ('ruby_req_header', regex.compile(r'''\.headers\["[a-zA-Z0-9-]"\]'''), RUBY_FILES), - ('ruby_route_delete', regex.compile(r'''\Wdelete\s'''), RUBY_FILES), - ('ruby_route_get', regex.compile(r'''\Wget\s'''), RUBY_FILES), - ('ruby_route_match', regex.compile(r'''\Wmatch\s'''), RUBY_FILES), - ('ruby_route_post', regex.compile(r'''\Wpost\s'''), RUBY_FILES), - ('ruby_route_put', regex.compile(r'''\Wput\s'''), RUBY_FILES), - ('ruby_sqli_from', regex.compile(r'''\Wfrom\(.*#'''), RUBY_FILES), - ('ruby_sqli_order', regex.compile(r'''\Worder\(.*#'''), RUBY_FILES), - ('ruby_sqli_where', regex.compile(r'''\Wwhere\(.*#'''), RUBY_FILES), - ('ruby_sqli_where_interp', regex.compile(r'''\.where.*#{'''), RUBY_FILES), - ('ruby_string_interpolation', regex.compile(r'''"[^"#]*#\{'''), RUBY_FILES), - ('ruby_url_string_interpolation', regex.compile(r'''https?://.*#\{.{0,99}$'''), RUBY_FILES), - ('ruby_yaml_load_file', regex.compile(r'''\.load_file\W.{0,99}$'''), RUBY_FILES), - ('secure_url', regex.compile(r'''https://([a-zA-Z0-9]+\.)+[a-zA-Z0-9]+.{0,200}$''')), - ('segv_reference', regex.compile(r'''\W(segvs|segv|sigsegv)\W.{0,200}$''')), - ('simpleDB', regex.compile(r'''SimpleDB.{0,99}$''')), - ('sqli_brace_interpolation', regex.compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\{\d+\}.*("|\').{0,99}$''')), - ('sqli_c', regex.compile(r'''"select\s.{1,200}%s.{0,99}$'''), C_FILES), - ('sqli_compileSelectWhere', regex.compile(r'''CompileSelectWhere.{0,99}$''')), - ('sqli_createSQLQuery', regex.compile(r'''createSQLQuery.{0,99}$''')), - ('sqli_dblink', regex.compile(r'''dblink.{0,99}$''')), - ('sqli_dbms_sql_exec', regex.compile(r'''dbms_sql.execute.{0,99}$''')), - ('sqli_deprecated_escape', regex.compile(r'''PQescapeString\(.{0,99}$''')), - ('sqli_deprecated_escape2', regex.compile(r'''mysql_escape_string\(.{0,99}$''')), - ('sqli_dollar_interpolation', regex.compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\$.*("|\').{0,99}$''')), - ('sqli_dotnet_interpolation2', regex.compile(r'''\Wselect\s+[a-zA-z0-9\.,\*]+\s+from.{1,80}{\d+}.{0,99}$'''), DOTNET_FILES), - ('sqli_exec_sp', regex.compile(r'''ExecuteStoredProcedure\(.{0,99}$''')), - ('sqli_import_java_sql', regex.compile(r'''import\s+java.sql.{0,99}$''')), - ('sqli_in_joined_strings', regex.compile(r'''\.{0,199}strings\.Join\(.{0,199}''')), - ('sqli_insert', regex.compile(r'''\Winsert\s+into\s+[a-zA-z0-9\.,\*].{0,99}$''')), - ('sqli_interpolate_brace', regex.compile(r'''^.{0,199}\'\{\s*\d+\s*\}\'.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('sqli_java_concat', regex.compile(r'''"[\s\(]*\b(select|insert|update|delete)\b.{0,199}"\s*\+\s*\w+.{0,99}$'''), JAVA_FILES), - ('sqli_java_sqli_append', regex.compile(r'''sql\.append\(.{0,99}$''')), - ('sqli_joined_strings_sgl', regex.compile(r'''strings\.Join\(.{0,199}\'.{0,199}$''')), - ('sqli_like', regex.compile(r'''LIKE.*(%'|'%).{0,99}$''')), - ('sqli_oracle_execute_immediate', regex.compile(r'''\Wexecute\s+immediate\W.{0,99}$''')), - ('sqli_orcl_dbms_sql_parse', regex.compile(r'''dbms_sql.parse.{0,99}$''')), - ('sqli_orcl_exec_immediate', regex.compile(r'''EXECUTE\s+IMMEDIATE.{0,99}$''')), - ('sqli_order_by', regex.compile(r'''order\sby.{0,99}$''')), - ('sqli_partial_view', regex.compile(r'''\WPartialView\(.{0,99}$''')), - ('sqli_percent_interpolation', regex.compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\%.*("|\').{0,99}$''')), - ('sqli_py_interp', regex.compile(r'''\.execute\(\s*".{0,99}\%s.{0,99}$'''), PY_FILES), - ('sqli_queryBuilder', regex.compile(r'''queryBuilder.{0,99}$''')), - ('sqli_queryRaw', regex.compile(r'''queryRaw\(.{0,99}$''')), - ('sqli_select_from', regex.compile(r'''\Wselect\W.{0,99}\Wfrom\W.{0,99}$''')), - ('sqli_simpleDBSelect', regex.compile(r'''\.SelectRequest.{0,99}$''')), - ('sqli_sp_executesql', regex.compile(r'''\Wsp_executesql\W.{0,99}$''')), - ('sqli_sp_xp', regex.compile(r'''\W(exec\ssp_|exec\sxp_).{0,99}$''')), - ('sqli_sqlHelper', regex.compile(r'''sqlHelper.runQuery.{0,99}$''')), - ('sqli_sql_apis', regex.compile(r'''\W(OleDbConnection|ADODB\.|System\.Data\.Sql|\.ResultSet).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), - ('sqli_sql_execute', regex.compile(r'''\WEXECUTE\W.{0,99}$''')), - ('sqli_where', regex.compile(r'''\s+WHERE\s+[^\n]*\$\w+.{0,99}$''')), - ('ssh_disable_hostkey_check', regex.compile(r'''StrictHostKeyChecking=no.{0,99}$''')), - ('ssl_disable_curl', regex.compile(r'''curl.{0,99}\s-k\W.{0,99}$''')), - ('ssl_disable_java', regex.compile(r'''InsecureRequestWarning.{0,99}$''')), - ('ssl_disable_mysql', regex.compile(r'''--skip-ssl.{0,99}$''')), - ('ssl_disable_python', regex.compile(r'''checkServerTrusted.{0,99}$''')), - ('ssl_disable_python2', regex.compile(r'''no-check-cert.{0,99}$''')), - ('ssl_disable_python3', regex.compile(r'''verify\s*=\s*False.{0,99}$''')), - ('ssl_disable_python4', regex.compile(r'''rejectUnauthorized.{99}[Ff]alse.{0,99}$''')), - ('ssl_disable_wget', regex.compile(r'''wget.{0,200}--no-check-certificate.{0,200}$''')), - ('str_dot_net', regex.compile(r'''\.Format.{1,80}\s-.{1,80}{\d+}.{0,99}$''')), - ('str_dot_net2', regex.compile(r'''\.Format.{1,80}\{\d+\}.{1,80}\s-.{1,80}.{0,99}$''')), - ('str_interp_brace', regex.compile(r'''\$\".{0,99}{.{0,99}\".{0,99}$''')), - ('str_interp_dollar', regex.compile(r'''\".{0,99}\$.{0,99}\".{0,99}$''')), - ('str_join', regex.compile(r'''string\.Join\(.{0,199}$''')), - ('str_mixed_quote_dbl_sgl', regex.compile(r'''^.{0,99}\"\'.{0,99}$''')), - ('str_mixed_quote_sgl_dbl', regex.compile(r'''^.{0,99}\'\".{0,99}$''')), - ('str_plus', regex.compile(r'''\'\s*\+.{0,99}\+\s*\'.{0,99}$''')), - ('str_scala_mkString', regex.compile(r'''\.mkString\(.{0,99}$''')), - ('todo_authenticate', regex.compile(r'''TODO.*authenticate.{0,200}$''')), - ('todo_encrypt', regex.compile(r'''TODO.*encrypt.{0,200}$''')), - ('todo_login', regex.compile(r'''TODO.*login.{0,200}$''')), - ('todo_password', regex.compile(r'''TODO.*password.{0,200}$''')), - ('todo_password2', regex.compile(r'''password.*TODO.{0,200}$''')), - ('trusted_plaintext_docker_repo', regex.compile(r'''trusted\s*=\s*yes.*http://.{0,99}$''')), # noqa - ('uniq_ip_addresses', regex.compile(r'''[\'"]([1-2]?[0-9]?[0-9]\.){3}([1-2]?[0-9]?[0-9])[\'"]''')), - ('unreal_fs', regex.compile(r'''FFileHelper::''')), - ('unreal_mem', regex.compile(r'''FMemory::''')), - ('unreal_module', regex.compile(r'''FModuleManager::''')), - ('unreal_paths', regex.compile(r'''FPaths::''')), - ('url_numeric', regex.compile(r'''^[^#]*http(s)?://\d+\.\d+\.\d+\.\d+.{0,200}$'''), None, [regex.compile('127.0.0.1')]), - ('url_pattern', regex.compile(r'''url-pattern{0,200}$''')), - ('useradd', regex.compile(r'''useradd.{0,200}$''')), - ('username_email', regex.compile(r'''[^/]userName:\s*[\.a-zA-Z0-9\_\-]+@[\.a-zA-Z0-9\_\-]+(\.[\.a-zA-Z0-9\_\-]+)+[^\n]{0,200}$''')), - ('ver_aws_sdk', regex.compile(r'''AWS_SDK_VERSION_STRING.{0,99}$''')), - ('ver_bzip', regex.compile(r'''BZ_VERSION.{0,99}$''')), - ('ver_jansson', regex.compile(r'''JANSSON_VERSION.{0,99}$''')), - ('ver_jsoncpp', regex.compile(r'''AWS_JSONCPP_VERSION_STRING.{0,99}$''')), - ('ver_libcurl', regex.compile(r'''LIBCURL_VERSION.{0,99}$''')), - ('ver_libcurl_str', regex.compile(r'''#define LIBCURL_VERSION "[^"]+"''')), - ('ver_libpng', regex.compile(r'''PNG_LIBPNG_VER_STRING.{0,99}$''')), - ('ver_mariadb', regex.compile(r'''MARIADB_PACKAGE_VERSION.{0,99}$''')), - ('ver_mdb', regex.compile(r'''(MDB_VERSION_MAJOR|MDB_VERSION_MINOR|MDB_VERSION_PATCH).{0,99}$''')), - ('ver_mongoose', regex.compile(r'''MONGOOSE_VERSION.{0,99}$''')), - ('ver_openssl', regex.compile(r'''OPENSSL_VERSION_TEXT.{0,99}$''')), - ('ver_postgres', regex.compile(r'''(PG_MAJORVERSION|PG_VERSION|PG_VERSION_STR).{0,99}$''')), - ('ver_sqlite', regex.compile(r'''SQLITE_VERSION.{0,99}$''')), - ('ver_u_icu', regex.compile(r'''U_ICU_VERSION.{0,99}$''')), - ('ver_zlib', regex.compile(r'''ZLIB_VERSION.{0,99}$''')), - ('web_HttpServletRequest', regex.compile(r'''HttpServletRequest.{0,99}$''')), - ('web_dotnet', regex.compile(r'''HttpResponseMessage.{0,99}$''')), - ('web_input', regex.compile(r'''\W(FileInputStream|FilterInputStream|SequenceInputStream|StringBufferInputStream|ByteArrayInputStream|FileOutputStream).{0,99}$''')), - ('web_java_custom_header', regex.compile(r'''\.getHeader\(.{0,99}$''')), - ('web_net_events', regex.compile(r'''\W(Application_OnAuthenticateRequest|Application_OnAuthorizeRequest|Session_OnStart).{0,99}$''')), - ('web_path', regex.compile(r'''\W(getRealPath).{0,99}$''')), - ('web_remote_name', regex.compile(r'''\W(getRemoteAddr|getRemoteHost).{0,99}$''')), - ('web_request_dot', regex.compile(r'''\WRequest\..{0,99}$''')), - ('web_sec_override', regex.compile(r'''\W(RequestMinimum|RequestOptional|SkipVerification|UnmanagedCode).{0,99}$''')), - ('win_filter_drv_reg', regex.compile(r'''FltCreateCommunicationPort.{0,199}$''')), - ('win_reg_api', regex.compile(r'''(OpenSubKey|RegOpenKey|RegQueryInfoKey|RegQueryValue|RegSetValue).{0,99}$''')), - ('win_reg_key', regex.compile(r'''(HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG).{0,99}$''')), - ('workzeug_debugger_active', regex.compile(r'''WERKZEUG_DEBUG_PIN.{0,200}$''')), + ('apple_keychain_item', compile(r'''KeychainItem.{0,200}$'''), APPLE_FILES), + ('apple_ksecvaluedata', compile(r'''kSecValueData.{0,200}$'''), APPLE_FILES), + ('apple_secitemupdate', compile(r'''SecItemUpdate.{0,200}$'''), APPLE_FILES), + ('applescript_shell', compile(r'''do\s+shell\s+script.{0,199}$''')), + ('asan_reference', compile(r'''\W(asan|address_sanitizer|no_sanitize_address)\W.{0,200}$''')), + ('auth_basic', compile(r'''Authorization.{0,20}Basic\s\w+.{0,200}$''')), + ('boost_process', compile(r'''boost::process::child.{0,200}$''')), + ('c_arch_recv', compile(r'''(recv|Recv|recvfrom|recvmsg|RecvFrom)\('''), C_FILES), + ('c_cpy_sizeof_src1', compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*\(\s*\2\s*\)'''), C_FILES), + ('c_cpy_sizeof_src2', compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*\2\W'''), C_FILES), + ('c_cpy_sizeof_src3', compile(r'''(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\(\s*(\([^\)]*\))\s*[^,]+\s*,\s*([^,]+)\s*,\s*(strlen|sizeof)\s*(\()?\s*\3\s*(\))?'''), C_FILES), + ('c_cpy_sizeof_src4', compile(r'''\W(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\([^,]+,\s*([^,]+)\s*,[^,;}]+\W\2\W'''), C_FILES), + ('c_cpy_sizeof_src5', compile(r'''\W(strlcpy|strlcat|strncpy|strncat|strcpy_s|strcat_s)\s*\([^,]+,\s*([^,]+)\s*,[^,;}]+\2'''), C_FILES), + ('c_fmt_off_by_one', compile(r'''sprintf.*\%\.\*s.{0,99}sizeof.{0,99}$'''), C_FILES), + ('c_fscanf', compile(r'''fscanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), + ('c_gets', compile(r'''\Wgets\s*\(.{0,99}$'''), C_FILES), + ('c_insecure_loadlib', compile(r'''\W(LoadLibrary|LoadLibraryA|LoadLibraryW|LoadLibraryEx|LoadLibraryExA|LoadLibraryExW)\([^/\n]{0,199}$'''), C_FILES), + ('c_malloc_wraparound', compile(r'''k?malloc\(.*([+*]|-[^>])'''), C_FILES), + ('c_memcpy_wraparound', compile(r'''memcpy\(.*([+*]|-[^>])'''), C_FILES), + ('c_memset_insecure_zeroing', compile(r'''memset\s*\([^,]*,\s*0\s*.{0,99}$'''), C_FILES), + ('c_memset_zero_bytes', compile(r'''memset\s*\([^,]*,[^,]*,\s*0\s*\).{0,99}$'''), C_FILES), + ('c_non_const_fmt_p1', compile(r'''\W(printf|vprintf)\s*\([^",]+,[^",]+,'''), C_FILES), + ('c_non_const_fmt_p2', compile(r'''\W(f|s|as|d|vf|vs|vas|vd)printf\s*\([^",]+,[^",]+,'''), C_FILES), + ('c_non_const_fmt_p3', compile(r'''\W(sn|vsn)printf\s*\([^",]+,[^",]+,[^",]+,'''), C_FILES), + ('c_ntoh_length_wrap', compile(r'''(length|size).*ntoh.*(-|\+|\*)'''), C_FILES), + ('c_potential_fmt_off_by_one', compile(r'''sprintf.*\%\.\*s.{0,200}$'''), C_FILES), + ('c_scanf', compile(r'''(f|s|vf|v|vs)\?scanf\s*\(.{0,99}$'''), C_FILES), + ('c_scanf2', compile(r'''scanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), + ('c_scanf_s', compile(r'''(f|s|vf|v|vs)\?scanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), + ('c_snprintf_retval_use', compile(r'''\+=\s*v?snprintf.{0,99}$'''), C_FILES), + ('c_socket', compile(r'''socket\('''), C_FILES), + ('c_sprintf_ls', compile(r'''sprintf\s*\(.*\"[^\"]*%ls.{0,99}$'''), C_FILES), + ('c_sprintf_path', compile(r'''s.?printf\(.{0,99}(/%s|%s/).{0,99}$'''), C_FILES), + ('c_sprintf_s', compile(r'''sprintf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), + ('c_sscanf_s', compile(r'''sscanf\s*\(.*\"[^\"]*%s.{0,99}$'''), C_FILES), + ('c_trusted_length_in_input', compile(r'''len\s*=.*\*.{0,199}$'''), C_FILES), + ('c_warning_supress', compile(r'''#pragma\s+warning\s*\(\s*suppress'''), C_FILES), + ('cfg_haproxy_plaintext_password', compile(r'''insecure-password.{0,99}$'''), CFG_FILES), + ('chpasswd', compile(r'''chpasswd.{0,200}$''')), + ('cmdi_Popen2', compile(r'''\WPopen\([^)].{0,99}$''')), + ('cmdi_c_process_exec', compile(r'''exec[lv][epP]*\(.{0,99}$''')), + ('cmdi_check_output', compile(r'''\Wcheck_output\([^)].{0,99}$''')), + ('cmdi_child_process', compile(r'''child_process.{0,99}$''')), + ('cmdi_command', compile(r'''["\'](chmod|chown|cmd.exe|copy|cp|git|gzip|mkdir|mktemp|rm|ssh|tar|unzip|/bin/sh|gunzip|del|cat|sed)\s.{0,199}$''')), + ('cmdi_createProcess', compile(r'''\WCreateProcess\W.{0,99}$''')), + ('cmdi_dotnet_process', compile(r'''\.StartInfo.{0,99}$'''), CS_FILES, CS_EXCLUSIONS), + ('cmdi_exe_exec', compile(r'''\"\w+\.exe\".{0,99}$''')), + ('cmdi_exec', compile(r'''\W\.exec.{0,99}$''')), + ('cmdi_exec2', compile(r'''^.{0,99}\Wexec\(.{0,99}$''')), + ('cmdi_lua_exec', compile(r'''os\.execute.{0,99}$''')), + ('cmdi_options', compile(r'''^.{0,199}(("[^\n"$-]*\s--[^-])|("--\w)).{0,199}$''')), + ('cmdi_perl_interp', compile(r'''\Wsystem\("[^"]*\$.{0,99}$'''), PL_FILES), + ('cmdi_perl_interp2', compile(r'''\Wsystem\("[^"]*@.{0,99}$'''), PL_FILES), + ('cmdi_popen', compile(r'''popen\([^)].{0,99}$''')), + ('cmdi_process_new', compile(r'''new\sProcess\(.{0,99}$''')), + ('cmdi_scala_cmd_bang', compile(r'''\.![^!].{0,99}$''')), + ('cmdi_scala_cmd_bangbang', compile(r'''\.!!.{0,99}$''')), + ('cmdi_scala_processbuilder', compile(r'''ProcessBuilder\s*\(.{0,99}$''')), + ('cmdi_shell_exec', compile(r'''shell_exec.{0,99}$''')), + ('cmdi_shellexec', compile(r'''ShellExecute.{0,199}$''')), + ('cmdi_spawn', compile(r'''^.{0,99}\Wspawn\(.{0,99}$''')), + ('cmdi_system_noempty', compile(r'''\Wsystem\([^)].{0,99}$''')), + ('cmdi_win_proc_start', compile(r'''ProcessStartInfo.{0,99}$''')), + ('comment_credit_card', compile(r'''credit.card.{0,99}$''')), + ('comment_cvv', compile(r'''\Wcvv\W.{0,99}$''')), + ('comment_inflate_version', compile(r'''inflate.*[0123456789.]{3,}.*Copyright.*Mark.*Adler.{0,99}$''')), + ('comment_luck', compile(r'''\Wlucky*\W''')), + ('comment_obscenities', compile(r'''\W(asshole|bastard|brainfuck|cock|crap|crappy|cunt|dick|flippin|flipping|fuck|fucking|motherfucker|screwed|shit|pussy|tits)\W.{0,99}$''')), + ('comment_rubocop_disable', compile(r'''rubocop:disable.{0,99}$''')), + ('comment_rubocop_disable_security', compile(r'''rubocop:disable\s+Security.{0,99}$'''), RUBY_FILES), + ('comment_security_concern', compile(r'''security (concern|problem|vulnerability|issue).{0,199}$''')), + ('comment_static_analysis_tool', compile(r'''(?i)(NOLINT|\Wnosem\W|noinspection|safesql|coverity|fortify|veracode|Prefast|DevSkim|checkmarx|\Wnosec\W|\WNOSONAR\W|@SuppressWarnings|\Wnoqa\W).{0,99}$''')), + ('comment_todos', compile(r'''\W(TODO|HACK|FIXME|XXX|BROKEN)\W.{0,99}$''')), + ('const_amazon_s3_url', compile(r'''s3://[^\.].{3,199}$''')), + ('const_amazon_s3_url2', compile(r'''https://s3-.{3,299}$''')), + ('const_amazon_secret_key', compile(r'''["\'][A-Za-z0-9/+=]{40}["\'].{0,99}$'''), None, [compile('reference')]), + ('const_aws_hosts', compile(r'''\S{10,199}\.amazonaws\.com.{0,199}$''')), + ('cors_allow_all', compile(r'''Access-Control-Allow-Origin.*"\*".{0,99}$''')), + ('createEvent', compile(r'''CreateEvent.{0,99}$''')), + ('cred_CAPS_secret', compile(r'''[A-Z0-9]{1..99}_SECRET[A-Z0-9_]*.{0,99}$''')), + ('cred_access_token', compile(r'''^.{0,299}x-access-token.{0,299}$''')), + ('cred_access_token', compile(r'''^\s*access_token:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{18,}\s*$''')), + ('cred_api_key', compile(r'''^[^=\n]{0,199}API_KEY[^\n]{7,199}$''')), + ('cred_api_token', compile(r'''api_token=[0-9a-f]{40}.{0,200}$''')), + ('cred_auth', compile(r'''"AUTH"[,\s]+"[^\n]{5,99}".{0,99}$''')), + ('cred_auth_header', compile(r'''Authorization:\s*\w+\s*[A-Za-z0-9.+=_@!^&*()-?]{8,200}\W''')), + ('cred_aws_access_id2', compile(r'''(^|[^A-Z0-9])(AKIA|ASIA)[A-Z0-9]{16}($|[^A-Z0-9]).{0,99}$''')), + ('cred_aws_creds', compile(r'''(AWS_ACCESS_KEY_ID|AWS_SECRET_ACCESS_KEY|AWS_DEFAULT_REGION).{20,199}$''')), + ('cred_aws_secret_key', compile(r'''(AWSSecretKey|AwsDevSecretKey|SecretKey|ClientSecret|BasicAWSCredentials|clientSecret|AWS_SECRET_KEY|AgentToken).{0,199}$''')), + ('cred_azure_client_id', compile(r'''client_id[^\n]+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}.{0,199}$''')), + ('cred_azure_client_secret', compile(r'''client_secret[^\n]+\W[a-zA-Z0-9\+\-\_\/]{32}\W.{0,199}$''')), + ('cred_azure_storage_key', compile(r'''[Aa]zure[Ss]torage[Kk]ey.*[Aa]ccount[Kk]ey.{0,499}$''')), + ('cred_azure_tenant_id', compile(r'''tenant_id[^\n]+[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}.{0,199}$''')), + ('cred_base64', compile(r'''base64.{0,99}$''')), + ('cred_bcrypt_hash', compile(r'''.{0,199}$''')), + ('cred_buildfile', compile(r'''.{5,200}''')), + ('cred_config_key', compile(r'''add\s+key="\w*key\w*".{1,99}$'''), CFG_FILES), + ('cred_config_password', compile(r'''add\s+key="\w*password\w*".{1,99}$'''), CFG_FILES), + ('cred_config_secret', compile(r'''add\s+key="\w*secret\w*".{1,99}$'''), CFG_FILES), + ('cred_connectionString', compile(r'''ConnectionString\s*=.{0,99}$''')), + ('cred_connectionstring2', compile(r'''(DSN|DATASOURCE|UID|USER\sID|USER)=[^;].{1,99}(PASSWORD|PWD)=[^;].{1,99}$''')), + ('cred_curl_auth', compile(r'''^.{0,200}curl[^\n]{0,200}-u[^\n]{0,200}:[^\n]{0,200}$''')), + ('cred_dot_secret_key', compile(r'''\.SecretKey.{0,99}$''')), + ('cred_dotnet_password', compile(r'''^.{0,200}assword\s*=\s*"[^"]+".{0,200}$'''), CS_FILES), + ('cred_env_password', compile(r'''^.{0,200}ENV\s*\w*PASS\w*\s*"[^"]+".{0,200}$''')), + ('cred_facebook', compile(r'''(?i)facebook[^=]*=[^=]*[0-9a-f]{32}.{0,99}$''')), + ('cred_github', compile(r'''(?i)github[^=]*=[^=]*[0-9a-zA-Z]{35,40}.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_github_token', compile(r'''GITHUB_TOKEN.{0,299}$''')), + ('cred_google_clientid', compile(r'''clientId.{30,80}googleusercontent.com.{0,299}$''')), + ('cred_hash_1', compile(r'''\$1\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_10', compile(r'''\$krb5tgs\$23\$.{0,99}$''')), + ('cred_hash_11', compile(r'''\$md5\$.*\$.{0,99}$''')), + ('cred_hash_12', compile(r'''\$ml\$\d+\$.{0,99}$''')), + ('cred_hash_13', compile(r'''\$office\$\*2007\*.{0,99}$''')), + ('cred_hash_14', compile(r'''\$office\$\*2010\*.{0,99}$''')), + ('cred_hash_15', compile(r'''\$office\$\*2013\*.{0,99}$''')), + ('cred_hash_16', compile(r'''\$oldoffice\$1\*\d+.{0,99}$''')), + ('cred_hash_17', compile(r'''\$S\$.{0,99}$''')), + ('cred_hash_19', compile(r'''\W[a-f0-9]{128}:\w+\W.{0,99}$''')), + ('cred_hash_2', compile(r'''\$2a\$05\$.{0,99}$''')), + ('cred_hash_21', compile(r'''\W[a-f0-9]{32}:\w+\W.{0,99}$''')), + ('cred_hash_23', compile(r'''\W[a-f0-9]{40}:\w+\W.{0,99}$''')), + ('cred_hash_25', compile(r'''\W[a-f0-9]{64}:\w+\W.{0,99}$''')), + ('cred_hash_26', compile(r'''\W\w+\$[a-f0-9]{16}\W.{0,99}$''')), + ('cred_hash_27', compile(r'''\W\w+:\d+:[a-f0-9]{32}:[a-f0-9]{32}\W.{0,99}$''')), + ('cred_hash_28', compile(r'''u4-netntlm::.{0,99}$''')), + ('cred_hash_29', compile(r'''\{ssha1\}06\$.*\$.{0,99}$''')), + ('cred_hash_2x', compile(r'''\$2\w\$\d+\$[A-Za-z0-9./]{20,}.{0,99}$''')), + ('cred_hash_3', compile(r'''\$5\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_30', compile(r'''\{ssha256\}06\$.{0,199}$''')), + ('cred_hash_31', compile(r'''\{SSHA512\}.{0,199}$''')), + ('cred_hash_32', compile(r'''\{ssha512\}06\$.{0,199}$''')), + ('cred_hash_33', compile(r'''\{x-issha,\s*1024\}.{0,199}$''')), + ('cred_hash_4', compile(r'''\$6\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_5', compile(r'''\$8\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_6', compile(r'''\$9\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_7', compile(r'''\$apr1\$\w{4,99}$\w{4,99}.{0,99}$''')), + ('cred_hash_8', compile(r'''\$DCC2\$\d+#.*#.{0,99}$''')), + ('cred_hash_9', compile(r'''\$keepass\$\*\d+\*\d+\*\d+\*.{0,99}$''')), + ('cred_hash_AIX', compile(r'''\{ssha256\}[0-9a-zA-Z\$\+\/\.]{20,}\W.{0,99}$''')), + ('cred_hash_AIX', compile(r'''\{ssha512\}[0-9a-zA-Z\$\.\-\+\/]{20,}\W.{0,99}$''')), + ('cred_hash_Android_FDE_SamsungDEK', compile(r'''\W[0-9a-fA-F]{160}\W.{0,99}$''')), + ('cred_hash_ArubaOS', compile(r'''\W[0-9a-fA-F]{50}\W.{0,99}$''')), + ('cred_hash_Atlassian', compile(r'''\{PKCS5S2\}[0-9a-zA-Z]{64}\W.{0,99}$''')), + ('cred_hash_Cisco_IOS_type_4', compile(r'''\W[0-9a-zA-Z]{43}\W.{0,99}$''')), + ('cred_hash_Cisco_PIX_MD5', compile(r'''password\s+[0-9a-zA-Z\+\.\/]{16}\s+encrypted.{0,99}$''')), + ('cred_hash_ColdFusion', compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{64}\W.{0,99}$''')), + ('cred_hash_DES_Oracle', compile(r'''\W[0-9a-fA-F]{16}:[0-9a-fA-F]{10}\W.{0,99}$''')), + ('cred_hash_DomainCachedCredentials', compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{13}\W.{0,99}$''')), + ('cred_hash_EPi', compile(r'''0x[0-9a-zA-Z]{60}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_FileZillaServer_0.9.55', compile(r'''\W[0-9a-fA-F]{128}:[0-9a-fA-F]{64}\W.{0,99}$''')), + ('cred_hash_FortiGate', compile(r'''\W[0-9a-zA-Z\+\.\/]{46}=\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_HMAC_SHA256', compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{8}\W.{0,99}$''')), + ('cred_hash_IPB2', compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), + ('cred_hash_IPMI2_RAKP_HMAC_SHA1', compile(r'''\W[0-9a-fA-F]{130}:[0-9a-fA-F]{40}\W.{0,99}$''')), + ('cred_hash_Joomla', compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{32}\W.{0,99}$''')), + ('cred_hash_MSSQL_2000', compile(r'''0x01[0-9a-zA-Z]{90}\W.{0,99}$''')), + ('cred_hash_MSSQL_2005', compile(r'''0x01[0-9a-zA-Z]{50}\W.{0,99}$''')), + ('cred_hash_MSSQL_2012_2014', compile(r'''0x02[0-9a-zA-Z]{138}\W.{0,99}$''')), + ('cred_hash_MySQL323', compile(r'''\W[0-9a-fA-F]{16}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_NetNTLMv1', compile(r'''\W[0-9a-zA-Z]{48}:[0-9a-zA-Z]{16}\W.{0,99}$''')), + ('cred_hash_OSX', compile(r'''\W[0-9a-fA-F]{48}\W.{0,99}$''')), + ('cred_hash_OSXv10.7', compile(r'''\W[0-9a-fA-F]{136}\W.{0,99}$''')), + ('cred_hash_OpenCart', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{9}\W.{0,99}$''')), + ('cred_hash_Oracle11', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{20}\W.{0,99}$''')), + ('cred_hash_Oracle12', compile(r'''\W[0-9a-fA-F]{160}\W.{0,99}$''')), + ('cred_hash_PeopleSoft', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{126}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_PeopleSoft2', compile(r'''\W[0-9a-zA-Z]{27}=.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_PostgreSQL', compile(r'''\W[0-9a-zA-Z]{32}:[0-9a-zA-Z]{2,20}\W.{0,99}$''')), + ('cred_hash_PunBB', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{12}\W.{0,99}$''')), + ('cred_hash_Radmin2', compile(r'''\W[0-9a-fA-F]{32}[^:0-9a-fA-F].{0,99}$''')), + ('cred_hash_Redmine', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{32}\W.{0,99}$''')), + ('cred_hash_SHA_224', compile(r'''\W[0-9a-fA-F]{56}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SHA_256', compile(r'''\W[0-9a-fA-F]{64}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SHA_384', compile(r'''\W[0-9a-fA-F]{96}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SHA_512', compile(r'''\W[0-9a-fA-F]{128}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SSHA_256', compile(r'''\{SSHA256\}[0-9a-zA-Z\+\/]{47}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SSHA_512', compile(r'''\{SSHA512\}[0-9a-zA-Z\+]{95}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_SamsungAndroidPassword', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{16}\W.{0,99}$''')), + ('cred_hash_SipHash', compile(r'''\W[0-9a-fA-F]{16}:[0-9a-fA-F]{32}\W.{0,99}$''')), + ('cred_hash_SybaseASE', compile(r'''0x[0-9a-zA-Z]{84}\W.{0,99}$''')), + ('cred_hash_WindowsPhone8', compile(r'''\W[0-9a-fA-F]{64}:[0-9a-fA-F]{256}\W.{0,99}$''')), + ('cred_hash_hMailServer', compile(r'''\W[0-9a-fA-F]{70}\W.{0,99}$''')), + ('cred_hash_md4_md5', compile(r'''\W[0-9a-fA-F]{32}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_md5', compile(r'''md5\$.{0,99}\$[a-zA-Z0-9].{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_salted_md5', compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), + ('cred_hash_salted_sha1', compile(r'''\W[0-9a-fA-F]{40}:[0-9a-fA-F]{2,20}\W.{0,99}$''')), + ('cred_hash_saltedsha512', compile(r'''\W[0-9a-fA-F]{128}:[0-9a-fA-F]{10}\W.{0,99}$''')), + ('cred_hash_sha1', compile(r'''\W[0-9a-fA-F]{40}\W.{0,99}$'''), None, HASH_EXCLUSIONS), + ('cred_hash_vBulletin', compile(r'''\W[0-9a-fA-F]{32}:[0-9a-fA-F]{30}\W.{0,99}$''')), + ('cred_hex_dblquotes', compile(r'''^.{0,199}"[a-f0-9]{16,}".{0,199}$'''), None, HASH_EXCLUSIONS), + ('cred_identified_by', compile(r'''IDENTIFIED\s+BY\s+\'[^\n]{0,299}$''')), + ('cred_in_url', compile(r'''\w+://\w+:\w+@\w+.{0,99}$''')), + ('cred_jdbc_dbl', compile(r'''"jdbc:\w+://[^"]{0,99}".{0,99}$''')), + ('cred_jdbc_sgl', compile(r'''\'jdbc:\w+://[^\']{0,99}\'.{0,99}$''')), + ('cred_key', compile(r'''^\s*key:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{10,}\s*$''')), + ('cred_key_equals', compile(r'''^[^=\n]{0,199}KEY[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), + ('cred_keys', compile(r'''\-----BEGIN[A-Z\s]*KEY[A-Z\s]*-----''')), + ('cred_mysql_connect_call', compile(r'''new mysqli\(.{0,99}$''')), + ('cred_mysql_passwords', compile(r'''\Wmysql\s.{0,99}[^-]-p[^\$\%].{0,99}$''')), + ('cred_network_credential', compile(r'''\WNetworkCredential\(.{0,399}$''')), + ('cred_password', compile(r'''^\s*password:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{10,}\s*$''')), + ('cred_password01', compile(r'''\s--password\s*=\s*[^\$\%].{0,99}$''')), + ('cred_password02', compile(r'''password=[^\s";.]*.{0,199}$''')), + ('cred_password03', compile(r'''password"[^"]*value="[^"]*.{0,199}$''')), + ('cred_password04', compile(r'''password"[^",\w]{0,50}"[^"]{0,50}".{0,199}$''')), + ('cred_password05', compile(r'''key=[^\s";.]*.{0,199}$''')), + ('cred_password_config', compile(r'''^\s*password\s\S{5,99}\s*$''')), + ('cred_password_equals', compile(r'''^[^=\n]{0,199}PASSWORD[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), + ('cred_password_equals', compile(r'''password[^=\n]{0,30}=.{0,199}$''')), + ('cred_password_equals2', compile(r'''password\s*=\s*".{0,99}$''')), + ('cred_postgres_pgpass_format', compile(r'''^[.a-zA-Z0-9_-]+(:[.a-zA-Z0-9_-]+){4}$''')), + ('cred_private_key', compile(r'''privateKey.{0,99}$''')), + ('cred_public_key', compile(r'''publicKey.{0,99}$''')), + ('cred_refreshToken', compile(r'''refreshToken.{16,80}$''')), + ('cred_secret', compile(r'''^\s*secret:\s*[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{18,}\s*$''')), + ('cred_secret_equals', compile(r'''^[^=\n]{0,199}SECRET[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), + ('cred_secretname_equals', compile(r'''(accesskey|secretkey|apisecret|apikey|GSUsername|GSPassword|SteamBuildMachineUsername|SteamBuildMachinePassword|S3BucketName).{0,99}[=:].{0,99}$''')), + ('cred_signtool_password', compile(r'''signtool.*/p.{0,99}$''')), + ('cred_slack', compile(r'''xox[baprs]-[^=]*=[^=]*.{0,99}$''')), + ('cred_stripe_secret_token', compile(r'''(?i)STRIPE[^\n]+(sk)_[0-9a-zA-Z_]{10,64}.{0,99}$''')), + ('cred_stripe_token', compile(r'''(?i)(sk|pk)_(test|live)_[0-9a-zA-Z]{10,32}.{0,99}$''')), + ('cred_telegram', compile(r'''(?i)telegram[^=]*=[^=]*[0-9]{1,12}+:[0-9a-zA-Z-]{32,44}.{0,99}$''')), + ('cred_token_equals', compile(r'''^[^=\n]{0,199}TOKEN[^=\n]{0,30}=\s*[^\n\s]{7,199}\s*$''')), + ('cred_twitter', compile(r'''(?i)twitter[^=]*=[^=]*[0-9a-zA-Z]{35,44}.{0,99}$''')), + ('crypto_algorithm_name', compile(r'''\W(AES|DES|SHA|SHA1|SHA2|SHA256|SHA512|blowfish|MD5|IDEA|RSA|DSA|MD4|SHA3|HMAC)\W.{0,99}$''')), + ('crypto_api_call', compile(r'''\W(CryptAcquireContext|CryptDeriveKey|CryptGenKey|CryptGenRandom)\W.{0,99}$''')), + ('crypto_b64', compile(r'''AES\.DecryptFromBase64.{0,99}$''')), + ('crypto_b64_2', compile(r'''AES\.DecryptFromBase64.{0,99}$''')), + ('crypto_diffie_hellman', compile(r'''[D|d]iffie.*[H|h]ellman.{0,99}$''')), + ('cve_id', compile(r'''\WCVE-\d\d\d\d-.{0,200}$''')), + ('define_password', compile(r'''^.{0,99}#define.{0,99}PASSWORD.{0,99}".{0,99}$'''), C_FILES, CS_EXCLUSIONS), + ('df_c_sinks', compile(r'''^.{0,99}\W(system|strcpy|strcat|memcpy|sprintf)\s*\(.{0,199}$'''), C_FILES), + ('df_c_sources', compile(r'''^.{0,99}\W(recv|argv|fread|fgets|scanf|fscanf).{0,199}$'''), C_FILES), + ('df_dotnet_sinks', compile(r'''^.{0,99}\W(GetAsync)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('df_dotnet_sinks', compile(r'''^.{0,99}\W(WriteFile|FileSystem|SimpleDB|ExecuteSqlCommand|SqlCommand|ProcessStartInfo|CreateProcess|WriteAllText|HttpClient)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('df_dotnet_sinks', compile(r'''^.{0,99}\WLIKE\s*'\%\{\w+}\%'.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('df_dotnet_sources', compile(r'''^.{0,99}\W(QueryString|Request|HttpGet|HttpPost|HttpPut|FromBase64String|Parse|Load)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('df_dotnet_sources', compile(r'''^.{0,99}\W(string.Format)\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('df_java_sinks', compile(r'''^.{0,99}\W"\s*\+\s*[^"]{1,199}".{0,199}$'''), JAVA_FILES), + ('df_java_sinks', compile(r'''^.{0,99}\W(HttpHeaders|URI|setHeader|uploadFile|File|createFile|save)\W.{0,199}$'''), JAVA_FILES), + ('df_java_sinks', compile(r'''^.{0,99}\W(execute|HttpClient|PostMethod|exec|Runtime|executeMethod|SqlQuery|executeQuery|QueryBuilder)\W.{0,199}$'''), JAVA_FILES), + ('df_java_sources', compile(r'''^.{0,99}\W(FromBase64String|Parse|Load|JSONObject|InputStreamReader|BufferedReader|readLine|params|Param|RequestMapping)\W.{0,199}$'''), JAVA_FILES), + ('df_java_sources', compile(r'''^.{0,99}\W(PathVariable|RequestBody|requestBody|RequestHeader|queryString|RequestParam|getParameter|GetMapping)\W.{0,199}$'''), JAVA_FILES), + ('df_java_sources', compile(r'''^.{0,99}\W(PutMapping|PostMapping)\W.{0,199}$'''), JAVA_FILES), + ('df_php_sinks', compile(r'''^.{0,99}\W(assert|copy|eval|exec|file|fopen|include|mssql_query|mysqli_query|pcntl_exec|pg_query|popen|require|require_once|shell_exec|system)\s*\(.{0,199}$'''), PHP_FILES), + ('df_php_sources', compile(r'''^.{0,99}\W(\$_POST|\$_GET|\$_REQUEST|\$_COOKIE|readline|fscanf|fgets|file_get_contents).{0,199}$'''), PHP_FILES), + ('df_py_sinks', compile(r'''^.{0,99}\W(rename|makedirs|open|write|HTTPAdapter|Request|urlopen|make_response|dumps|redirect|jsonify|chdir|remove)\s*\(.{0,199}$'''), PY_FILES), + ('df_py_sinks_crit', compile(r'''^.{0,99}\W(system|check_output|execute|subprocess.call|Popen|popen)\s*\(.{0,199}$'''), PY_FILES), + ('df_py_sources', compile(r'''^.{0,99}\W(loads|load|open|route|request.args|get_json|get|read)\s*\(.{0,199}$'''), PY_FILES), + ('df_py_sources', compile(r'''^.{0,99}\W(request.form|session|args|environ|\+\W*\w+\W*\+).{0,199}$'''), PY_FILES), + ('df_ruby_sinks', compile(r'''^.{0,99}\W(IO.binread|IO.binwrite|IO.foreach|JSON.load|JSON.parse|popen|read|write|eval|exec|spawn|syscall|system|eval|constantize|render).{0,199}$'''), RUBY_FILES), + ('df_ruby_sources', compile(r'''^.{0,99}\W(params|query_parameters|path_parameters|get|post|query_string)\W.{0,199}$'''), RUBY_FILES), + ('dllimport', compile(r'''dllimport.{0,99}$''')), + ('dotnet_Rfc2898DeriveBytes', compile(r'''\WRfc2898DeriveBytes.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_allow_all', compile(r'''allow.{0,10}users.{0,10}\*.{0,100}$'''), DOTNET_FILES), + ('dotnet_allow_users', compile(r'''allow.{0,10}users.{0,10}=.{0,100}$''')), + ('dotnet_allowanonymous', compile(r'''\[AllowAnonymous\].{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_app_paths', compile(r'''location.{0,10}path.{0,10}=.{0,100}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_appendformat', compile(r'''\.AppendFormat.{1,80}\{\d+\}.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_binaryformatter_deserial_CA2300', compile(r'''\WBinaryFormatter.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_binarywrite', compile(r'''\WBinaryWrite\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_certvalidation_none', compile(r'''X509CertificateValidationMode\.None.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_cookie', compile(r'''HttpCookie.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_crypto', compile(r'''\WSystem\.Security\.Cryptography\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dirBrowse', compile(r'''directoryBrowse.{1,20}enable.{1,20}true.{0,99}$'''), DOTNET_FILES), + ('dotnet_disablesecurity', compile(r'''DisableSecurity.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dotnet_interpolation', compile(r'''string\.Format\(.*{.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dotnet_net', compile(r'''System\.Net.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dotnet_pipes', compile(r'''System\.IO\.Pipes.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dotnet_saveas', compile(r'''\.SaveAs\(.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_dotnet_string_format', compile(r'''string\.Format.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_forms_authentication', compile(r'''FormsAuthentication.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_insecure_rsa_padding', compile(r'''\.Encrypt\(.{1,99}false.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_method', compile(r'''\[Http(Post|Get|Patch|Put|Delete).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_pageload', compile(r'''Page_Load.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_replaceQuote', compile(r'''(Replace\("\""|Replace\("\'").{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_request_object', compile(r'''\WRequest\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_response_object', compile(r'''\WResponse\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_route', compile(r'''\.MapRoute\(.{0,299}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_skip_auth', compile(r'''SkipAuthorization.{0,100}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_skip_ssl_validation', compile(r'''ServerCertificateCustomValidationCallback.{0,299}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqlClient', compile(r'''\W(SqlClient|SqlCommand).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqlCmd', compile(r'''\W(ExecuteSqlCommand|ExecuteSqlCommandAsync|SqlQuery).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqlConnection', compile(r'''\WSqlConnection.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqlclient', compile(r'''\W(SqlClient|SqlCommand).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqlcommand', compile(r'''\W(ExecuteSqlCommand|ExecuteSqlCommandAsync|SqlQuery).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqli_and', compile(r'''".{0,99}\Wand\W.{0,99}".{0,99}\+.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqli_doubleupquote', compile(r'''Replace.{0,99}\'.{0,99}\'\'.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqli_interpolation', compile(r'''=\s*{.{0,200}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqli_select_brace', compile(r'''"select.{0,199}\{.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_sqli_simpleDB', compile(r'''\sSimpleDB\..{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_tripledes', compile(r'''TripleDESCryptoServiceProvider.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_unsafe', compile(r'''\sunsafe\s.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_validateinput_false', compile(r'''\[ValidateInput.{1,20}false.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_weak_ecb_mode', compile(r'''CipherMode\.ECB.{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_web_dotnet_weak_hash', compile(r'''(RIPEMD160|SHA1|MD5|MD2|MD4).{0,99}(.{0,99}){0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_webmethod', compile(r'''\[(WebMethod|WebService|ScriptMethod|ScriptService).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('dotnet_writefile', compile(r'''\WWriteFile\W.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('endpoints', compile(r'''/endpoints/.{0,99}$''')), + ('export_creds', compile(r'''^(.{0,10})export .{0,99}(LOGIN|USER|KEY|SECRET|BUCKET|TOKEN|CREDS|CREDENTIAL|PASS|AUTH).{0,99}=[^$]{6,199}$''')), + ('fileSystem_call', compile(r'''FileSystem\W.{0,99}$''')), + ('file_Stream', compile(r'''FileStream.{0,99}$''')), + ('file_copy', compile(r'''\WFile\.Copy\(.{0,99}$''')), + ('file_copyFile', compile(r'''copyFile\(.{0,99}$''')), + ('file_dot', compile(r'''File\..{0,99}$''')), + ('file_get_contents', compile(r'''file_get_contents.{0,99}$''')), + ('go_exec', compile(r'''\Wexec\..{0,99}$'''), GO_FILES, GO_EXCLUSIONS), + ('go_exec_cmdi', compile(r'''\Wexec\..{0,99}(/c|-c).{0,99}$'''), GO_FILES, GO_EXCLUSIONS), + ('go_http_client', compile(r'''\Whttp\.(Client|Get|Post|PostForm|NewRequest)\W.{0,99}$'''), GO_FILES), + ('go_http_cookie', compile(r'''\Whttp\.(Cookie|SetCookie)\W.{0,99}$'''), GO_FILES), + ('go_http_header', compile(r'''\Whttp\.Header\W.{0,99}$'''), GO_FILES), + ('go_http_server', compile(r'''\Whttp\.(ListenAndServe|Handle|HandleFunc|Server)\W.{0,99}$'''), GO_FILES), + ('go_http_server_plaintext_only', compile(r'''\Whttp\.ListenAndServe\(\W.{0,99}$'''), GO_FILES), + ('go_os', compile(r'''\Wos\..{0,99}$'''), GO_FILES, GO_EXCLUSIONS), + ('go_reflect', compile(r'''\Wreflect\..{0,99}$'''), GO_FILES, [compile(r'''(DeepEqual|ValueOf)'''), ]), + ('go_sprintf_s', compile(r'''Sprintf\s*\(.*\"[^\"]*%s.{0,99}$'''), GO_FILES), + ('go_sqli_select', compile(r'''\.Select\(.{0,99}$'''), GO_FILES), + ('go_sqli_sqlmodule', compile(r'''"database/sql"'''), GO_FILES), + ('go_ssh_ignore_host_key', compile(r'''\WInsecureIgnoreHostKey.{0,99}$'''), GO_FILES, GO_EXCLUSIONS), + ('go_unsafe', compile(r'''\Wunsafe\W.{0,99}$'''), GO_FILES), + ('go_world_fileperms', compile(r'''(Mkdir|WriteFile|Chmod|OpenFile|FileMode|\Wos\.)\W0[0-7][0-7][1-7]\W.{0,99}$'''), GO_FILES), + ('go_world_write', compile(r'''(Mkdir|WriteFile|Chmod|OpenFile|FileMode|\Wos\.)\W0[0-7][0-7](1|2|3|5|6|7)\W.{0,99}$'''), GO_FILES), + ('go_xss_writestring', compile(r'''io\.WriteString\W.{0,99}$'''), GO_FILES), + ('http_user_agent', compile(r'''HTTP_USER_AGENT.{0,99}$''')), + ('http_x_forwarded_for', compile(r'''HTTP_X_FORWARDED_FOR.{0,99}$''')), + ('insecure_url', compile(r'''http://([a-zA-Z0-9]+\.)+[a-zA-Z0-9]+.{0,200}$'''), None, [compile(r'''^\s*(\*+|//|/*|#|;)\s+'''), compile(r'''(readme|\.md|xlmns|doctype)''')]), # noqa + ('insecure_url2', compile(r'''^.{0,200}http://.{0,200}$'''), None, [compile(r'''^\s*(\*+|//|/*|#|;)\s+'''), compile(r'''(readme|\.md|\|xlmns|doctype)''')]), # noqa + ('intercept_url', compile(r'''intercept-url{0,200}$''')), + ('java_deserialisation', compile(r'''\.readObject\(.{0,99}$'''), JAVA_FILES), + ('java_spring_expression_lang_injection', compile(r'''(,]*\s+(false|0).{0,99}$'''), PHP_FILES), + ('php_strcmp_array_bypass', compile(r'''strcmp.*==.{0,200}$'''), PHP_FILES), + ('php_var_func', compile(r'''\$\w+\(.{0,99}$'''), PHP_FILES), + ('php_var_include', compile(r'''(include|require).{0,99}\$.{0,99}$'''), PHP_FILES), + ('php_xss_tag', compile(r'''<\w+>.*\$\w+.{0,200}$'''), PHP_FILES), + ('plaintext_port', compile(r'''\.createInsecure\(.{0,99}$''')), + ('priv_chmod', compile(r'''chmod\(.{0,199}$''')), + ('priv_chown', compile(r'''chown\(.{0,199}$''')), + ('py_check_output', compile(r'''check_output\(.{0,99}$'''), PY_FILES), + ('py_deserialisation', compile(r'''pickle\.loads\(.{0,99}$'''), PY_FILES), + ('py_deserialisation2', compile(r'''pickle\.load\(.{0,99}$'''), PY_FILES), + ('py_filesystem', compile(r'''require\(\'fs\'\).{0,99}$'''), PY_FILES), + ('py_flask_debug_mode', compile(r'''^.{0,200}app\.run.{0,100}debug\s*=\s*True.{0,200}$'''), PY_FILES), + ('py_flask_autoescape', compile(r'''^.{0,200}autoescape\s+false.{0,200}$'''), PY_FILES + HTM_FILES), + ('py_flask_pipe_safe', compile(r'''^.{0,200}\|\s*safe.{0,200}$'''), PY_FILES + HTM_FILES), + ('py_flask_markup', compile(r'''^.{0,200}\WMarkup\(.{0,200}$'''), PY_FILES), + ('py_mktemp_banned', compile(r'''^.{0,200}\Wmktemp\s*\(.{0,200}$'''), PY_FILES), + ('py_shell_is_true', compile(r'''shell\s*=\s*True.{0,99}$'''), PY_FILES), + ('py_subprocess_call', compile(r'''subprocess.call\(.{0,99}$'''), PY_FILES), + ('py_subprocess_run', compile(r'''subprocess.run\(.{0,99}$'''), PY_FILES), + ('python_deserial', compile(r'''\.loads\(.{0,99}$'''), PY_FILES), + ('python_format_cmdi', compile(r'''"[^"]*-[^"]\{[^"]*"\.format.{0,99}$'''), PY_FILES), + ('rand_math_random', compile(r'''\WMath\.random\(\W.{0,99}$''')), + ('rand_net_random', compile(r'''\W(System\.Random).{0,99}$''')), + ('rand_new_random', compile(r'''\Wnew\sRandom\(\W.{0,99}$''')), + ('rand_rand', compile(r'''\Wrand\s*\(\W.{0,99}$''')), + ('rand_random', compile(r'''\Wrandom\s*\(\W.{0,99}$''')), + ('rand_time', compile(r'''\W(ftime|gettimeofday|GetTickCount|GetTickCount64|QueryPerformanceCounter|GetSystemTime|GetLocalTime|GetSystemTimeAsFileTime|NtQuerySystemTime|time|uniqid|microtime)\(.{0,99}$''')), + ('rand_util_random', compile(r'''\Wutil\.Random\W.{0,99}$'''), JAVA_FILES), + ('rand_windows_good', compile(r'''\W(CryptGenRandom)\W.{0,99}$''')), + ('rds_hosts', compile(r'''\S{10,199}\.rds\.amazonaws\.com''')), + ('rootpwd', compile(r'''[\s"\'^\(\{\[]root/[a-zA-Z0-9\.\-\_\!\?\#\&\*\:\;\@\(\)\<\>\%]{12,}''')), + ('routing_controller', compile(r'''@Controller.{0,200}$''')), + ('routing_decorator', compile(r'''\[Route\(.{0,99}$''')), + ('routing_decorator2', compile(r'''\[RoutePrefix\(.{0,99}$''')), + ('routing_flask', compile(r'''\badd_resource\b'''), PY_FILES), + ('routing_get', compile(r'''Get\[.{0,99}$''')), + ('routing_java_get', compile(r'''@GET.{0,99}$'''), JAVA_FILES), + ('routing_java_getmapping', compile(r'''@GetMapping.{0,99}$'''), JAVA_FILES), + ('routing_java_path', compile(r'''@Path\(.{0,99}$'''), JAVA_FILES), + ('routing_java_post', compile(r'''@POST.{0,99}$'''), JAVA_FILES), + ('routing_java_requestmapping', compile(r'''@RequestMapping.{0,99}$'''), JAVA_FILES), + ('routing_java_requestmethod', compile(r'''RequestMethod\.[A-Z]+.{0,99}$'''), JAVA_FILES), + ('routing_node_get', compile(r'''^.{0,99}\.get\(.{0,99}$'''), JS_FILES), + ('routing_node_post', compile(r'''^.{0,99}\.post\(.{0,99}$'''), JS_FILES), + ('routing_node_put', compile(r'''^.{0,99}\.put\(.{0,99}$'''), JS_FILES), + ('routing_python', compile(r'''\.add_resource\W.{0,200}$'''), PY_FILES), + ('routing_web', compile(r'''\.route\(.{0,199}$''')), + ('rpc_reg', compile(r'''RpcServerRegisterIf.{0,199}$'''), C_FILES), + ('ruby_bad_hash', compile(r'''(Digest::MD5|Digest::SHA1)'''), RUBY_FILES), + ('ruby_cmdi_backtick', compile(r'''^[^"\n]*`[^`\n]*#\{[^`\n]+`'''), RUBY_FILES), + ('ruby_cmdi_backtick', compile(r'''^[^"\n]*`[^`\n]+`'''), RUBY_FILES), + ('ruby_cmdi_backtick2', compile(r'''`#\{'''), RUBY_FILES), + ('ruby_cmdi_exec', compile(r'''\Wexec\W'''), RUBY_FILES), + ('ruby_cmdi_percent_x', compile(r'''%x[\(\{]'''), RUBY_FILES), + ('ruby_cmdi_percent_x', compile(r'''%x[\(\{].*#\{'''), RUBY_FILES), + ('ruby_cmdi_popen', compile(r'''IO\.popen'''), RUBY_FILES), + ('ruby_cmdi_popen', compile(r'''IO\.popen.*#\{'''), RUBY_FILES), + ('ruby_cmdi_popen2', compile(r'''\Wpopen.{0,200}'''), RUBY_FILES), + ('ruby_cmdi_spawn', compile(r'''Process\.spawn'''), RUBY_FILES), + ('ruby_cmdi_spawn', compile(r'''Process\.spawn.*#\{'''), RUBY_FILES), + ('ruby_cmdi_system', compile(r'''\Wsystem\W.*#\{'''), RUBY_FILES), + ('ruby_custom_header', compile(r'''request\.headers\['''), RUBY_FILES), + ('ruby_env', compile(r'''\WENV\[".*"\]'''), RUBY_FILES), + ('ruby_json_load_RCE', compile(r'''JSON\.load'''), RUBY_FILES), + ('ruby_rails_version', compile(r'''^\s*rails\s*\([0-9\.]+\)'''), 'Gemfile.lock'), + ('ruby_req_header', compile(r'''\.headers\["[a-zA-Z0-9-]"\]'''), RUBY_FILES), + ('ruby_route_delete', compile(r'''\Wdelete\s'''), RUBY_FILES), + ('ruby_route_get', compile(r'''\Wget\s'''), RUBY_FILES), + ('ruby_route_match', compile(r'''\Wmatch\s'''), RUBY_FILES), + ('ruby_route_post', compile(r'''\Wpost\s'''), RUBY_FILES), + ('ruby_route_put', compile(r'''\Wput\s'''), RUBY_FILES), + ('ruby_sqli_from', compile(r'''\Wfrom\(.*#'''), RUBY_FILES), + ('ruby_sqli_order', compile(r'''\Worder\(.*#'''), RUBY_FILES), + ('ruby_sqli_where', compile(r'''\Wwhere\(.*#'''), RUBY_FILES), + ('ruby_sqli_where_interp', compile(r'''\.where.*#{'''), RUBY_FILES), + ('ruby_string_interpolation', compile(r'''"[^"#]*#\{'''), RUBY_FILES), + ('ruby_url_string_interpolation', compile(r'''https?://.*#\{.{0,99}$'''), RUBY_FILES), + ('ruby_yaml_load_file', compile(r'''\.load_file\W.{0,99}$'''), RUBY_FILES), + ('secure_url', compile(r'''https://([a-zA-Z0-9]+\.)+[a-zA-Z0-9]+.{0,200}$''')), + ('segv_reference', compile(r'''\W(segvs|segv|sigsegv)\W.{0,200}$''')), + ('simpleDB', compile(r'''SimpleDB.{0,99}$''')), + ('sqli_brace_interpolation', compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\{\d+\}.*("|\').{0,99}$''')), + ('sqli_c', compile(r'''"select\s.{1,200}%s.{0,99}$'''), C_FILES), + ('sqli_compileSelectWhere', compile(r'''CompileSelectWhere.{0,99}$''')), + ('sqli_createSQLQuery', compile(r'''createSQLQuery.{0,99}$''')), + ('sqli_dblink', compile(r'''dblink.{0,99}$''')), + ('sqli_dbms_sql_exec', compile(r'''dbms_sql.execute.{0,99}$''')), + ('sqli_deprecated_escape', compile(r'''PQescapeString\(.{0,99}$''')), + ('sqli_deprecated_escape2', compile(r'''mysql_escape_string\(.{0,99}$''')), + ('sqli_dollar_interpolation', compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\$.*("|\').{0,99}$''')), + ('sqli_dotnet_interpolation2', compile(r'''\Wselect\s+[a-zA-z0-9\.,\*]+\s+from.{1,80}{\d+}.{0,99}$'''), DOTNET_FILES), + ('sqli_exec_sp', compile(r'''ExecuteStoredProcedure\(.{0,99}$''')), + ('sqli_import_java_sql', compile(r'''import\s+java.sql.{0,99}$''')), + ('sqli_in_joined_strings', compile(r'''\.{0,199}strings\.Join\(.{0,199}''')), + ('sqli_insert', compile(r'''\Winsert\s+into\s+[a-zA-z0-9\.,\*].{0,99}$''')), + ('sqli_interpolate_brace', compile(r'''^.{0,199}\'\{\s*\d+\s*\}\'.{0,199}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('sqli_java_concat', compile(r'''"[\s\(]*\b(select|insert|update|delete)\b.{0,199}"\s*\+\s*\w+.{0,99}$'''), JAVA_FILES), + ('sqli_java_sqli_append', compile(r'''sql\.append\(.{0,99}$''')), + ('sqli_joined_strings_sgl', compile(r'''strings\.Join\(.{0,199}\'.{0,199}$''')), + ('sqli_like', compile(r'''LIKE.*(%'|'%).{0,99}$''')), + ('sqli_oracle_execute_immediate', compile(r'''\Wexecute\s+immediate\W.{0,99}$''')), + ('sqli_orcl_dbms_sql_parse', compile(r'''dbms_sql.parse.{0,99}$''')), + ('sqli_orcl_exec_immediate', compile(r'''EXECUTE\s+IMMEDIATE.{0,99}$''')), + ('sqli_order_by', compile(r'''order\sby.{0,99}$''')), + ('sqli_partial_view', compile(r'''\WPartialView\(.{0,99}$''')), + ('sqli_percent_interpolation', compile(r'''("|\')\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|TRUNCATE|USE)\s.*\%.*("|\').{0,99}$''')), + ('sqli_py_interp', compile(r'''\.execute\(\s*".{0,99}\%s.{0,99}$'''), PY_FILES), + ('sqli_queryBuilder', compile(r'''queryBuilder.{0,99}$''')), + ('sqli_queryRaw', compile(r'''queryRaw\(.{0,99}$''')), + ('sqli_select_from', compile(r'''\Wselect\W.{0,99}\Wfrom\W.{0,99}$''')), + ('sqli_simpleDBSelect', compile(r'''\.SelectRequest.{0,99}$''')), + ('sqli_sp_executesql', compile(r'''\Wsp_executesql\W.{0,99}$''')), + ('sqli_sp_xp', compile(r'''\W(exec\ssp_|exec\sxp_).{0,99}$''')), + ('sqli_sqlHelper', compile(r'''sqlHelper.runQuery.{0,99}$''')), + ('sqli_sql_apis', compile(r'''\W(OleDbConnection|ADODB\.|System\.Data\.Sql|\.ResultSet).{0,99}$'''), DOTNET_FILES, CS_EXCLUSIONS), + ('sqli_sql_execute', compile(r'''\WEXECUTE\W.{0,99}$''')), + ('sqli_where', compile(r'''\s+WHERE\s+[^\n]*\$\w+.{0,99}$''')), + ('ssh_disable_hostkey_check', compile(r'''StrictHostKeyChecking=no.{0,99}$''')), + ('ssl_disable_curl', compile(r'''curl.{0,99}\s-k\W.{0,99}$''')), + ('ssl_disable_java', compile(r'''InsecureRequestWarning.{0,99}$''')), + ('ssl_disable_mysql', compile(r'''--skip-ssl.{0,99}$''')), + ('ssl_disable_python', compile(r'''checkServerTrusted.{0,99}$''')), + ('ssl_disable_python2', compile(r'''no-check-cert.{0,99}$''')), + ('ssl_disable_python3', compile(r'''verify\s*=\s*False.{0,99}$''')), + ('ssl_disable_python4', compile(r'''rejectUnauthorized.{99}[Ff]alse.{0,99}$''')), + ('ssl_disable_wget', compile(r'''wget.{0,200}--no-check-certificate.{0,200}$''')), + ('str_dot_net', compile(r'''\.Format.{1,80}\s-.{1,80}{\d+}.{0,99}$''')), + ('str_dot_net2', compile(r'''\.Format.{1,80}\{\d+\}.{1,80}\s-.{1,80}.{0,99}$''')), + ('str_interp_brace', compile(r'''\$\".{0,99}{.{0,99}\".{0,99}$''')), + ('str_interp_dollar', compile(r'''\".{0,99}\$.{0,99}\".{0,99}$''')), + ('str_join', compile(r'''string\.Join\(.{0,199}$''')), + ('str_mixed_quote_dbl_sgl', compile(r'''^.{0,99}\"\'.{0,99}$''')), + ('str_mixed_quote_sgl_dbl', compile(r'''^.{0,99}\'\".{0,99}$''')), + ('str_plus', compile(r'''\'\s*\+.{0,99}\+\s*\'.{0,99}$''')), + ('str_scala_mkString', compile(r'''\.mkString\(.{0,99}$''')), + ('todo_authenticate', compile(r'''TODO.*authenticate.{0,200}$''')), + ('todo_encrypt', compile(r'''TODO.*encrypt.{0,200}$''')), + ('todo_login', compile(r'''TODO.*login.{0,200}$''')), + ('todo_password', compile(r'''TODO.*password.{0,200}$''')), + ('todo_password2', compile(r'''password.*TODO.{0,200}$''')), + ('trusted_plaintext_docker_repo', compile(r'''trusted\s*=\s*yes.*http://.{0,99}$''')), # noqa + ('uniq_ip_addresses', compile(r'''[\'"]([1-2]?[0-9]?[0-9]\.){3}([1-2]?[0-9]?[0-9])[\'"]''')), + ('unreal_fs', compile(r'''FFileHelper::''')), + ('unreal_mem', compile(r'''FMemory::''')), + ('unreal_module', compile(r'''FModuleManager::''')), + ('unreal_paths', compile(r'''FPaths::''')), + ('url_numeric', compile(r'''^[^#]*http(s)?://\d+\.\d+\.\d+\.\d+.{0,200}$'''), None, [compile('127.0.0.1')]), + ('url_pattern', compile(r'''url-pattern{0,200}$''')), + ('useradd', compile(r'''useradd.{0,200}$''')), + ('username_email', compile(r'''[^/]userName:\s*[\.a-zA-Z0-9\_\-]+@[\.a-zA-Z0-9\_\-]+(\.[\.a-zA-Z0-9\_\-]+)+[^\n]{0,200}$''')), + ('ver_aws_sdk', compile(r'''AWS_SDK_VERSION_STRING.{0,99}$''')), + ('ver_bzip', compile(r'''BZ_VERSION.{0,99}$''')), + ('ver_jansson', compile(r'''JANSSON_VERSION.{0,99}$''')), + ('ver_jsoncpp', compile(r'''AWS_JSONCPP_VERSION_STRING.{0,99}$''')), + ('ver_libcurl', compile(r'''LIBCURL_VERSION.{0,99}$''')), + ('ver_libcurl_str', compile(r'''#define LIBCURL_VERSION "[^"]+"''')), + ('ver_libpng', compile(r'''PNG_LIBPNG_VER_STRING.{0,99}$''')), + ('ver_mariadb', compile(r'''MARIADB_PACKAGE_VERSION.{0,99}$''')), + ('ver_mdb', compile(r'''(MDB_VERSION_MAJOR|MDB_VERSION_MINOR|MDB_VERSION_PATCH).{0,99}$''')), + ('ver_mongoose', compile(r'''MONGOOSE_VERSION.{0,99}$''')), + ('ver_openssl', compile(r'''OPENSSL_VERSION_TEXT.{0,99}$''')), + ('ver_postgres', compile(r'''(PG_MAJORVERSION|PG_VERSION|PG_VERSION_STR).{0,99}$''')), + ('ver_sqlite', compile(r'''SQLITE_VERSION.{0,99}$''')), + ('ver_u_icu', compile(r'''U_ICU_VERSION.{0,99}$''')), + ('ver_zlib', compile(r'''ZLIB_VERSION.{0,99}$''')), + ('web_HttpServletRequest', compile(r'''HttpServletRequest.{0,99}$''')), + ('web_dotnet', compile(r'''HttpResponseMessage.{0,99}$''')), + ('web_input', compile(r'''\W(FileInputStream|FilterInputStream|SequenceInputStream|StringBufferInputStream|ByteArrayInputStream|FileOutputStream).{0,99}$''')), + ('web_java_custom_header', compile(r'''\.getHeader\(.{0,99}$''')), + ('web_net_events', compile(r'''\W(Application_OnAuthenticateRequest|Application_OnAuthorizeRequest|Session_OnStart).{0,99}$''')), + ('web_path', compile(r'''\W(getRealPath).{0,99}$''')), + ('web_remote_name', compile(r'''\W(getRemoteAddr|getRemoteHost).{0,99}$''')), + ('web_request_dot', compile(r'''\WRequest\..{0,99}$''')), + ('web_sec_override', compile(r'''\W(RequestMinimum|RequestOptional|SkipVerification|UnmanagedCode).{0,99}$''')), + ('win_filter_drv_reg', compile(r'''FltCreateCommunicationPort.{0,199}$''')), + ('win_reg_api', compile(r'''(OpenSubKey|RegOpenKey|RegQueryInfoKey|RegQueryValue|RegSetValue).{0,99}$''')), + ('win_reg_key', compile(r'''(HKEY_LOCAL_MACHINE|HKEY_CURRENT_USER|HKEY_CLASSES_ROOT|HKEY_USERS|HKEY_CURRENT_CONFIG).{0,99}$''')), + ('workzeug_debugger_active', compile(r'''WERKZEUG_DEBUG_PIN.{0,200}$''')), ] BannedFunctions = ['_alloca', '_ftcscat', '_ftcscpy', '_getts', '_gettws', '_i64toa', '_i64tow', '_itoa', '_itow', '_makepath', '_mbccat', diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..822e14a --- /dev/null +++ b/requirements.in @@ -0,0 +1 @@ +regex \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d69c359 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,102 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --generate-hashes requirements.in +# +regex==2024.11.6 \ + --hash=sha256:02a02d2bb04fec86ad61f3ea7f49c015a0681bf76abb9857f945d26159d2968c \ + --hash=sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60 \ + --hash=sha256:040df6fe1a5504eb0f04f048e6d09cd7c7110fef851d7c567a6b6e09942feb7d \ + --hash=sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d \ + --hash=sha256:06eb1be98df10e81ebaded73fcd51989dcf534e3c753466e4b60c4697a003b67 \ + --hash=sha256:072623554418a9911446278f16ecb398fb3b540147a7828c06e2011fa531e773 \ + --hash=sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0 \ + --hash=sha256:08986dce1339bc932923e7d1232ce9881499a0e02925f7402fb7c982515419ef \ + --hash=sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad \ + --hash=sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe \ + --hash=sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3 \ + --hash=sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114 \ + --hash=sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4 \ + --hash=sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39 \ + --hash=sha256:164d8b7b3b4bcb2068b97428060b2a53be050085ef94eca7f240e7947f1b080e \ + --hash=sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3 \ + --hash=sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7 \ + --hash=sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d \ + --hash=sha256:220902c3c5cc6af55d4fe19ead504de80eb91f786dc102fbd74894b1551f095e \ + --hash=sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a \ + --hash=sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7 \ + --hash=sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f \ + --hash=sha256:2e34b51b650b23ed3354b5a07aab37034d9f923db2a40519139af34f485f77d0 \ + --hash=sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54 \ + --hash=sha256:3a51ccc315653ba012774efca4f23d1d2a8a8f278a6072e29c7147eee7da446b \ + --hash=sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c \ + --hash=sha256:40291b1b89ca6ad8d3f2b82782cc33807f1406cf68c8d440861da6304d8ffbbd \ + --hash=sha256:41758407fc32d5c3c5de163888068cfee69cb4c2be844e7ac517a52770f9af57 \ + --hash=sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34 \ + --hash=sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d \ + --hash=sha256:50153825ee016b91549962f970d6a4442fa106832e14c918acd1c8e479916c4f \ + --hash=sha256:5056b185ca113c88e18223183aa1a50e66507769c9640a6ff75859619d73957b \ + --hash=sha256:5071b2093e793357c9d8b2929dfc13ac5f0a6c650559503bb81189d0a3814519 \ + --hash=sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4 \ + --hash=sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a \ + --hash=sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638 \ + --hash=sha256:5670bce7b200273eee1840ef307bfa07cda90b38ae56e9a6ebcc9f50da9c469b \ + --hash=sha256:5704e174f8ccab2026bd2f1ab6c510345ae8eac818b613d7d73e785f1310f839 \ + --hash=sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07 \ + --hash=sha256:5e7e351589da0850c125f1600a4c4ba3c722efefe16b297de54300f08d734fbf \ + --hash=sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff \ + --hash=sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0 \ + --hash=sha256:684d7a212682996d21ca12ef3c17353c021fe9de6049e19ac8481ec35574a70f \ + --hash=sha256:69ab78f848845569401469da20df3e081e6b5a11cb086de3eed1d48f5ed57c95 \ + --hash=sha256:6f44ec28b1f858c98d3036ad5d7d0bfc568bdd7a74f9c24e25f41ef1ebfd81a4 \ + --hash=sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e \ + --hash=sha256:764e71f22ab3b305e7f4c21f1a97e1526a25ebdd22513e251cf376760213da13 \ + --hash=sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519 \ + --hash=sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2 \ + --hash=sha256:8447d2d39b5abe381419319f942de20b7ecd60ce86f16a23b0698f22e1b70008 \ + --hash=sha256:86fddba590aad9208e2fa8b43b4c098bb0ec74f15718bb6a704e3c63e2cef3e9 \ + --hash=sha256:89d75e7293d2b3e674db7d4d9b1bee7f8f3d1609428e293771d1a962617150cc \ + --hash=sha256:93c0b12d3d3bc25af4ebbf38f9ee780a487e8bf6954c115b9f015822d3bb8e48 \ + --hash=sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20 \ + --hash=sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89 \ + --hash=sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e \ + --hash=sha256:997d6a487ff00807ba810e0f8332c18b4eb8d29463cfb7c820dc4b6e7562d0cf \ + --hash=sha256:a03e02f48cd1abbd9f3b7e3586d97c8f7a9721c436f51a5245b3b9483044480b \ + --hash=sha256:a36fdf2af13c2b14738f6e973aba563623cb77d753bbbd8d414d18bfaa3105dd \ + --hash=sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84 \ + --hash=sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29 \ + --hash=sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b \ + --hash=sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3 \ + --hash=sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45 \ + --hash=sha256:ad182d02e40de7459b73155deb8996bbd8e96852267879396fb274e8700190e3 \ + --hash=sha256:b2837718570f95dd41675328e111345f9b7095d821bac435aac173ac80b19983 \ + --hash=sha256:b489578720afb782f6ccf2840920f3a32e31ba28a4b162e13900c3e6bd3f930e \ + --hash=sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7 \ + --hash=sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4 \ + --hash=sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e \ + --hash=sha256:ba9b72e5643641b7d41fa1f6d5abda2c9a263ae835b917348fc3c928182ad467 \ + --hash=sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577 \ + --hash=sha256:bb8f74f2f10dbf13a0be8de623ba4f9491faf58c24064f32b65679b021ed0001 \ + --hash=sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0 \ + --hash=sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55 \ + --hash=sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9 \ + --hash=sha256:cdf58d0e516ee426a48f7b2c03a332a4114420716d55769ff7108c37a09951bf \ + --hash=sha256:d1cee317bfc014c2419a76bcc87f071405e3966da434e03e13beb45f8aced1a6 \ + --hash=sha256:d22326fcdef5e08c154280b71163ced384b428343ae16a5ab2b3354aed12436e \ + --hash=sha256:d3660c82f209655a06b587d55e723f0b813d3a7db2e32e5e7dc64ac2a9e86fde \ + --hash=sha256:da8f5fc57d1933de22a9e23eec290a0d8a5927a5370d24bda9a6abe50683fe62 \ + --hash=sha256:df951c5f4a1b1910f1a99ff42c473ff60f8225baa1cdd3539fe2819d9543e9df \ + --hash=sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51 \ + --hash=sha256:ea1bfda2f7162605f6e8178223576856b3d791109f15ea99a9f95c16a7636fb5 \ + --hash=sha256:f02f93b92358ee3f78660e43b4b0091229260c5d5c408d17d60bf26b6c900e86 \ + --hash=sha256:f056bf21105c2515c32372bbc057f43eb02aae2fda61052e2f7622c801f0b4e2 \ + --hash=sha256:f1ac758ef6aebfc8943560194e9fd0fa18bcb34d89fd8bd2af18183afd8da3a2 \ + --hash=sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0 \ + --hash=sha256:f654882311409afb1d780b940234208a252322c24a93b442ca714d119e68086c \ + --hash=sha256:f65557897fc977a44ab205ea871b690adaef6b9da6afda4790a2484b04293a5f \ + --hash=sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6 \ + --hash=sha256:fdabbfc59f2c6edba2a6622c647b716e34e8e3867e0ab975412c5c2f79b82da2 \ + --hash=sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9 \ + --hash=sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91 + # via -r requirements.in