Skip to content

Commit 64bb451

Browse files
committed
SonarQube Credentials
1 parent 2ca2713 commit 64bb451

File tree

4 files changed

+50
-22
lines changed

4 files changed

+50
-22
lines changed

.ci/benchmark.txt

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
META MD5 346719990276f1c7ab597e7ea85f5b21
2-
DATA MD5 d9a50a89fa4ce3c5bf3cdc5d1958ee2a
3-
DATA: 16999171 interested lines. MARKUP: 63795 items
1+
META MD5 ebd91acc78f29ada1f38d6d5c9db7aec
2+
DATA MD5 b3618d25df84730a5d0f262ed4a19f28
3+
DATA: 17002898 interested lines. MARKUP: 63818 items
44
FileType FileNumber ValidLines Positives Negatives
55
--------------- ------------ ------------ ----------- -----------
6-
685 567300 136 695
6+
686 567302 138 695
77
.04 2 149 4
88
.1 2 641 2 10
99
.admx 1 26 1
@@ -12,7 +12,7 @@ FileType FileNumber ValidLines Positives Negatives
1212
.asciidoc 101 15394 68 350
1313
.axaml 5 286 9
1414
.backup 1 62 2
15-
.bash 2 2158 5
15+
.bash 3 2161 1 5
1616
.bat 5 248 2 16
1717
.bats 15 2804 14 64
1818
.bazel 3 424 14
@@ -31,13 +31,13 @@ FileType FileNumber ValidLines Positives Negatives
3131
.cmd 4 401 2 3
3232
.cnf 8 858 21 34
3333
.coffee 1 585 3
34-
.conf 60 4769 65 104
35-
.config 20 492 7 43
34+
.conf 61 4771 67 104
35+
.config 21 494 9 43
3636
.cpp 22 7300 20 77
3737
.creds 1 10 2 1
3838
.crlf 1 27 1
3939
.crt 2 4979 119
40-
.cs 262 81986 250 1032
40+
.cs 264 83360 257 1035
4141
.csp 3 379 8
4242
.csproj 1 14 1
4343
.csv 1 109 84
@@ -84,7 +84,7 @@ FileType FileNumber ValidLines Positives Negatives
8484
.ipynb 6 4804 10 10
8585
.j 1 241 4
8686
.j2 32 6043 7 209
87-
.java 650 141112 478 1455
87+
.java 651 141256 479 1455
8888
.jenkinsfile 1 58 2 6
8989
.jinja2 1 64 2
9090
.js 640 530803 859 3134
@@ -94,6 +94,7 @@ FileType FileNumber ValidLines Positives Negatives
9494
.jwt 1 1 2
9595
.key 115 3067 105 11
9696
.ks 1 25 1
97+
.ksh 1 3 1
9798
.kt 120 19864 69 377
9899
.l 1 982 1
99100
.las 1 6656 36
@@ -138,7 +139,7 @@ FileType FileNumber ValidLines Positives Negatives
138139
.pan 2 48 4
139140
.patch 3 109384 4 25
140141
.pbxproj 1 941 1
141-
.pem 65 1467 64 3
142+
.pem 66 1469 66 3
142143
.php 394 81495 167 1487
143144
.pl 16 14727 7 37
144145
.pm 10 5224 1 30
@@ -150,9 +151,9 @@ FileType FileNumber ValidLines Positives Negatives
150151
.ppk 1 45 1
151152
.private 1 15 1
152153
.proj 1 85 5
153-
.properties 55 1637 68 54
154+
.properties 56 1640 69 54
154155
.proto 5 5768 2 63
155-
.ps1 16 8509 15 86
156+
.ps1 17 8511 16 86
156157
.ps1xml 1 5022 1
157158
.pug 2 193 2
158159
.purs 1 69 4
@@ -185,7 +186,7 @@ FileType FileNumber ValidLines Positives Negatives
185186
.sbt 3 570 7
186187
.scala 52 5600 38 95
187188
.secrets 1 11 1
188-
.sh 143 23115 75 478
189+
.sh 144 23118 76 478
189190
.slim 1 153 3
190191
.smali 1 775 12
191192
.snap 3 1708 7 11
@@ -213,19 +214,19 @@ FileType FileNumber ValidLines Positives Negatives
213214
.travis 1 34 2 4
214215
.ts 607 107776 265 1991
215216
.tsx 54 7914 1 125
216-
.txt 322 89402 5258 5784
217+
.txt 428 91582 5258 5784
217218
.utf8 1 77 1
218219
.vsmdi 1 6 2 2
219220
.vue 50 8736 1 165
220221
.xaml 21 8103 295
221222
.xcscheme 1 109 1
222223
.xib 11 503 164
223224
.xsl 1 311 1
224-
.yaml 171 31958 207 395
225-
.yml 560 56585 1897 1386
226-
.zsh 6 872 11
225+
.yaml 172 31960 209 395
226+
.yml 561 56587 1899 1386
227+
.zsh 7 875 1 11
227228
.zsh-theme 1 97 1
228-
TOTAL: 11375 16999171 17141 53736
229+
TOTAL: 11496 17002898 17167 53739
229230
credsweeper result_cnt : 0, lost_cnt : 0, true_cnt : 0, false_cnt : 0
230231
Rules Positives Negatives Reported TP FP TN FN FPR FNR ACC PRC RCL F1
231232
------------------------------ ----------- ----------- ---------- ---- ---- ----- ----- -------- -------- -------- ----- -------- ----
@@ -239,7 +240,7 @@ Auth 1166 3616 0 0
239240
Azure Access Token 24 0 0 0 0 24 1.000000 0.000000 0.000000
240241
BASE64 Private Key 22 4 0 0 4 22 0.000000 1.000000 0.153846 0.000000
241242
BASE64 encoded PEM Private Key 12 0 0 0 0 12 1.000000 0.000000 0.000000
242-
Basic Authorization 688 555 0 0 555 688 0.000000 1.000000 0.446500 0.000000
243+
Basic Authorization 689 555 0 0 555 689 0.000000 1.000000 0.446141 0.000000
243244
Bearer Authorization 182 0 0 0 0 182 1.000000 0.000000 0.000000
244245
CMD ConvertTo-SecureString 13 4 0 0 4 13 0.000000 1.000000 0.235294 0.000000
245246
CMD Password 33 137 0 0 137 33 0.000000 1.000000 0.805882 0.000000
@@ -270,18 +271,19 @@ Nonce 131 109 0 0
270271
OTP / 2FA Secret 64 3 0 0 3 64 0.000000 1.000000 0.044776 0.000000
271272
Other 0 20 0 0 20 0 0.000000 1.000000
272273
PEM Private Key 1157 72 0 0 72 1157 0.000000 1.000000 0.058584 0.000000
273-
Password 2595 11366 0 0 11366 2595 0.000000 1.000000 0.814125 0.000000
274+
Password 2603 11369 0 0 11369 2603 0.000000 1.000000 0.813699 0.000000
274275
Perplexity API Key 2 0 0 0 0 2 1.000000 0.000000 0.000000
275276
Postman Credentials 2 0 0 0 0 2 1.000000 0.000000 0.000000
276277
SQL Password 44 14 0 0 14 44 0.000000 1.000000 0.241379 0.000000
277278
Salesforce Credentials 6 0 0 0 0 6 1.000000 0.000000 0.000000
278279
Salt 90 130 0 0 130 90 0.000000 1.000000 0.590909 0.000000
279280
Secret 1525 2492 0 0 2492 1525 0.000000 1.000000 0.620363 0.000000
280281
Slack Token 15 1 0 0 1 15 0.000000 1.000000 0.062500 0.000000
282+
SonarQube Credentials 11 0 0 0 0 11 1.000000 0.000000 0.000000
281283
Stripe Credentials 2 0 0 0 0 2 1.000000 0.000000 0.000000
282284
Tencent WeChat API App ID 47 0 0 0 0 47 1.000000 0.000000 0.000000
283-
Token 1144 5285 0 0 5285 1144 0.000000 1.000000 0.822056 0.000000
285+
Token 1150 5285 0 0 5285 1150 0.000000 1.000000 0.821290 0.000000
284286
Twilio Credentials 30 39 0 0 39 30 0.000000 1.000000 0.565217 0.000000
285287
URL Credentials 225 401 0 0 401 225 0.000000 1.000000 0.640575 0.000000
286288
UUID 2517 3716 0 0 3716 2517 0.000000 1.000000 0.596182 0.000000
287-
17141 53736 0 0 0 53736 17141 0.000000 1.000000 0.758158 0.000000
289+
17167 53739 0 0 0 53739 17167 0.000000 1.000000 0.757891 0.000000

