@@ -622,3 +622,127 @@ strings: &default_strings
622622 pattern : " ^sudo .*$"
623623 message : " Executing sudo command"
624624 score : 20
625+
626+ # Regexes for detecting leaking api tokens, secrets, etc...
627+ # Source of some regexes used: https://www.ndss-symposium.org/wp-content/uploads/2019/02/ndss2019_04B-3_Meli_paper.pdf
628+ - id : twitter_access_token
629+ type : regex
630+ pattern : " ^[1-9][0-9]+-[0-9a-zA-Z]{40}$"
631+ message : " Twitter access token"
632+ score : 100
633+ tags :
634+ - secrets_leak
635+
636+ - id : facebook_access_token
637+ type : regex
638+ pattern : " ^EAACEdEose0cBA[0-9A-Za-z]+$"
639+ message : " Facebook access token"
640+ score : 100
641+ tags :
642+ - secrets_leak
643+
644+ - id : google_api_key
645+ type : regex
646+ pattern : " ^AIza[-0-9A-Za-z_]{35}$"
647+ message : " Google API key"
648+ score : 100
649+ tags :
650+ - secrets_leak
651+
652+ - id : google_oauth_id
653+ type : regex
654+ pattern : " ^[0-9]+-[0-9A-Za-z_]{32}\\ .apps\\ .googleusercontent\\ .com$"
655+ message : " Google OAuth ID"
656+ score : 100
657+ tags :
658+ - secrets_leak
659+
660+ - id : picatic_api_key
661+ type : regex
662+ pattern : " ^sk_live_[0-9a-z]{32}$"
663+ message : " Picatic API key"
664+ score : 100
665+ tags :
666+ - secrets_leak
667+
668+ - id : stripe_standard_key
669+ type : regex
670+ pattern : " ^sk_live_[0-9a-zA-Z]{24}$"
671+ message : " Stripe standard key"
672+ score : 100
673+ tags :
674+ - secrets_leak
675+
676+ - id : stripe_restricted_key
677+ type : regex
678+ pattern : " ^rk_live_[0-9a-zA-Z]{24}$"
679+ message : " Stripe restricted key"
680+ score : 100
681+ tags :
682+ - secrets_leak
683+
684+ - id : square_access_token
685+ type : regex
686+ pattern : " ^sq0atp-[-0-9A-Za-z_]{22}$"
687+ message : " Square access token"
688+ score : 100
689+ tags :
690+ - secrets_leak
691+
692+ - id : square_oauth_secret
693+ type : regex
694+ pattern : " ^sq0csp-[-0-9A-Za-z_]{43}$"
695+ message : " Square OAuth secret"
696+ score : 100
697+ tags :
698+ - secrets_leak
699+
700+ - id : paypal_braintree
701+ type : regex
702+ pattern : " ^access_token\\ $production\\ $[0-9a-z]{16}\\ $[0-9a-f]{32}$"
703+ message : " PayPal braintree access token"
704+ score : 100
705+ tags :
706+ - secrets_leak
707+
708+ - id : amazon_mws_auth_token
709+ type : regex
710+ pattern : " ^amzn\\ .mws\\ .[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
711+ message : " Amazon MWS auth token"
712+ score : 100
713+ tags :
714+ - secrets_leak
715+
716+ - id : twilio_api_key
717+ type : regex
718+ pattern : " ^SK[0-9a-fA-F]{32}$"
719+ message : " Twilio API key"
720+ score : 100
721+ tags :
722+ - secrets_leak
723+
724+ - id : mailgun_api_key
725+ type : regex
726+ pattern : " ^key-[0-9a-zA-Z]{32}$"
727+ message : " Mailgun API key"
728+ score : 100
729+ tags :
730+ - secrets_leak
731+
732+ - id : mailchimp_api_key
733+ type : regex
734+ pattern : " ^[0-9a-f]{32}-us[0-9]{1,2}$"
735+ message : " MailChimp API key"
736+ score : 100
737+ tags :
738+ - secrets_leak
739+
740+ - id : amazon_aws_key
741+ type : regex
742+ pattern : " ^(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[0-9A-Z]{16}$"
743+ message : " Amazon AWS key"
744+ score : 100
745+ tags :
746+ - secrets_leak
747+
748+
0 commit comments