-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate local target checks #416
Closed
Closed
Conversation
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
Adding support for running YARA as sourcecode rules
ikretz
changed the title
Consolidate archive file extension checking
Consolidate local target checks
Jul 17, 2024
…Dog/guarddog into ikretz/fix/package-scanner-callback
wcmatch==8.4.1 ; python_version >= "3.10" and python_version < "4" \ | ||
--hash=sha256:3476cd107aba7b25ba1d59406938a47dc7eec6cfd0ad09ff77193f21a964dee7 \ | ||
--hash=sha256:b1f042a899ea4c458b7321da1b5e3331e3e0ec781583434de1301946ceadb943 | ||
wcwidth==0.2.6 ; python_version >= "3.10" and python_version < "4" \ | ||
--hash=sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e \ | ||
--hash=sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0 | ||
yara-python==4.5.1 ; python_version >= "3.10" and python_version < "4" \ |
Check warning
Code scanning / GuardDog-pypi
GuardDog rule: single_python_file Warning
This package has 1 or fewer Python source files
@@ -367,6 +367,9 @@ | |||
--hash=sha256:c05b847200ae72200e47c30d0b11d6f130a88e2f7b83b75751fd3a3344fd3168 \ | |||
--hash=sha256:c0c90e645bd1e870414efbbc997443176b3432aa7f2e48551f623edac2086bde \ | |||
--hash=sha256:fbbc043c155e153be837fdf208063f3d7748934077968bc20b21efed502a2d6d | |||
setuptools==70.3.0 ; python_version >= "3.10" and python_version < "4" \ |
Check warning
Code scanning / GuardDog-pypi
GuardDog rule: bundled_binary Warning
Binary file/s detected in package:
3471b6140eadc6412277dbbefe3fef8c345a0f1a59776086b80a3618c3a83e3b: gui-64.exe (exe)
32acc1bc543116cbe2cff10cb867772df2f254ff2634c870aef0b46c4b696fdb: cli-32.exe (exe), cli.exe (exe)
b9a7d08da880dfac8bcf548eba4b06fb59b6f09b17d33148a0f6618328926c61: cli-arm64.exe (exe)
e694f4743405c8b5926ff457db6fe7f1a12dec7c16a9c3864784d3f4e07ae097: gui-arm64.exe (exe)
85dae1e95d77845f2cb59bcac3d4afe74bbe4c91a9bcc5bf4a71cd43104dbe7c: gui-32.exe (exe), gui.exe (exe)
bbb3de5707629e6a60a0c238cd477b28f07f0066982fda953fa6fcec39073a4a: cli-64.exe (exe)
3471b6140eadc6412277dbbefe3fef8c345a0f1a59776086b80a3618c3a83e3b: gui-64.exe (exe)
32acc1bc543116cbe2cff10cb867772df2f254ff2634c870aef0b46c4b696fdb: cli-32.exe (exe), cli.exe (exe)
b9a7d08da880dfac8bcf548eba4b06fb59b6f09b17d33148a0f6618328926c61: cli-arm64.exe (exe)
e694f4743405c8b5926ff457db6fe7f1a12dec7c16a9c3864784d3f4e07ae097: gui-arm64.exe (exe)
85dae1e95d77845f2cb59bcac3d4afe74bbe4c91a9bcc5bf4a71cd43104dbe7c: gui-32.exe (exe), gui.exe (exe)
bbb3de5707629e6a60a0c238cd477b28f07f0066982fda953fa6fcec39073a4a: cli-64.exe (exe)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes three principal changes:
It defines functions in
guarddog/utils/archives.py
for checking whether a file extension is for a supported archive format and uses them pervasivelyIt clarifies the conditions under which Guarddog will decide to perform a local scan on a target: whenever the target is a directory or a regular file in the local filesystem. It also eliminates as much as possible duplicate checking for whether the target is local and what kind of local target it is (file or directory)
It makes sure that
PackageScanner.scan_local()
uses itscallback
argument, closing issue Unused callback function argument in PackageScanner #411