diff --git a/tests/__init__.py b/tests/__init__.py index 892587270..b3fedfab4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -7,14 +7,14 @@ NEGLIGIBLE_ML_THRESHOLD = 0.0001 # credentials count after scan -SAMPLES_CRED_COUNT: int = 406 -SAMPLES_CRED_LINE_COUNT: int = 424 +SAMPLES_CRED_COUNT: int = 407 +SAMPLES_CRED_LINE_COUNT: int = 425 # credentials count after post-processing -SAMPLES_POST_CRED_COUNT: int = 363 +SAMPLES_POST_CRED_COUNT: int = 364 # with option --doc -SAMPLES_IN_DOC = 439 +SAMPLES_IN_DOC = 440 # archived credentials that are not found without --depth SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 23 diff --git a/tests/data/depth_3.json b/tests/data/depth_3.json index d543bc368..ec90d3855 100644 --- a/tests/data/depth_3.json +++ b/tests/data/depth_3.json @@ -7327,6 +7327,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Gitlab Prefix Token", + "severity": "high", + "confidence": "strong", + "line_data_list": [ + { + "line": "GR1348941jG6xeSsmN8DFVKoyBYu2 # Runner registration token", + "line_num": 17, + "path": "./tests/samples/gitlab_prefix_token", + "info": "./tests/samples/gitlab_prefix_token|RAW", + "value": "GR1348941jG6xeSsmN8DFVKoyBYu2", + "value_start": 0, + "value_end": 29, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE64_CHARS", + "entropy": 4.582118926162056, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", diff --git a/tests/data/doc.json b/tests/data/doc.json index 3373c9c57..abd7f1ccd 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -11564,6 +11564,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Gitlab Prefix Token", + "severity": "high", + "confidence": "strong", + "line_data_list": [ + { + "line": "GR1348941jG6xeSsmN8DFVKoyBYu2 # Runner registration token", + "line_num": 17, + "path": "./tests/samples/gitlab_prefix_token", + "info": "./tests/samples/gitlab_prefix_token|RAW", + "value": "GR1348941jG6xeSsmN8DFVKoyBYu2", + "value_start": 0, + "value_end": 29, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE64_CHARS", + "entropy": 4.582118926162056, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", diff --git a/tests/data/ml_threshold.json b/tests/data/ml_threshold.json index 4f4342e14..96bd31aa4 100644 --- a/tests/data/ml_threshold.json +++ b/tests/data/ml_threshold.json @@ -8123,6 +8123,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Gitlab Prefix Token", + "severity": "high", + "confidence": "strong", + "line_data_list": [ + { + "line": "965ae82e6c3df915b63c563d681940fd8c162830c7b4d7ce9f37c2887eebfef8", + "line_num": 17, + "path": "./tests/samples/gitlab_prefix_token", + "info": "", + "value": "3126874004a349f2e716532973ff72cc99d96842402387b8c950726af328206a", + "value_start": 0, + "value_end": 29, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE64_CHARS", + "entropy": 4.582118926162056, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", diff --git a/tests/data/output.json b/tests/data/output.json index dd6cf380c..f13400ebb 100644 --- a/tests/data/output.json +++ b/tests/data/output.json @@ -7070,6 +7070,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Gitlab Prefix Token", + "severity": "high", + "confidence": "strong", + "line_data_list": [ + { + "line": "GR1348941jG6xeSsmN8DFVKoyBYu2 # Runner registration token", + "line_num": 17, + "path": "./tests/samples/gitlab_prefix_token", + "info": "", + "value": "GR1348941jG6xeSsmN8DFVKoyBYu2", + "value_start": 0, + "value_end": 29, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE64_CHARS", + "entropy": 4.582118926162056, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE",