Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Aug 29, 2024
1 parent 0e1e9b1 commit 44b6cd4
Show file tree
Hide file tree
Showing 7 changed files with 1,513 additions and 892 deletions.
36 changes: 18 additions & 18 deletions .ci/benchmark.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
META MD5 b2e436d07bb4f2a5aea6a4957e3dd832
DATA MD5 cccce0de712d5296e0aa9f47fecac91d
META MD5 170f5d5b2d60b5f1d498742ae7cf8ce6
DATA MD5 645538b9c777d58ef782acda2d6e15b1
DATA: 16345157 interested lines. MARKUP: 62778 items
FileType FileNumber ValidLines Positives Negatives Templates
--------------- ------------ ------------ ----------- ----------- -----------
Expand Down Expand Up @@ -63,7 +63,7 @@ FileType FileNumber ValidLines Positives Negatives Templat
.gd 1 37 1
.gml 3 3075 16
.gni 3 5017 19
.go 1080 566476 687 4129 738
.go 1080 566476 688 4128 738
.golden 5 1168 1 13 29
.gradle 45 3265 4 90 100
.graphql 7 420 13
Expand Down Expand Up @@ -222,25 +222,25 @@ FileType FileNumber ValidLines Positives Negatives Templat
.yml 418 36162 545 892 380
.zsh 6 872 12
.zsh-theme 1 97 1
TOTAL: 10259 16345157 12183 50464 5116
credsweeper result_cnt : 11314, lost_cnt : 0, true_cnt : 11140, false_cnt : 174
TOTAL: 10259 16345157 12184 50463 5116
credsweeper result_cnt : 11433, lost_cnt : 0, true_cnt : 11157, false_cnt : 276
Rules Positives Negatives Templates Reported TP FP TN FN FPR FNR ACC PRC RCL F1
------------------------------ ----------- ----------- ----------- ---------- ----- ---- ----- ---- -------- -------- -------- -------- -------- --------
API 128 3162 189 116 115 1 3350 13 0.000298 0.101562 0.995976 0.991379 0.898438 0.942623
API 128 3162 189 117 115 2 3349 13 0.000597 0.101562 0.995688 0.982906 0.898438 0.938776
AWS Client ID 167 21 0 160 160 0 21 7 0.000000 0.041916 0.962766 1.000000 0.958084 0.978593
AWS Multi 75 16 0 87 75 11 5 0 0.687500 0.000000 0.879121 0.872093 1.000000 0.931677
AWS S3 Bucket 66 24 0 92 66 24 0 0 1.000000 0.000000 0.733333 0.733333 1.000000 0.846154
Atlassian Old PAT token 27 308 3 12 3 8 303 24 0.025723 0.888889 0.905325 0.272727 0.111111 0.157895
Auth 420 2730 76 395 384 11 2795 36 0.003920 0.085714 0.985431 0.972152 0.914286 0.942331
Auth 420 2730 76 393 381 12 2794 39 0.004277 0.092857 0.984191 0.969466 0.907143 0.937269
Azure Access Token 19 0 0 12 12 0 0 7 0.368421 0.631579 1.000000 0.631579 0.774194
BASE64 Private Key 7 4 0 7 7 0 4 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000
BASE64 encoded PEM Private Key 7 0 0 5 5 0 0 2 0.285714 0.714286 1.000000 0.714286 0.833333
Bitbucket Client ID 143 2097 9 48 28 19 2087 115 0.009022 0.804196 0.940418 0.595745 0.195804 0.294737
Bitbucket Client Secret 301 809 10 40 29 11 808 272 0.013431 0.903654 0.747321 0.725000 0.096346 0.170088
CMD Password 19 127 6 17 17 0 133 2 0.000000 0.105263 0.986842 1.000000 0.894737 0.944444
Certificate 23 471 1 23 17 6 466 6 0.012712 0.260870 0.975758 0.739130 0.739130 0.739130
CMD Password 19 127 6 18 18 0 133 1 0.000000 0.052632 0.993421 1.000000 0.947368 0.972973
Certificate 23 471 1 25 19 6 466 4 0.012712 0.173913 0.979798 0.760000 0.826087 0.791667
ConvertTo-SecureString 13 4 0 13 13 0 4 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000
Credential 95 420 74 91 91 0 494 4 0.000000 0.042105 0.993209 1.000000 0.957895 0.978495
Credential 95 420 74 93 93 0 494 2 0.000000 0.021053 0.996604 1.000000 0.978947 0.989362
Docker Swarm Token 2 0 0 1 1 0 0 1 0.500000 0.500000 1.000000 0.500000 0.666667
Dropbox App secret 64 139 1 46 35 10 130 29 0.071429 0.453125 0.808824 0.777778 0.546875 0.642202
Facebook Access Token 0 1 0 0 0 1 0 0.000000 1.000000
Expand All @@ -255,17 +255,17 @@ Grafana Provisioned API Key 22 1 0
JSON Web Token 170 61 0 131 131 0 61 39 0.000000 0.229412 0.831169 1.000000 0.770588 0.870432
Jira / Confluence PAT token 0 4 0 0 0 4 0 0.000000 1.000000
Jira 2FA 15 6 1 12 12 0 7 3 0.000000 0.200000 0.863636 1.000000 0.800000 0.888889
Key 3918 15695 482 3908 3886 22 16155 32 0.001360 0.008167 0.997313 0.994371 0.991833 0.993100
Nonce 91 49 0 88 88 0 49 3 0.000000 0.032967 0.978571 1.000000 0.967033 0.983240
Key 3918 15695 482 3972 3883 89 16088 35 0.005502 0.008933 0.993829 0.977593 0.991067 0.984284
Nonce 91 49 0 89 89 0 49 2 0.000000 0.021978 0.985714 1.000000 0.978022 0.988889
Other 0 8291 1 0 0 8292 0 0.000000 1.000000
PEM Private Key 1019 1483 0 1023 1019 4 1479 0 0.002697 0.000000 0.998401 0.996090 1.000000 0.998041
Password 1842 7529 2711 1691 1665 26 10214 177 0.002539 0.096091 0.983198 0.984624 0.903909 0.942542
Salt 45 76 2 40 40 0 78 5 0.000000 0.111111 0.959350 1.000000 0.888889 0.941176
Secret 1297 1575 799 1276 1274 2 2372 23 0.000842 0.017733 0.993190 0.998433 0.982267 0.990284
Password 1842 7529 2711 1740 1685 53 10187 157 0.005176 0.085233 0.982619 0.969505 0.914767 0.941341
Salt 45 76 2 42 42 0 78 3 0.000000 0.066667 0.975610 1.000000 0.933333 0.965517
Secret 1297 1574 799 1271 1269 2 2371 28 0.000843 0.021588 0.991826 0.998426 0.978412 0.988318
Seed 1 6 0 0 0 6 1 0.000000 1.000000 0.857143 0.000000
Slack Token 4 1 0 4 4 0 1 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000
Token 648 4176 438 597 594 3 4611 54 0.000650 0.083333 0.989168 0.994975 0.916667 0.954217
Token 648 4176 438 597 590 7 4607 58 0.001517 0.089506 0.987647 0.988275 0.910494 0.947791
Twilio API Key 0 5 2 0 0 7 0 0.000000 1.000000
URL Credentials 208 146 224 202 202 0 370 6 0.000000 0.028846 0.989619 1.000000 0.971154 0.985366
URL Credentials 209 146 224 208 206 2 368 3 0.005405 0.014354 0.991364 0.990385 0.985646 0.988010
UUID 1069 265 0 1068 1067 1 264 2 0.003774 0.001871 0.997751 0.999064 0.998129 0.998596
12183 50464 5116 11321 11140 174 50290 1043 0.003448 0.085611 0.980574 0.984621 0.914389 0.948206
12184 50463 5116 11442 11157 276 50187 1027 0.005469 0.084291 0.979201 0.975859 0.915709 0.944828
Binary file modified credsweeper/ml_model/ml_model.onnx
Binary file not shown.
10 changes: 5 additions & 5 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
NEGLIGIBLE_ML_THRESHOLD = 0.0001

# credentials count after scan
SAMPLES_CRED_COUNT: int = 373
SAMPLES_CRED_LINE_COUNT: int = 390
SAMPLES_CRED_COUNT: int = 374
SAMPLES_CRED_LINE_COUNT: int = 391

# credentials count after post-processing
SAMPLES_POST_CRED_COUNT: int = 323
SAMPLES_POST_CRED_COUNT: int = 334

# with option --doc
SAMPLES_IN_DOC = 418

# archived credentials that are not found without --depth
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 22
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 18
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 24
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 16
SAMPLES_IN_DEEP_3 = SAMPLES_IN_DEEP_2 + 1

# well known string with all latin letters
Expand Down
Loading

0 comments on commit 44b6cd4

Please sign in to comment.