meta/2e00b328.csv

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Id,FileID,Domain,RepoName,FilePath,LineStart,LineEnd,GroundTruth,ValueStart,ValueEnd,CryptographyKey,PredefinedPattern,Category
2+
11536745,a288500e,GitHub,2e00b328,data/2e00b328/src/script/a288500e.ksh,4,4,T,5,49,,,SonarQube Credentials
3+
11536746,6bd02b7c,GitHub,2e00b328,data/2e00b328/src/script/6bd02b7c.sh,4,4,T,5,49,,,SonarQube Credentials
4+
11536747,c85ce304,GitHub,2e00b328,data/2e00b328/src/script/c85ce304.ps1,2,2,T,12,56,,,SonarQube Credentials
5+
11536748,038ff36f,GitHub,2e00b328,data/2e00b328/src/script/038ff36f.bash,4,4,T,5,49,,,SonarQube Credentials
6+
11536749,0743c9c0,GitHub,2e00b328,data/2e00b328/test/client/build/0743c9c0.cs,54,54,T,41,61,,,Basic Authorization
7+
11536750,ba458cdb,GitHub,2e00b328,data/2e00b328/src/script/ba458cdb.zsh,4,4,T,5,49,,,SonarQube Credentials
8+
11536751,8ebb233e,GitHub,2e00b328,data/2e00b328/test/src/build/8ebb233e.java,65,65,T,48,53,,,Password
9+
11536755,602fdca4,GitHub,2e00b328,data/2e00b328/src/602fdca4.conf,2,2,T,13,57,,,SonarQube Credentials:Token
10+
11536756,83d57937,GitHub,2e00b328,data/2e00b328/src/resource/app/83d57937.properties,3,3,T,27,37,,,Password
11+
11536757,97f01c1d,GitHub,2e00b328,data/2e00b328/conf/97f01c1d,2,2,T,12,56,,,SonarQube Credentials:Token
12+
11536758,23529dd5,GitHub,2e00b328,data/2e00b328/src/resource/app/23529dd5.yaml,3,3,T,9,53,,,SonarQube Credentials:Token
13+
11536759,6841cbe9,GitHub,2e00b328,data/2e00b328/src/6841cbe9.config,2,2,T,13,57,,,SonarQube Credentials:Token
14+
11536760,7bee59bf,GitHub,2e00b328,data/2e00b328/src/7bee59bf.pem,2,2,T,13,57,,,SonarQube Credentials:Token
15+
11536761,236e86fb,GitHub,2e00b328,data/2e00b328/src/resource/app/236e86fb.yml,3,3,T,9,53,,,SonarQube Credentials:Token
16+
11536762,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,794,794,T,53,68,,,Password
17+
11536763,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,382,382,F,181,,,,Password
18+
11536764,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,786,786,T,77,85,,,Password
19+
11536765,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,790,790,T,51,59,,,Password
20+
11536766,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,791,791,F,51,,,,Password
21+
11536767,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,793,793,F,53,65,,,Password
22+
11536768,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,839,839,T,101,109,,,Password
23+
11536769,26c9c814,GitHub,2e00b328,data/2e00b328/test/build/26c9c814.cs,877,877,T,87,95,,,Password
24+
11536770,0743c9c0,GitHub,2e00b328,data/2e00b328/test/client/build/0743c9c0.cs,39,39,T,48,55,,,Password

