Skip to content
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

Simplify local target checks #419

Merged
merged 6 commits into from
Jul 18, 2024
Merged

Simplify local target checks #419

merged 6 commits into from
Jul 18, 2024

Conversation

ikretz
Copy link
Contributor

@ikretz ikretz commented Jul 17, 2024

This PR makes three principal changes:

  1. It simplifies the conditions under which Guarddog will decide to perform a local scan: whenever the target is a directory or a regular file in the local filesystem. It also eliminates as much as possible duplicate checks related to local targets

  2. It adds functions in guarddog/utils/archives.py for checking whether a file extension is for a supported archive format and uses them pervasively

  3. Closes Unused callback function argument in PackageScanner #411

@ikretz ikretz marked this pull request as ready for review July 17, 2024 10:24
@ikretz ikretz force-pushed the ikretz/fix/local-checking branch from ac92c0e to 3fc3d3f Compare July 17, 2024 22:22
guarddog/scanners/scanner.py Show resolved Hide resolved
tests/core/test_cli.py Outdated Show resolved Hide resolved
tests/core/test_cli.py Outdated Show resolved Hide resolved
@sobregosodd
Copy link
Contributor

Approved with a couple of nits

@datadog-datadog-prod-us1
Copy link

Library Vulnerabilities

✅ No library vulnerabilities found (scanned 854d8f5).

@ikretz ikretz merged commit 104e883 into main Jul 18, 2024
10 checks passed
@ikretz ikretz deleted the ikretz/fix/local-checking branch July 18, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unused callback function argument in PackageScanner
2 participants