Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into jks
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Nov 1, 2023
2 parents 12bae34 + 105e296 commit 6f3f832
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 32 deletions.
8 changes: 4 additions & 4 deletions cicd/benchmark.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Predefined Pattern 326 2 40
Private Key 1001 1 3
Seed, Salt, Nonce 40 4 4
TOTAL: 5307 63688 5644
Detected Credentials: 5997
credsweeper result_cnt : 5339, lost_cnt : 0, true_cnt : 4441, false_cnt : 898
Detected Credentials: 5996
credsweeper result_cnt : 5338, lost_cnt : 0, true_cnt : 4441, false_cnt : 897
Category TP FP TN FN FPR FNR ACC PRC RCL F1
-------------------------- ---- ---- -------- ---- --------- --------- -------- -------- -------- --------
Authentication Key & Token 54 4 28 16 0.125 0.228571 0.803922 0.931034 0.771429 0.84375
Generic Secret 973 3 215 83 0.0137615 0.0785985 0.932496 0.996926 0.921402 0.957677
Generic Token 289 7 596 44 0.0116086 0.132132 0.945513 0.976351 0.867868 0.918919
Other 818 750 63395 258 0.0116923 0.239777 0.984545 0.521684 0.760223 0.618759
Other 818 749 63396 258 0.0116767 0.239777 0.98456 0.522017 0.760223 0.618994
Password 995 130 4150 410 0.0303738 0.291815 0.905013 0.884444 0.708185 0.786561
Predefined Pattern 309 2 40 17 0.0476191 0.0521472 0.94837 0.993569 0.947853 0.970173
Private Key 967 0 4 34 0.033966 0.966169 1 0.966034 0.982724
Seed, Salt, Nonce 36 2 6 4 0.25 0.1 0.875 0.947368 0.9 0.923077
4441 898 19428253 866 4.622e-05 0.163181 0.999909 0.831804 0.836819 0.834304
4441 897 19428254 866 4.617e-05 0.163181 0.999909 0.83196 0.836819 0.834382
2 changes: 1 addition & 1 deletion credsweeper/rules/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
severity: medium
type: keyword
values:
- (?<!by)pass(?!ed|ing|es)|pw(d|\b)
- (?<!by)pass(?!ed|ing|es|\s+[a-z]{3,})|pw(d|\b)
filter_type: PasswordKeyword
use_ml: true
min_line_len: 10
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
SAMPLES_FILES_COUNT: int = 126

# credentials count after scan
SAMPLES_CRED_COUNT: int = 383
SAMPLES_CRED_LINE_COUNT: int = 402
SAMPLES_CRED_COUNT: int = 382
SAMPLES_CRED_LINE_COUNT: int = 401

# credentials count after post-processing
SAMPLES_POST_CRED_COUNT: int = 296
Expand Down
24 changes: 0 additions & 24 deletions tests/data/ml_threshold_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -8090,30 +8090,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
"ml_probability": null,
"rule": "Password",
"severity": "medium",
"line_data_list": [
{
"line": "PASS Interface test: items are unique",
"line_num": 1,
"path": "tests/samples/pass_filtered",
"info": "",
"value": "items",
"value_start": 21,
"value_end": 26,
"variable": "PASS Interface test",
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 2.321928094887362,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
3 changes: 2 additions & 1 deletion tests/samples/pass_filtered
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PASS Interface test: items are unique
PASS Interface test: items are unique
* Pass condition : Loyalty cards displayed

0 comments on commit 6f3f832

Please sign in to comment.