diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 50ae0195e..bcf3e425d 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -45,7 +45,7 @@ severity: medium type: pattern values: - - (^|(?P(?i:\bip[\s/]+id[\s/]+pw[\s/:]*))|(?P://)|\s)(?P[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2})((?P\s*\()?\s*|(?(variable)[\s,/]+|\s*(?(url)[,]|[,/])\s*))[\w.-]{3,}[\s,/]+(?P(?(lpar)[^)\s/]{4,}|(?(url)[^\s/]{4,}|[^\s]{4,}))) + - (^|(?P(?i:\bip[\s/]+id[\s/]+pw[\s/:]*))|(?://)|\s)(?P[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2})((?P\s*(\w+\s+)?\()?\s*|(?(variable)[\s,/]+|\s*[,/])\s*)[\w.-]{3,}[\s,/]+(?P(?(lpar)[^)\s]{4,}|[^\s/]{4,}))(?:\s|[^/]|$) filter_type: - ValueAllowlistCheck - ValuePatternCheck diff --git a/tests/data/doc.json b/tests/data/doc.json index c99f81185..7e5727f9c 100644 --- a/tests/data/doc.json +++ b/tests/data/doc.json @@ -8186,13 +8186,13 @@ "line_num": 14, "path": "tests/samples/doc_various", "info": "tests/samples/doc_various|RAW", - "value": "(master/IhqSb1Gg)", - "value_start": 17, - "value_end": 34, + "value": "IhqSb1Gg", + "value_start": 25, + "value_end": 33, "variable": null, "entropy_validation": { "iterator": "BASE64_CHARS", - "entropy": 3.606584859926771, + "entropy": 3.0, "valid": false } } @@ -8750,13 +8750,13 @@ "line_num": 48, "path": "tests/samples/doc_various", "info": "tests/samples/doc_various|RAW", - "value": "IhqSb1Gg,master", + "value": "IhqSb1Gg,master/IhqSb1Gg", "value_start": 19, - "value_end": 34, + "value_end": 43, "variable": null, "entropy_validation": { "iterator": "BASE64_CHARS", - "entropy": 3.64643122256795, + "entropy": 3.727255729857775, "valid": false } } diff --git a/tests/samples/doc_ip_id_password_triple b/tests/samples/doc_ip_id_password_triple index 30ed935d7..174169f52 100644 --- a/tests/samples/doc_ip_id_password_triple +++ b/tests/samples/doc_ip_id_password_triple @@ -4,3 +4,6 @@ IP ID PW 192.168.0.1 master IhqSb1Gg IP/ID/PW 192.168.0.1/master/IhqSb1Gg + +# FALSE +

sirius 192.168.0.1/mnt/user/USBx/\\[Root_Test\\]UseCase/12345678/76125-733_FFB_2038_judgement_day6_238811_6524.apk