Skip to content

Commit

Permalink
testfix
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Jul 12, 2024
1 parent 643dc1c commit a9cf4cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/data/depth_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -7610,7 +7610,7 @@
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.78,
"ml_probability": 0.756,
"rule": "Github Old Token",
"severity": "high",
"confidence": "moderate",
Expand All @@ -7637,7 +7637,7 @@
{
"api_validation": "NOT_AVAILABLE",
"ml_validation": "VALIDATED_KEY",
"ml_probability": 0.78,
"ml_probability": 0.756,
"rule": "Token",
"severity": "medium",
"confidence": "moderate",
Expand All @@ -7650,8 +7650,8 @@
"value": "gireogicracklecrackle1231567190113413981",
"value_start": 15,
"value_end": 55,
"variable": "ngit_token",
"variable_start": 1,
"variable": "git_token",
"variable_start": 2,
"variable_end": 11,
"entropy_validation": {
"iterator": "BASE36_CHARS",
Expand Down
6 changes: 4 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,16 @@ def test_param_n(self) -> None:
cred_sweeper = CredSweeper()
cred_sweeper.run(content_provider=content_provider)
creds = cred_sweeper.credential_manager.get_credentials()
self.assertFalse(len(creds), [x.to_json() for x in creds])
self.assertEqual(0, len(creds), [x.to_json(False, False) for x in creds])

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

def test_param_p(self) -> None:
# internal parametrized tests for quick debug
items = [ #
("log.txt", b'json\\nAuthorization: Basic jfhlksadjiu9813ryiuhdfskadjlkjh34\\n\\u003c/code\\u003e\\u003c/pre\\u003e"',
("slt.py", b'\\t\\tsalt = "\\x187bhgerjhqw\\n iKa\\tW_R~0/8"', "salt", "\\x187bhgerjhqw\\n iKa\\tW_R~0/8"),
("log.txt",
b'json\\nAuthorization: Basic jfhlksadjiu9813ryiuhdfskadjlkjh34\\n\\u003c/code\\u003e\\u003c/pre\\u003e"',
"Authorization", "jfhlksadjiu9813ryiuhdfskadjlkjh34"),
("pwd.py", b'password = "ji3_8iKgaW_R~0/8"', "password", "ji3_8iKgaW_R~0/8"),
("pwd.py", b'password = "/_tcTz<D8sWXsW<E"', "password", "/_tcTz<D8sWXsW<E"),
Expand Down

0 comments on commit a9cf4cc

Please sign in to comment.