@@ -84,49 +84,25 @@ var secretsPatterns = [...]secretPattern{
8484 regexp : regexp .MustCompile (`ghs_[a-zA-Z0-9]{36}` ),
8585 },
8686 {
87- name : "Google API Key" ,
88- regexp : regexp .MustCompile (`AIza[0-9A-Za-z\-_]{35}` ),
89- },
90- {
91- name : "Google Cloud Platform API Key" ,
92- regexp : regexp .MustCompile (`AIza[0-9A-Za-z\-_]{35}` ),
93- },
94- {
95- name : "Google Cloud Platform OAuth" ,
96- regexp : regexp .MustCompile (`[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com` ),
97- },
98- {
99- name : "Google Drive API Key" ,
87+ name : "Google API Key" , // Also Google Cloud Platform, Gmail, Drive, YouTube, etc.
10088 regexp : regexp .MustCompile (`AIza[0-9A-Za-z\-_]{35}` ),
10189 },
90+
10291 {
103- name : "Google Drive OAuth" ,
92+ name : "Google Cloud Platform OAuth" , // Also Gmail, Drive, YouTube, etc.
10493 regexp : regexp .MustCompile (`[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com` ),
10594 },
95+
10696 {
10797 name : "Google (GCP) Service-account" ,
10898 regexp : regexp .MustCompile (`"type": "service_account"` ),
10999 },
110- {
111- name : "Google Gmail API Key" ,
112- regexp : regexp .MustCompile (`AIza[0-9A-Za-z\-_]{35}` ),
113- },
114- {
115- name : "Google Gmail OAuth" ,
116- regexp : regexp .MustCompile (`[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com` ),
117- },
100+
118101 {
119102 name : "Google OAuth Access Token" ,
120103 regexp : regexp .MustCompile (`ya29\.[0-9A-Za-z\-_]+` ),
121104 },
122- {
123- name : "Google YouTube API Key" ,
124- regexp : regexp .MustCompile (`AIza[0-9A-Za-z\-_]{35}` ),
125- },
126- {
127- name : "Google YouTube OAuth" ,
128- regexp : regexp .MustCompile (`[0-9]+-[0-9A-Za-z_]{32}\.apps\.googleusercontent\.com` ),
129- },
105+
130106 {
131107 name : "Generic API Key" ,
132108 regexp : regexp .MustCompile (`[aA][pP][iI]_?[kK][eE][yY].*[''|"][0-9a-zA-Z]{32,45}[''|"]` ),
@@ -149,7 +125,7 @@ var secretsPatterns = [...]secretPattern{
149125 },
150126 {
151127 name : "Password in URL" ,
152- regexp : regexp .MustCompile (`[a-zA-Z]{3,10}://[^/\\s:@]{3,20 }:[^/\\s:@]{3,20}@.{1,100}[ "'\\s]` ),
128+ regexp : regexp .MustCompile (`[a-zA-Z]{3,10}://[a-zA-Z0-9\.\-\_\+]{1,64 }:[a-zA-Z0-9\.\-\_\!\$\%\&\*\+\=\^\(\)]{1,128}@[a-zA-Z0-9\.\-\_]+(:[0-9]+)?(/[^ "'\s]*)?(["' \s]|$) ` ),
153129 },
154130 {
155131 name : "Slack Webhook" ,
0 commit comments