obfuscate_creds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def get_obfuscated_value(value, meta_row: MetaRow):
155155
"ANVA", "AROA", "APKA", "ASCA", "ASIA", "AIza", "AKGP"]) \
156156
or value.startswith('1//0') and GOOGLEAPI_PATTERN.match(value) \
157157
or value.startswith('key-') and 36 == len(value) \
158+
or value.startswith('squ_') and 44 == len(value) \
158159
or value.startswith("xox") and 15 <= len(value) and value[3] in "abeoprst" and '-' == value[4]:
159160
obfuscated_value = value[:4] + generate_value(value[4:])
160161
elif any(value.startswith(x) for x in ["ya29.", "pass:", "salt:", "akab-", "PMAK-", "PMAT-", "xapp-", "pplx-"]):

snapshot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@
286286
"e06f3aadea4726fce31c2f6fba94d068b9d4b11acf556d0d6ad2b74ed18e7c07": "https://github.com/NickCarneiro/curlconverter",
287287
"e0a2b2e2520c62c5a30a53418e84cd225c63087ba493731cd4c12e7a8ae4220d": "https://github.com/ArchiveBox/ArchiveBox",
288288
"e0a4c18c4a074016beef46886b03e456102e2db1f157d169466db018dc95977c": "https://github.com/dbcli/pgcli",
289+
"e1751431dc5896433bcf3c3449c7c76cb9e1aa82e5a763abd55576e2465fdcde": "https://github.com/SonarSource/sonar-scanner-msbuild",
289290
"e1ccce67acc60ee97732c4e863d1b7fcce94f6044338b129618d47baca52bfe4": "https://github.com/joemccann/dillinger",
290291
"e223321de9e3ad9214722d044c2212733ed06000c7f351c8fcd0465e466cf757": "https://github.com/redisson/redisson",
291292
"e244bae38cc2f0380bbb6b609f28168b9617f4c2297f58a2dfe47d649d2ff876": "https://github.com/ubisoft/massgate",

0 commit comments

Comments
 (0)