Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YAML and JSON are scanned like structures (#236)
* Squashed commit of the following: commit 7b2feea Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 16 01:23:13 2022 +0200 Squashed commit of the following: commit 02768be Merge: 6faeb2c d7e44c7 Author: Roman Babenko <babenek@users.noreply.github.com> Date: Wed Nov 16 00:38:37 2022 +0200 Merge branch 'main' into structures commit d7e44c7 Author: Roman Babenko <babenek@users.noreply.github.com> Date: Tue Nov 15 23:32:10 2022 +0200 Version up to 1.4.5 (#243) * Version up to 1.4.5 and template fix * Update whatthepath requirement version to avoid huge diffs check. * Added test for huge patches parsing commit 6faeb2c Author: Roman Babenko <babenek@gmail.com> Date: Mon Nov 14 09:16:09 2022 +0200 Removed extra debug comments commit 722c068 Merge: 1555e12 d2e07b8 Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 9 01:47:10 2022 +0200 Merge remote-tracking branch 'upstream/main' into structures commit 1555e12 Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 9 01:47:03 2022 +0200 rename methods commit 0e36719 Merge: ab563ba 4d59bda Author: Roman Babenko <babenek@gmail.com> Date: Tue Nov 8 01:19:11 2022 +0200 Merge remote-tracking branch 'upstream/main' into structures commit ab563ba Merge: 37287ae 97bdaa0 Author: Roman Babenko <babenek@gmail.com> Date: Mon Nov 7 09:23:10 2022 +0200 Merge branch 'auxiliary' into structures commit 97bdaa0 Merge: 6989e46 27b7110 Author: Roman Babenko <babenek@gmail.com> Date: Mon Nov 7 09:20:05 2022 +0200 Merge branch 'main' into auxiliary commit 6989e46 Author: Roman Babenko <babenek@gmail.com> Date: Sat Nov 5 10:38:19 2022 +0200 rename methods commit 99f3408 Author: Roman Babenko <babenek@gmail.com> Date: Sat Nov 5 10:32:13 2022 +0200 make the method private again commit 2108748 Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 2 10:21:50 2022 +0200 fix commit 4abdb33 Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 2 10:20:46 2022 +0200 Line umeration commit da431c1 Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 2 09:50:44 2022 +0200 Use common code for reduce duplicate code commit d3861df Author: Roman Babenko <babenek@gmail.com> Date: Wed Nov 2 09:31:23 2022 +0200 Apply test assertion commit f268401 Author: Roman Babenko <babenek@users.noreply.github.com> Date: Wed Nov 2 09:30:36 2022 +0200 Update credsweeper/app.py Co-authored-by: ShinHyung Choi <sh519.choi@samsung.com> commit a956018 Author: Roman Babenko <babenek@users.noreply.github.com> Date: Wed Nov 2 09:30:25 2022 +0200 Update credsweeper/file_handler/data_content_provider.py Co-authored-by: ShinHyung Choi <sh519.choi@samsung.com> commit 37287ae Author: Roman Babenko <babenek@gmail.com> Date: Thu Oct 27 10:59:27 2022 +0300 restored 75% fuzz coverage commit 343ba58 Author: Roman Babenko <babenek@gmail.com> Date: Thu Oct 27 10:58:09 2022 +0300 minimized commit 6b9a5d5 Author: Roman Babenko <babenek@gmail.com> Date: Thu Oct 27 10:30:13 2022 +0300 reduced commit 7a8c2fd Author: Roman Babenko <babenek@gmail.com> Date: Thu Oct 27 08:03:52 2022 +0300 четвер, 27 жовтня 2022 08:03:52 +0300 commit 307762f Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 12:45:54 2022 +0300 flake8fix commit 7c68080 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 12:04:06 2022 +0300 Any struct commit 1e2c317 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 11:30:44 2022 +0300 Fix MyPY. Reduce fuzz coverage commit 74fa40e Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 11:18:53 2022 +0300 fix commit e816a68 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 10:53:29 2022 +0300 fix tests credentials commit 9987e12 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 10:40:17 2022 +0300 Structure scan JSON and YAML commit 2ddfee3 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 09:22:08 2022 +0300 scan struct commit 2024255 Author: Roman Babenko <babenek@gmail.com> Date: Wed Oct 26 08:32:21 2022 +0300 Commited forgotten sample commit c894f31 Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 23:58:12 2022 +0300 refuzzed commit f17cbbd Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 18:35:55 2022 +0300 fix commit 4e77dc9 Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 18:25:15 2022 +0300 Improved encode test research commit 6594b60 Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 17:56:11 2022 +0300 Encoded test commit 5e2775d Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 17:52:40 2022 +0300 Separated test for docx commit 26d727b Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 17:44:43 2022 +0300 fix commit 4ea1137 Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 14:58:27 2022 +0300 apply file type when not None commit cc2f6d7 Author: Roman Babenko <babenek@gmail.com> Date: Tue Oct 25 13:40:40 2022 +0300 Encoded data might be decoded * Update credsweeper/file_handler/struct_content_provider.py Co-authored-by: Kostiantyn Melnik <kmnls.kmnls@gmail.com>
- Loading branch information
Showing
57 changed files
with
263 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Success: no issues found in 83 source files | ||
Success: no issues found in 84 source files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import logging | ||
from typing import List, Optional, Any | ||
|
||
from credsweeper.file_handler.analysis_target import AnalysisTarget | ||
from credsweeper.file_handler.content_provider import ContentProvider | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class StructContentProvider(ContentProvider): | ||
"""Dummy raw provider to keep structured data | ||
Parameters: | ||
struct: byte sequence to be stored. | ||
file_path: optional string. Might be specified if you know true file name where lines were taken from. | ||
""" | ||
|
||
def __init__( | ||
self, # | ||
struct: Any, # | ||
file_path: Optional[str] = None, # | ||
file_type: Optional[str] = None, # | ||
info: Optional[str] = None) -> None: | ||
super().__init__(file_path=file_path, file_type=file_type, info=info) | ||
self.struct = struct | ||
|
||
@property | ||
def struct(self) -> Any: | ||
"""obj getter""" | ||
return self.__struct | ||
|
||
@struct.setter | ||
def struct(self, struct: Any) -> None: | ||
"""obj setter""" | ||
self.__struct = struct | ||
|
||
def get_analysis_target(self) -> List[AnalysisTarget]: | ||
"""Return nothing. The class provides only data storage. | ||
Raise: | ||
NotImplementedError | ||
""" | ||
raise NotImplementedError() |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"t:ire\"l#b.ls\":\"ap\n"} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PK�4 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<link rel="0ERgAAQA06dded84d6a99f6126968f210a526d9bb8E"/> |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+1.56 KB
.../6b78a49f2f81c15b54c1bc271903f8c721e7667e → .../610152b2a025155f15cec304e817b6de274301ed
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
="<?password">cackl/Cit䝉 <password name="password">ace_for_ukraine</password> | ||
</ies> |
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.51 KB
.../c7832116c548a936d02dba5ba9ea32ca2a61855b → .../7c6eecb1b52a22e187271bcfc4fab3f52c7bf8cd
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pwd : "cace!" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"test.domain.io/actual-configuration": "{\"apiVersion\":\"v1\",\"data\":{\"smtp-password\":\"\",\"wordpresdpress-wordpress\",\"chart\":\"wordp:\"wordpress\"},\"name\":\"wordpress-wopaque\"}\n"} |
Binary file renamed
BIN
+381 Bytes
.../05d0262facb829f463770b7b5bebfa0ae2b91cd1 → .../91872b929eee06159ae9f2704dd7ce10c46613d0
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.62 KB
.../b272cbeed5b4fd5774ab0c108e3d05bc67ae734f → .../97fbb25a4fc896e423c47f54e3b1b8b4c79560e6
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
IREOGIogicr_gireAbody: | ||
WM824c3 | ||
sk_liv,e_gireogicracklea)pGI: !!binary | | ||
H4sICv2xH9UVPREO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
body: | ||
- stringna6@^ame\":---ordpress-wordp485 |
Binary file renamed
BIN
+1.74 KB
.../6b8737b1e00c72a699151913c883a2a5df41dd76 → .../a3bbfcce88dcd5e14053bcb5b772e0df581c4baf
Binary file not shown.
Binary file renamed
BIN
+1.58 KB
.../b9c8aa807a927cee3b6f4ec1475679385db74f9a → .../b4f57c1be7888ff72e68d0858ba92f9c68066b25
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.63 KB
.../e1182b80ce7fddf42850af97edf022a5fd61e421 → .../c7b7936a53fa182a83740574917b635b8647a4fa
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file renamed
BIN
+1.57 KB
.../c5f4facd0a5b1a657433ca68154e33a7e48bb663 → .../cd625ab558a1b28ad90d1083d64b2096a52f401d
Binary file not shown.
Binary file renamed
BIN
+1.51 KB
.../eeaaa652952fef8117a481d1d7d2438fc815f646 → .../d2ec3276043232db9afb98075728e963a5b8e369
Binary file not shown.
Binary file renamed
BIN
+1.51 KB
.../1188838daba5b306b8c7bf4142b0e33e19567be1 → .../dfe1dd788a4b4cad55dd9803c46d0aa272d665d7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.5 KB
.../eaacd823db36dbd3ca4241c26eaf311de7528af4 → .../f7cf03173db4f86b52c8d5bd6369387535d4bb60
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
body: | ||
string: !!binary | | ||
H4sICIur8mIAA3BlbV9rZXkAbdM3kqNAAEDRnFNMTk3hEQo2oAG1sKIBASIbnLDC29OvifenP37f | ||
338CClStL8cVv2xH9UVP+dKV19/xjZmqKoWiCkRRB28kDVBf6gclZ5eziCoev5PDXHm1v2+e1K96 | ||
xmZSRN7sYSzJJKa1KA81Qn6/3Bu/PntsazUobD6K9CqDSSU/DO7ZTMsy3T6JdAYAXRzderrZ1CLH | ||
dGHtxxTBVPhUR/xzDnBuIa/N3ZoqfkYcRk2Ua48SqLM0tnLS60kYm5p8OGx29Ug2ijZVFpEIxA6K | ||
t7KqO47HB3hYgkk6/vHjiOGJ47s33IFRYMy8s/7bnEeEB8pbqorO2zqa0U0gLhp0Xx+n7UBkMo2Z | ||
e3q2qrVYprayry8pbbn0NTCh1xl1baycQWO9qvqPmylDXFfcj3jzLw2d4MnndMyAxGM+F1qHkrQz | ||
WnbfMHhE0vlqlBxHtLH72hUJITkTNz4vVRRicKmBymZmFM3sZ0oOuqNo/Xh9spHx+y5TcKunBzxi | ||
+lU0U+LHOhERXIMfFbecPNmf2tjm9qbClmfKBhNrRdwlg7ujmI7RyIKjGxMzaIlCsWkzOp2Hf2GO | ||
G0sV9uRI15bn9bHIHte77WlLxxDXievxaYD7o7lhBmnJM+vW3VS94aaJt7o5HGqJiM3WqoqnqCQF | ||
yTk3djp0+zQh+CkEDpxSRSxMMIBeoddqPY71ULkaC/mzvrhkU+nzTFefg8ZJ0p9ANiINiBqUKPPN | ||
PY6046xN5kHpPEZ7hx0d9168EHkxekIW32vvpLO+wZ5XHyEXnS+qi0w/FEqq5YKnZ9gnfRiaCpCf | ||
hkNhSgjArlzczq1+8mfhX0oqUWAfC0LBWeAVnUEII4y5TBqHpgCftKOz0ozZ78KahsX5vGSeQMt8 | ||
SEzJdnWiEyf4UdLYnvyF/cOjWPJ/Uf0Gdno9KXQDAAA= | ||
secret: | | ||
we5345d0f3da48544z1t1e275y05i161x995q485 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"test.domain.io/actual-configuration": "{\"apiVersion\":\"v1\",\"data\":{\"smtp-password\":\"\",\"wordpress-password\":\"Axt4T0eO0lm9sS==\"},\"kind\":\"Secret\",\"metadata\":{\"annotations\":{},\"labels\":{\"app\":\"wordpress-wordpress\",\"chart\":\"wordpress-5.0.1\",\"heritage\":\"Tiller\",\"release\":\"wordpress\"},\"name\":\"wordpress-wordpress\",\"namespace\":\"argocd\"},\"type\":\"Opaque\"}\n"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters