From e2a48c53f266910d1f4ab4348eb5bdf31433abd1 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 09:25:56 +0200 Subject: [PATCH 01/10] Tencent WeChat API App ID --- credsweeper/rules/config.yaml | 15 +++++++ tests/__init__.py | 10 ++--- tests/data/depth_3.json | 81 +++++++++++++++++++++++++++++++++++ tests/data/doc.json | 81 +++++++++++++++++++++++++++++++++++ tests/data/ml_threshold.json | 81 +++++++++++++++++++++++++++++++++++ tests/data/output.json | 81 +++++++++++++++++++++++++++++++++++ tests/samples/wechat_f | 3 ++ tests/samples/wechat_p | 3 ++ 8 files changed, 350 insertions(+), 5 deletions(-) create mode 100644 tests/samples/wechat_f create mode 100644 tests/samples/wechat_p diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 02045e456..7ac57b526 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -1337,3 +1337,18 @@ target: - code - doc + +- name: Tencent WeChat API App ID + severity: medium + confidence: weak + type: pattern + values: + - (?wx[0-9a-f]{16})(?![0-9A-Za-z_-]) + min_line_len: 18 + filter_type: + - ValuePatternCheck + required_substrings: + - wx + target: + - code + - doc diff --git a/tests/__init__.py b/tests/__init__.py index 8d4df307e..d2fa7e181 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,20 +1,20 @@ from pathlib import Path # total number of files in test samples -SAMPLES_FILES_COUNT: int = 137 +SAMPLES_FILES_COUNT: int = 139 # the lowest value of ML threshold is used to display possible lowest values NEGLIGIBLE_ML_THRESHOLD = 0.0001 # credentials count after scan -SAMPLES_CRED_COUNT: int = 407 -SAMPLES_CRED_LINE_COUNT: int = 425 +SAMPLES_CRED_COUNT: int = 410 +SAMPLES_CRED_LINE_COUNT: int = 428 # credentials count after post-processing -SAMPLES_POST_CRED_COUNT: int = 364 +SAMPLES_POST_CRED_COUNT: int = 367 # with option --doc -SAMPLES_IN_DOC = 443 +SAMPLES_IN_DOC = 446 # archived credentials that are not found without --depth SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 30 diff --git a/tests/data/depth_3.json b/tests/data/depth_3.json index 215662451..e365faebf 100644 --- a/tests/data/depth_3.json +++ b/tests/data/depth_3.json @@ -13194,6 +13194,87 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wxe191bc54fc7d529a", + "line_num": 1, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wxe191bc54fc7d529a", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.725480556997868, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx2274a335e18222d6", + "line_num": 2, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wx2274a335e18222d6", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.4138338639736006, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx4d82d07e3eb5ba84", + "line_num": 3, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wx4d82d07e3eb5ba84", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.614369445886757, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "VALIDATED_KEY", diff --git a/tests/data/doc.json b/tests/data/doc.json index c9094df05..8dbb9fe81 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -13844,6 +13844,87 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wxe191bc54fc7d529a", + "line_num": 1, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wxe191bc54fc7d529a", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.725480556997868, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx2274a335e18222d6", + "line_num": 2, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wx2274a335e18222d6", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.4138338639736006, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx4d82d07e3eb5ba84", + "line_num": 3, + "path": "./tests/samples/wechat_p", + "info": "./tests/samples/wechat_p|RAW", + "value": "wx4d82d07e3eb5ba84", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.614369445886757, + "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 96bd31aa4..7a6f3e2e1 100644 --- a/tests/data/ml_threshold.json +++ b/tests/data/ml_threshold.json @@ -11159,6 +11159,87 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "30fe6a5c4e4669597b255d6b09201ea9d23dae6e96d27ab8bfeb19f1cd683a5d", + "line_num": 1, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "30fe6a5c4e4669597b255d6b09201ea9d23dae6e96d27ab8bfeb19f1cd683a5d", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.725480556997868, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "459679251cfe8d0f15a79b601a659756a62ceca7252fdf0f01a42fb1ee4f298a", + "line_num": 2, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "459679251cfe8d0f15a79b601a659756a62ceca7252fdf0f01a42fb1ee4f298a", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.4138338639736006, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "0a3524a16f9c2dcaf3310ff08fc999a9579c9a6e0cfe6f44d4da9747db5d1f86", + "line_num": 3, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "0a3524a16f9c2dcaf3310ff08fc999a9579c9a6e0cfe6f44d4da9747db5d1f86", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.614369445886757, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", diff --git a/tests/data/output.json b/tests/data/output.json index f13400ebb..fcb92d2c8 100644 --- a/tests/data/output.json +++ b/tests/data/output.json @@ -10025,6 +10025,87 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wxe191bc54fc7d529a", + "line_num": 1, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "wxe191bc54fc7d529a", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.725480556997868, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx2274a335e18222d6", + "line_num": 2, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "wx2274a335e18222d6", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.4138338639736006, + "valid": true + } + } + ] + }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Tencent WeChat API App ID", + "severity": "medium", + "confidence": "weak", + "line_data_list": [ + { + "line": "wx4d82d07e3eb5ba84", + "line_num": 3, + "path": "./tests/samples/wechat_p", + "info": "", + "value": "wx4d82d07e3eb5ba84", + "value_start": 0, + "value_end": 18, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.614369445886757, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", diff --git a/tests/samples/wechat_f b/tests/samples/wechat_f new file mode 100644 index 000000000..340439a9c --- /dev/null +++ b/tests/samples/wechat_f @@ -0,0 +1,3 @@ +wxb508f3849c445432 +wxabcdf3849c445432 +wxabcdf3849c440000 diff --git a/tests/samples/wechat_p b/tests/samples/wechat_p new file mode 100644 index 000000000..15bc81019 --- /dev/null +++ b/tests/samples/wechat_p @@ -0,0 +1,3 @@ +wxe191bc54fc7d529a +wx2274a335e18222d6 +wx4d82d07e3eb5ba84 From b46cc874ef3383fc861d98bae209b8a1c1d88ac5 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 13:29:51 +0200 Subject: [PATCH 02/10] twilio credentials --- credsweeper/rules/config.yaml | 5 ++-- tests/__init__.py | 10 ++++---- tests/data/depth_3.json | 39 +++++++++++++++++++++++++----- tests/data/doc.json | 39 +++++++++++++++++++++++++----- tests/data/ml_threshold.json | 37 ++++++++++++++++++++++++---- tests/data/output.json | 37 ++++++++++++++++++++++++---- tests/rules/test_twilio_key.py | 16 ------------ tests/samples/twilio_credentials_n | 2 ++ tests/samples/twilio_credentials_p | 2 ++ tests/samples/twilio_key.template | 1 - 10 files changed, 142 insertions(+), 46 deletions(-) delete mode 100644 tests/rules/test_twilio_key.py create mode 100644 tests/samples/twilio_credentials_n create mode 100644 tests/samples/twilio_credentials_p delete mode 100644 tests/samples/twilio_key.template diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 02045e456..9881c02c2 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -644,14 +644,15 @@ target: - code -- name: Twilio API Key +- name: Twilio Credentials severity: high confidence: moderate type: pattern values: - - (?SK[0-9A-Fa-f]{32})(?![0-9A-Za-z_-]) + - (?(AC|SK)[0-9A-Fa-f]{32})(?![0-9A-Za-z_-]) filter_type: GeneralPattern required_substrings: + - AC - SK min_line_len: 34 target: diff --git a/tests/__init__.py b/tests/__init__.py index 8d4df307e..2a21adee5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,20 +1,20 @@ from pathlib import Path # total number of files in test samples -SAMPLES_FILES_COUNT: int = 137 +SAMPLES_FILES_COUNT: int = 138 # the lowest value of ML threshold is used to display possible lowest values NEGLIGIBLE_ML_THRESHOLD = 0.0001 # credentials count after scan -SAMPLES_CRED_COUNT: int = 407 -SAMPLES_CRED_LINE_COUNT: int = 425 +SAMPLES_CRED_COUNT: int = 408 +SAMPLES_CRED_LINE_COUNT: int = 426 # credentials count after post-processing -SAMPLES_POST_CRED_COUNT: int = 364 +SAMPLES_POST_CRED_COUNT: int = 365 # with option --doc -SAMPLES_IN_DOC = 443 +SAMPLES_IN_DOC = 444 # archived credentials that are not found without --depth SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 30 diff --git a/tests/data/depth_3.json b/tests/data/depth_3.json index 215662451..05ead9d5f 100644 --- a/tests/data/depth_3.json +++ b/tests/data/depth_3.json @@ -12955,18 +12955,18 @@ "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", "ml_probability": null, - "rule": "Twilio API Key", + "rule": "Twilio Credentials", "severity": "high", "confidence": "moderate", "line_data_list": [ { - "line": " \"mk\" : \"SK4D2F64E2A108CD72F648B1984C3B5A13\",", + "line": "SK4D2F64E2A108CD72F648B1984C3B5A13", "line_num": 1, - "path": "./tests/samples/twilio_key.template", - "info": "./tests/samples/twilio_key.template|RAW", + "path": "./tests/samples/twilio_credentials_p", + "info": "./tests/samples/twilio_credentials_p|RAW", "value": "SK4D2F64E2A108CD72F648B1984C3B5A13", - "value_start": 12, - "value_end": 46, + "value_start": 0, + "value_end": 34, "variable": null, "variable_start": -2, "variable_end": -2, @@ -12978,6 +12978,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Twilio Credentials", + "severity": "high", + "confidence": "moderate", + "line_data_list": [ + { + "line": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "line_num": 2, + "path": "./tests/samples/twilio_credentials_p", + "info": "./tests/samples/twilio_credentials_p|RAW", + "value": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "value_start": 0, + "value_end": 34, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.7215926003976607, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "VALIDATED_KEY", diff --git a/tests/data/doc.json b/tests/data/doc.json index c9094df05..5a3922364 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -13794,18 +13794,18 @@ "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", "ml_probability": null, - "rule": "Twilio API Key", + "rule": "Twilio Credentials", "severity": "high", "confidence": "moderate", "line_data_list": [ { - "line": "\"mk\" : \"SK4D2F64E2A108CD72F648B1984C3B5A13\",", + "line": "SK4D2F64E2A108CD72F648B1984C3B5A13", "line_num": 1, - "path": "./tests/samples/twilio_key.template", - "info": "./tests/samples/twilio_key.template|RAW", + "path": "./tests/samples/twilio_credentials_p", + "info": "./tests/samples/twilio_credentials_p|RAW", "value": "SK4D2F64E2A108CD72F648B1984C3B5A13", - "value_start": 12, - "value_end": 46, + "value_start": 0, + "value_end": 34, "variable": null, "variable_start": -2, "variable_end": -2, @@ -13817,6 +13817,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Twilio Credentials", + "severity": "high", + "confidence": "moderate", + "line_data_list": [ + { + "line": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "line_num": 2, + "path": "./tests/samples/twilio_credentials_p", + "info": "./tests/samples/twilio_credentials_p|RAW", + "value": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "value_start": 0, + "value_end": 34, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.7215926003976607, + "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 96bd31aa4..c6ec09216 100644 --- a/tests/data/ml_threshold.json +++ b/tests/data/ml_threshold.json @@ -10920,18 +10920,18 @@ "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", "ml_probability": null, - "rule": "Twilio API Key", + "rule": "Twilio Credentials", "severity": "high", "confidence": "moderate", "line_data_list": [ { - "line": "f2e6bca350950cdcde32e308cfe8364d4191dd2eec8c71a8aef673bdb2fd9158", + "line": "579d9ef4c0aae3cbc1384ca9cd7800e4b0b686607b84121f3584f00e08950f49", "line_num": 1, - "path": "./tests/samples/twilio_key.template", + "path": "./tests/samples/twilio_credentials_p", "info": "", "value": "579d9ef4c0aae3cbc1384ca9cd7800e4b0b686607b84121f3584f00e08950f49", - "value_start": 12, - "value_end": 46, + "value_start": 0, + "value_end": 34, "variable": null, "variable_start": -2, "variable_end": -2, @@ -10943,6 +10943,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Twilio Credentials", + "severity": "high", + "confidence": "moderate", + "line_data_list": [ + { + "line": "40f36c54d27048b59e0a4f5cd72565bfa8b370b1544ebfd403b8768eb4f4063f", + "line_num": 2, + "path": "./tests/samples/twilio_credentials_p", + "info": "", + "value": "40f36c54d27048b59e0a4f5cd72565bfa8b370b1544ebfd403b8768eb4f4063f", + "value_start": 0, + "value_end": 34, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.7215926003976607, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "VALIDATED_KEY", diff --git a/tests/data/output.json b/tests/data/output.json index f13400ebb..f890b495a 100644 --- a/tests/data/output.json +++ b/tests/data/output.json @@ -9786,18 +9786,18 @@ "api_validation": "NOT_AVAILABLE", "ml_validation": "NOT_AVAILABLE", "ml_probability": null, - "rule": "Twilio API Key", + "rule": "Twilio Credentials", "severity": "high", "confidence": "moderate", "line_data_list": [ { - "line": " \"mk\" : \"SK4D2F64E2A108CD72F648B1984C3B5A13\",", + "line": "SK4D2F64E2A108CD72F648B1984C3B5A13", "line_num": 1, - "path": "./tests/samples/twilio_key.template", + "path": "./tests/samples/twilio_credentials_p", "info": "", "value": "SK4D2F64E2A108CD72F648B1984C3B5A13", - "value_start": 12, - "value_end": 46, + "value_start": 0, + "value_end": 34, "variable": null, "variable_start": -2, "variable_end": -2, @@ -9809,6 +9809,33 @@ } ] }, + { + "api_validation": "NOT_AVAILABLE", + "ml_validation": "NOT_AVAILABLE", + "ml_probability": null, + "rule": "Twilio Credentials", + "severity": "high", + "confidence": "moderate", + "line_data_list": [ + { + "line": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "line_num": 2, + "path": "./tests/samples/twilio_credentials_p", + "info": "", + "value": "AC4d2f64e2a108cd72f648b1984c3b5a13", + "value_start": 0, + "value_end": 34, + "variable": null, + "variable_start": -2, + "variable_end": -2, + "entropy_validation": { + "iterator": "BASE36_CHARS", + "entropy": 3.7215926003976607, + "valid": true + } + } + ] + }, { "api_validation": "NOT_AVAILABLE", "ml_validation": "VALIDATED_KEY", diff --git a/tests/rules/test_twilio_key.py b/tests/rules/test_twilio_key.py deleted file mode 100644 index 6fa6d3a06..000000000 --- a/tests/rules/test_twilio_key.py +++ /dev/null @@ -1,16 +0,0 @@ -from typing import List - -import pytest - -from .common import BaseTestRule - - -class TestTwilioKey(BaseTestRule): - - @pytest.fixture(params=[["SKABCAEFabcaeaABADEAabadea12145178"]]) - def lines(self, request) -> List[str]: - return request.param - - @pytest.fixture - def rule_name(self) -> str: - return "Twilio API Key" diff --git a/tests/samples/twilio_credentials_n b/tests/samples/twilio_credentials_n new file mode 100644 index 000000000..17e222f38 --- /dev/null +++ b/tests/samples/twilio_credentials_n @@ -0,0 +1,2 @@ +QpQcm9jLVR5cGU6IDQsRU5DU/SK4D2F64E2A108CD72F648Bx984C3B5A13+FSy1JbmZvOiBBRVMtMTI +AC123456E2A108CD72F648B1984C3B5A13 diff --git a/tests/samples/twilio_credentials_p b/tests/samples/twilio_credentials_p new file mode 100644 index 000000000..f0342b318 --- /dev/null +++ b/tests/samples/twilio_credentials_p @@ -0,0 +1,2 @@ +SK4D2F64E2A108CD72F648B1984C3B5A13 +AC4d2f64e2a108cd72f648b1984c3b5a13 diff --git a/tests/samples/twilio_key.template b/tests/samples/twilio_key.template deleted file mode 100644 index 936149ece..000000000 --- a/tests/samples/twilio_key.template +++ /dev/null @@ -1 +0,0 @@ - "mk" : "SK4D2F64E2A108CD72F648B1984C3B5A13", \ No newline at end of file From a2a3857be3b08dd90a6941e6e1585ba6594984e0 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 15:37:13 +0200 Subject: [PATCH 03/10] [skip actions] [twilio] 2024-11-06T15:37:13+02:00 --- credsweeper/rules/config.yaml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 9881c02c2..5e2b69f1b 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -645,15 +645,38 @@ - code - name: Twilio Credentials - severity: high + severity: critical confidence: moderate type: pattern values: - - (?(AC|SK)[0-9A-Fa-f]{32})(?![0-9A-Za-z_-]) + - (?(AC|AD|AL|CA|CF|CL|CN|CR|FW|IP|KS|MM|NO|PK|PN|QU|RE|SC|SD|SK|SM|TR|UT|XE|XR)[0-9A-Fa-f]{32})(?![0-9A-Za-z_-]) filter_type: GeneralPattern required_substrings: - AC + - AD + - AL + - CA + - CF + - CL + - CN + - CR + - FW + - IP + - KS + - MM + - "NO" + - PK + - PN + - QU + - RE + - SC + - SD - SK + - SM + - TR + - UT + - XE + - XR min_line_len: 34 target: - code From 45d1b22e9122d5e686ba17ff4a6f08ec4128baaf Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 16:26:58 +0200 Subject: [PATCH 04/10] TokenPattern --- credsweeper/common/morpheme_checklist.txt | 1 + credsweeper/rules/config.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/credsweeper/common/morpheme_checklist.txt b/credsweeper/common/morpheme_checklist.txt index 1287b531f..0cea17b7a 100644 --- a/credsweeper/common/morpheme_checklist.txt +++ b/credsweeper/common/morpheme_checklist.txt @@ -210,6 +210,7 @@ batt beac beans beat +beef begin behav behind diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 5e2b69f1b..c6a17885f 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -650,7 +650,7 @@ type: pattern values: - (?(AC|AD|AL|CA|CF|CL|CN|CR|FW|IP|KS|MM|NO|PK|PN|QU|RE|SC|SD|SK|SM|TR|UT|XE|XR)[0-9A-Fa-f]{32})(?![0-9A-Za-z_-]) - filter_type: GeneralPattern + filter_type: TokenPattern required_substrings: - AC - AD From ec8a20f5c907d0a6b035d0b5a1b9c9c129571fa2 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 16:39:13 +0200 Subject: [PATCH 05/10] custom BM --- .github/workflows/benchmark.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2b5eec52f..5ce800437 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -30,7 +30,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: Samsung/CredData + repository: babenek/CredData + ref: twillio - name: Markup hashing run: | @@ -85,7 +86,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: Samsung/CredData + repository: babenek/CredData + ref: twillio - name: Markup hashing run: | @@ -187,7 +189,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: Samsung/CredData + repository: babenek/CredData + ref: twillio - name: Markup hashing run: | @@ -374,7 +377,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: Samsung/CredData + repository: babenek/CredData + ref: twillio - name: Markup hashing run: | From 7e5c447060ed898a6ae2778e164b47bfd5639a8f Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Wed, 6 Nov 2024 17:40:42 +0200 Subject: [PATCH 06/10] fix --- .ci/benchmark.txt | 31 ++++++++++++++++--------------- tests/data/depth_3.json | 4 ++-- tests/data/doc.json | 4 ++-- tests/data/ml_threshold.json | 4 ++-- tests/data/output.json | 4 ++-- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.ci/benchmark.txt b/.ci/benchmark.txt index dd949166c..a23382aa9 100644 --- a/.ci/benchmark.txt +++ b/.ci/benchmark.txt @@ -1,6 +1,6 @@ -META MD5 f019321883fa9315afcd43fa085b5bf9 -DATA MD5 de85ea0a77bd333be6a0d8422b835df4 -DATA: 16344639 interested lines. MARKUP: 62823 items +META MD5 72b4b7db8a2ffef0f19e802c09032e14 +DATA MD5 abd9c025d5c323af814fbeb33f469c90 +DATA: 16342283 interested lines. MARKUP: 62020 items FileType FileNumber ValidLines Positives Negatives Templates --------------- ------------ ------------ ----------- ----------- ----------- 194 28318 71 418 90 @@ -55,7 +55,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .erb 13 323 27 .erl 4 96 7 .ex 25 4968 5 98 5 -.example 17 1838 76 38 52 +.example 17 1838 77 38 52 .exs 24 4842 8 187 4 .ext 5 211 1 4 2 .fsproj 1 75 1 2 @@ -113,7 +113,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .markdown 3 139 3 1 .markerb 3 12 3 .marko 1 21 2 -.md 674 149300 740 2388 621 +.md 674 149300 741 2388 621 .mdx 3 549 7 .mjml 1 18 1 .mjs 22 4424 75 340 @@ -135,7 +135,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .patch 4 109405 4 27 .pbxproj 1 941 2 .pem 48 1169 47 8 -.php 371 75710 128 1622 79 +.php 371 75710 130 1622 79 .pl 16 14727 7 33 .pm 3 744 7 .po 3 2994 15 @@ -153,13 +153,13 @@ FileType FileNumber ValidLines Positives Negatives Templat .pug 2 193 2 .purs 1 69 4 .pxd 1 150 5 2 -.py 890 291553 679 3303 726 +.py 890 291553 681 3303 726 .pyi 4 1361 9 .pyp 1 167 1 .pyx 2 1094 23 .r 4 62 6 3 1 .rake 2 51 2 -.rb 860 131838 254 3340 615 +.rb 838 129482 281 2529 613 .re 1 31 1 .red 1 159 1 .release 1 13 4 @@ -172,7 +172,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .rs 31 9855 2 234 11 .rsc 1 691 1 .rsp 16 7101 20 10 27 -.rst 86 33980 70 323 68 +.rst 86 33980 71 323 68 .rules 1 6 2 .sample 2 25 3 4 4 .sbt 3 570 5 2 @@ -222,8 +222,8 @@ FileType FileNumber ValidLines Positives Negatives Templat .yml 419 36169 559 889 376 .zsh 6 872 12 .zsh-theme 1 97 1 -TOTAL: 10254 16344639 12221 50501 5104 -credsweeper result_cnt : 11487, lost_cnt : 0, true_cnt : 11308, false_cnt : 179 +TOTAL: 10232 16342283 12255 49690 5102 +credsweeper result_cnt : 11515, lost_cnt : 0, true_cnt : 11336, false_cnt : 179 Rules Positives Negatives Templates Reported TP FP TN FN FPR FNR ACC PRC RCL F1 ------------------------------ ----------- ----------- ----------- ---------- ----- ---- ----- ---- -------- -------- -------- -------- -------- -------- API 130 3166 188 125 123 2 3352 7 0.000596 0.053846 0.997417 0.984000 0.946154 0.964706 @@ -242,7 +242,7 @@ CMD Password 21 128 6 1 CMD Secret 1 1 0 1 1 0 1 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 CMD Token 6 0 0 6 6 0 0 0 0.000000 1.000000 1.000000 1.000000 1.000000 Certificate 24 471 0 20 20 0 471 4 0.000000 0.166667 0.991919 1.000000 0.833333 0.909091 -Credential 93 419 76 94 93 1 494 0 0.002020 0.000000 0.998299 0.989362 1.000000 0.994652 +Credential 91 421 76 92 91 1 496 0 0.002012 0.000000 0.998299 0.989130 1.000000 0.994536 Docker Swarm Token 2 0 0 1 1 0 0 1 0.500000 0.500000 1.000000 0.500000 0.666667 Dropbox App secret 64 139 1 46 35 10 130 29 0.071429 0.453125 0.808824 0.777778 0.546875 0.642202 Facebook Access Token 0 1 0 0 0 1 0 0.000000 1.000000 @@ -259,15 +259,16 @@ Jira / Confluence PAT token 0 4 0 Jira 2FA 15 6 1 12 12 0 7 3 0.000000 0.200000 0.863636 1.000000 0.800000 0.888889 Key 3909 15717 485 3944 3893 51 16151 16 0.003148 0.004093 0.996668 0.987069 0.995907 0.991468 Nonce 91 49 0 89 88 1 48 3 0.020408 0.032967 0.971429 0.988764 0.967033 0.977778 -Other 8 8292 1 0 0 8293 8 0.000000 1.000000 0.999036 0.000000 +Other 8 7445 1 0 0 7446 8 0.000000 1.000000 0.998927 0.000000 PEM Private Key 1019 1483 0 1023 1019 4 1479 0 0.002697 0.000000 0.998401 0.996090 1.000000 0.998041 Password 1869 7535 2680 1776 1758 18 10197 111 0.001762 0.059390 0.989325 0.989865 0.940610 0.964609 Salt 47 76 1 44 44 0 77 3 0.000000 0.063830 0.975806 1.000000 0.936170 0.967033 Secret 1297 1576 802 1288 1283 5 2373 14 0.002103 0.010794 0.994830 0.996118 0.989206 0.992650 Seed 1 6 0 0 0 6 1 0.000000 1.000000 0.857143 0.000000 Slack Token 4 1 0 4 4 0 1 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 +Tencent WeChat API App ID 6 0 0 0 0 0 6 1.000000 0.000000 0.000000 Token 643 4170 454 616 614 2 4622 29 0.000433 0.045101 0.994114 0.996753 0.954899 0.975377 -Twilio API Key 0 5 2 0 0 7 0 0.000000 1.000000 +Twilio Credentials 30 39 0 30 30 0 39 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 URL Credentials 210 156 216 205 205 0 372 5 0.000000 0.023810 0.991409 1.000000 0.976190 0.987952 UUID 1069 265 0 1068 1067 1 264 2 0.003774 0.001871 0.997751 0.999064 0.998129 0.998596 - 12221 50501 5104 11494 11308 179 50322 913 0.003544 0.074707 0.982590 0.984417 0.925293 0.953940 + 12255 49690 5102 11522 11336 179 49511 919 0.003602 0.074990 0.982275 0.984455 0.925010 0.953807 diff --git a/tests/data/depth_3.json b/tests/data/depth_3.json index 05ead9d5f..08358931c 100644 --- a/tests/data/depth_3.json +++ b/tests/data/depth_3.json @@ -12956,7 +12956,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { @@ -12983,7 +12983,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/doc.json b/tests/data/doc.json index 5a3922364..2373c3f46 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -13795,7 +13795,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { @@ -13822,7 +13822,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/ml_threshold.json b/tests/data/ml_threshold.json index c6ec09216..31c5efaec 100644 --- a/tests/data/ml_threshold.json +++ b/tests/data/ml_threshold.json @@ -10921,7 +10921,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { @@ -10948,7 +10948,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/output.json b/tests/data/output.json index f890b495a..bc1cd4a57 100644 --- a/tests/data/output.json +++ b/tests/data/output.json @@ -9787,7 +9787,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { @@ -9814,7 +9814,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "high", + "severity": "critical", "confidence": "moderate", "line_data_list": [ { From c7fe01c0b05d2537366a99dfbf0ed4940640ab42 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Fri, 8 Nov 2024 09:36:55 +0200 Subject: [PATCH 07/10] [no ci] Update credsweeper/rules/config.yaml --- credsweeper/rules/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index c9f78f139..4f593c1a6 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -645,7 +645,7 @@ - code - name: Twilio Credentials - severity: critical + severity: high confidence: moderate type: pattern values: From 91fe4cae39e0a20cda9122dbf9697b4b03236150 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Mon, 11 Nov 2024 11:33:47 +0200 Subject: [PATCH 08/10] Apply suggestions from code review --- .github/workflows/benchmark.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5ce800437..6d9eb4ce6 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -30,8 +30,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: babenek/CredData - ref: twillio + repository: Samsung/CredData + ref: main - name: Markup hashing run: | @@ -86,8 +86,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: babenek/CredData - ref: twillio + repository: Samsung/CredData + ref: main - name: Markup hashing run: | @@ -189,8 +189,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: babenek/CredData - ref: twillio + repository: Samsung/CredData + ref: main - name: Markup hashing run: | @@ -377,8 +377,8 @@ jobs: - name: Checkout CredData uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - repository: babenek/CredData - ref: twillio + repository: Samsung/CredData + ref: main - name: Markup hashing run: | From 2610d7de8fa9ec2e81099a80f07482850e968f7b Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Mon, 11 Nov 2024 11:51:48 +0200 Subject: [PATCH 09/10] BM scores fix --- .ci/benchmark.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.ci/benchmark.txt b/.ci/benchmark.txt index 42a83f0a4..b05a945cb 100644 --- a/.ci/benchmark.txt +++ b/.ci/benchmark.txt @@ -1,6 +1,6 @@ -META MD5 ef775241a6d575ff10f7220dcfadf5d7 -DATA MD5 51b6d4e4debbd374fc184f2b691e0bb8 -DATA: 16344639 interested lines. MARKUP: 62827 items +META MD5 72b4b7db8a2ffef0f19e802c09032e14 +DATA MD5 abd9c025d5c323af814fbeb33f469c90 +DATA: 16342283 interested lines. MARKUP: 62020 items FileType FileNumber ValidLines Positives Negatives Templates --------------- ------------ ------------ ----------- ----------- ----------- 194 28318 71 418 90 @@ -55,7 +55,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .erb 13 323 27 .erl 4 96 7 .ex 25 4968 5 98 5 -.example 17 1838 76 38 52 +.example 17 1838 77 38 52 .exs 24 4842 8 187 4 .ext 5 211 1 4 2 .fsproj 1 75 1 2 @@ -159,7 +159,7 @@ FileType FileNumber ValidLines Positives Negatives Templat .pyx 2 1094 23 .r 4 62 6 3 1 .rake 2 51 2 -.rb 860 131838 254 3340 615 +.rb 838 129482 281 2529 613 .re 1 31 1 .red 1 159 1 .release 1 13 4 @@ -222,8 +222,8 @@ FileType FileNumber ValidLines Positives Negatives Templat .yml 419 36169 559 889 376 .zsh 6 872 12 .zsh-theme 1 97 1 -TOTAL: 10254 16344639 12227 50501 5104 -credsweeper result_cnt : 11493, lost_cnt : 0, true_cnt : 11314, false_cnt : 179 +TOTAL: 10232 16342283 12255 49690 5102 +credsweeper result_cnt : 11521, lost_cnt : 0, true_cnt : 11342, false_cnt : 179 Rules Positives Negatives Templates Reported TP FP TN FN FPR FNR ACC PRC RCL F1 ------------------------------ ----------- ----------- ----------- ---------- ----- ---- ----- ---- -------- -------- -------- -------- -------- -------- API 130 3166 188 125 123 2 3352 7 0.000596 0.053846 0.997417 0.984000 0.946154 0.964706 @@ -242,7 +242,7 @@ CMD Password 21 128 6 1 CMD Secret 1 1 0 1 1 0 1 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 CMD Token 6 0 0 6 6 0 0 0 0.000000 1.000000 1.000000 1.000000 1.000000 Certificate 24 471 0 20 20 0 471 4 0.000000 0.166667 0.991919 1.000000 0.833333 0.909091 -Credential 93 419 76 94 93 1 494 0 0.002020 0.000000 0.998299 0.989362 1.000000 0.994652 +Credential 91 421 76 92 91 1 496 0 0.002012 0.000000 0.998299 0.989130 1.000000 0.994536 Docker Swarm Token 2 0 0 1 1 0 0 1 0.500000 0.500000 1.000000 0.500000 0.666667 Dropbox App secret 64 139 1 46 35 10 130 29 0.071429 0.453125 0.808824 0.777778 0.546875 0.642202 Facebook Access Token 0 1 0 0 0 1 0 0.000000 1.000000 @@ -259,7 +259,7 @@ Jira / Confluence PAT token 0 4 0 Jira 2FA 15 6 1 12 12 0 7 3 0.000000 0.200000 0.863636 1.000000 0.800000 0.888889 Key 3909 15717 485 3944 3893 51 16151 16 0.003148 0.004093 0.996668 0.987069 0.995907 0.991468 Nonce 91 49 0 89 88 1 48 3 0.020408 0.032967 0.971429 0.988764 0.967033 0.977778 -Other 8 8292 1 0 0 8293 8 0.000000 1.000000 0.999036 0.000000 +Other 8 7445 1 0 0 7446 8 0.000000 1.000000 0.998927 0.000000 PEM Private Key 1019 1483 0 1023 1019 4 1479 0 0.002697 0.000000 0.998401 0.996090 1.000000 0.998041 Password 1869 7535 2680 1776 1758 18 10197 111 0.001762 0.059390 0.989325 0.989865 0.940610 0.964609 Salt 47 76 1 44 44 0 77 3 0.000000 0.063830 0.975806 1.000000 0.936170 0.967033 @@ -268,7 +268,7 @@ Seed 1 6 0 Slack Token 4 1 0 4 4 0 1 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 Tencent WeChat API App ID 6 0 0 6 6 0 0 0 0.000000 1.000000 1.000000 1.000000 1.000000 Token 643 4170 454 616 614 2 4622 29 0.000433 0.045101 0.994114 0.996753 0.954899 0.975377 -Twilio API Key 0 5 2 0 0 7 0 0.000000 1.000000 +Twilio Credentials 30 39 0 30 30 0 39 0 0.000000 0.000000 1.000000 1.000000 1.000000 1.000000 URL Credentials 210 156 216 205 205 0 372 5 0.000000 0.023810 0.991409 1.000000 0.976190 0.987952 UUID 1069 265 0 1068 1067 1 264 2 0.003774 0.001871 0.997751 0.999064 0.998129 0.998596 - 12227 50501 5104 11500 11314 179 50322 913 0.003544 0.074671 0.982592 0.984425 0.925329 0.953963 + 12255 49690 5102 11528 11342 179 49511 913 0.003602 0.074500 0.982371 0.984463 0.925500 0.954071 From ead8a1ea846465aa9276bfb3a8fddef8f6f98fcc Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Mon, 11 Nov 2024 11:53:01 +0200 Subject: [PATCH 10/10] test data fix --- tests/data/depth_3.json | 4 ++-- tests/data/doc.json | 4 ++-- tests/data/ml_threshold.json | 4 ++-- tests/data/output.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/data/depth_3.json b/tests/data/depth_3.json index 035e851f0..b28039408 100644 --- a/tests/data/depth_3.json +++ b/tests/data/depth_3.json @@ -12956,7 +12956,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { @@ -12983,7 +12983,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/doc.json b/tests/data/doc.json index 4188940a6..06e86d4b1 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -13795,7 +13795,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { @@ -13822,7 +13822,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/ml_threshold.json b/tests/data/ml_threshold.json index cf4f4b331..5a53ef27d 100644 --- a/tests/data/ml_threshold.json +++ b/tests/data/ml_threshold.json @@ -10921,7 +10921,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { @@ -10948,7 +10948,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { diff --git a/tests/data/output.json b/tests/data/output.json index 663e5d0fd..9e83fc5dc 100644 --- a/tests/data/output.json +++ b/tests/data/output.json @@ -9787,7 +9787,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ { @@ -9814,7 +9814,7 @@ "ml_validation": "NOT_AVAILABLE", "ml_probability": null, "rule": "Twilio Credentials", - "severity": "critical", + "severity": "high", "confidence": "moderate", "line_data_list": [ {