From 2deecf75928b68d292a00418485890d20af4ba47 Mon Sep 17 00:00:00 2001 From: Roman Babenko Date: Thu, 20 Jul 2023 11:24:48 +0300 Subject: [PATCH] Fixes "URL Credentials" (#385) * Update requirements versions * update rule: URL Credentials * avoid whitespaces only * fix versions of numpy and scipy for python 3.8 --- credsweeper/rules/config.yaml | 4 ++-- requirements.txt | 16 +++++++++------- tests/samples/url_cred | 3 ++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/credsweeper/rules/config.yaml b/credsweeper/rules/config.yaml index 7277f0f67..a26aca165 100644 --- a/credsweeper/rules/config.yaml +++ b/credsweeper/rules/config.yaml @@ -385,11 +385,11 @@ severity: high type: pattern values: - - //[^:]+(?P:)(?P[^@]+)@ + - ://[^:\s]+(?P:)(?P[^@\s]+)@ filter_type: UrlCredentialsGroup use_ml: true required_substrings: - - // + - :// min_line_len: 10 doc_available: false diff --git a/requirements.txt b/requirements.txt index c6c7f89df..2148ac3e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,25 @@ # Common requirements beautifulsoup4==4.12.2 -GitPython==3.1.31 +GitPython==3.1.32 google-auth-oauthlib==1.0.0 humanfriendly==10.0 -lxml==4.9.2 +lxml==4.9.3 oauthlib==3.2.2 openpyxl==3.1.2 -pandas==2.0.2 -PyYAML==6.0 +pandas==2.0.3 +PyYAML==6.0.1 requests==2.31.0 -typing_extensions==4.6.3 +typing_extensions==4.7.1 whatthepatch==1.0.5 pdfminer.six==20221105 password-strength==0.0.3.post2 # ML requirements -numpy==1.24.3 -scikit-learn==1.2.2 +numpy==1.24.4 +# ^ the version supports python 3.8-3.11 +scikit-learn==1.3.0 scipy==1.10.1 +# ^ the version supports python 3.8 onnxruntime==1.15.1 # setup.py requirement diff --git a/tests/samples/url_cred b/tests/samples/url_cred index ad06346c4..409b152ea 100644 --- a/tests/samples/url_cred +++ b/tests/samples/url_cred @@ -1 +1,2 @@ -mysql://root:root@localhost:3306/main \ No newline at end of file +mysql://root:root@localhost:3306/main +// note:dummyuser@example.com