Skip to content

Commit

Permalink
one FP update
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Nov 6, 2023
1 parent fa9518e commit adca91e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 82 deletions.
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
SAMPLES_CRED_LINE_COUNT: int = 405

# credentials count after post-processing
SAMPLES_POST_CRED_COUNT: int = 299
SAMPLES_POST_CRED_COUNT: int = 298

# with option --doc
SAMPLES_IN_DOC = 390
SAMPLES_IN_DOC = 389

# archived credentials that are not found without --depth
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 21
Expand Down
24 changes: 0 additions & 24 deletions tests/data/depth_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2477,30 +2477,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.65054,
"rule": "Password",
"severity": "medium",
"line_data_list": [
{
"line": "# FALSE id:[email protected],pw:ihqSbGg!",
"line_num": 101,
"path": "tests/samples/doc_id_pair_passwd_pair",
"info": "tests/samples/doc_id_pair_passwd_pair|RAW",
"value": "ihqSbGg!",
"value_start": 33,
"value_end": 41,
"variable": "[email protected],pw",
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 2.625,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
24 changes: 0 additions & 24 deletions tests/data/doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5429,30 +5429,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
"ml_probability": null,
"rule": "PASSWD_PAIR",
"severity": "medium",
"line_data_list": [
{
"line": "# FALSE id:[email protected],pw:ihqSbGg!",
"line_num": 101,
"path": "tests/samples/doc_id_pair_passwd_pair",
"info": "tests/samples/doc_id_pair_passwd_pair|RAW",
"value": "ihqSbGg!",
"value_start": 33,
"value_end": 41,
"variable": "pw",
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 2.625,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
12 changes: 6 additions & 6 deletions tests/data/ml_threshold_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,17 +2605,17 @@
"severity": "medium",
"line_data_list": [
{
"line": "# FALSE id:[email protected],pw:ihqSbGg!",
"line_num": 101,
"line": "id:[email protected],pw:IHQSB1GG!",
"line_num": 102,
"path": "tests/samples/doc_id_pair_passwd_pair",
"info": "",
"value": "ihqSbGg!",
"value_start": 33,
"value_end": 41,
"value": "IHQSB1GG!",
"value_start": 25,
"value_end": 34,
"variable": "[email protected],pw",
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 2.625,
"entropy": 2.595488890170944,
"valid": false
}
}
Expand Down
24 changes: 0 additions & 24 deletions tests/data/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -2453,30 +2453,6 @@
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.65054,
"rule": "Password",
"severity": "medium",
"line_data_list": [
{
"line": "# FALSE id:[email protected],pw:ihqSbGg!",
"line_num": 101,
"path": "tests/samples/doc_id_pair_passwd_pair",
"info": "",
"value": "ihqSbGg!",
"value_start": 33,
"value_end": 41,
"variable": "[email protected],pw",
"entropy_validation": {
"iterator": "BASE64_CHARS",
"entropy": 2.625,
"valid": false
}
}
]
},
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "NOT_AVAILABLE",
Expand Down
3 changes: 2 additions & 1 deletion tests/samples/doc_id_pair_passwd_pair
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@ [email protected] mailto:{1} (password-ihqSb1Gg!) # skip
id: master pw:ihqSb1Gg!
id:[email protected],pw:ihqSb1Gg!

# FALSE id:[email protected],pw:ihqSbGg!
# FALSE
id:[email protected],pw:IHQSB1GG!
2 changes: 1 addition & 1 deletion tests/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_id_pair_passwd_pair_p(self) -> None:
content_provider: FilesProvider = TextProvider([SAMPLES_PATH / "doc_id_pair_passwd_pair"])
self.cred_sweeper.run(content_provider=content_provider)
found_credentials = self.cred_sweeper.credential_manager.get_credentials()
self.assertEqual(157, len(found_credentials), found_credentials)
self.assertEqual(156, len(found_credentials), found_credentials)

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

Expand Down

0 comments on commit adca91e

Please sign in to comment.