-
Notifications
You must be signed in to change notification settings - Fork 560
feat: load yara lazily to avoid action dispatcher error #1162
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
Conversation
erickgalinkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Great catch!
cc621b5 to
af3e53d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1162 +/- ##
========================================
Coverage 68.00% 68.00%
========================================
Files 161 161
Lines 15793 15801 +8
========================================
+ Hits 10740 10746 +6
- Misses 5053 5055 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
trebedea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Only one suggestion, if this makes sense.
Would it be better to only have the action public and all the other functions private (seen as helpers, as they should not be used on their own - or can they be used separately)? This way we can check for availability of yara package only in the injection_detection action.
39af000 to
af3e53d
Compare
Totally, very nice suggestion, thank you! And at some point we are going to strictly define our public interfaces 👍🏻 |
…ndency - Implement lazy loading of yara module with proper type hints - Add error messages when yara is not available - Add helper function _check_yara_available() for consistent error handling
f99aee7 to
d1b7509
Compare
Description
implement lazy loading and improve error handling for yara dependency
Related PR
#1091
Steps to Repro
expected output