Skip to content

Commit

Permalink
GR1348941 prefix sample
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Oct 18, 2024
1 parent d12d9e9 commit 78759b3
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions tests/data/depth_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 27 additions & 0 deletions tests/data/doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 27 additions & 0 deletions tests/data/ml_threshold.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 27 additions & 0 deletions tests/data/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 78759b3

Please sign in to comment.