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

Safely Account for a YARA Compilation Failure #411

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

phutelmyer
Copy link
Contributor

Describe the change
As identified in #410, Strelka will fail to load YARA, and subsequently fail to scan, if an unsupported YARA rule is ingested. This can be fixed by curating YARA rules prior to use in Strelka, however, to account for safe loading, we are now checking for a properly loaded compiled YARA prior to use.

Note: This may still fail if users remove the default test YARA and push unsupported YARA rules.

Describe testing procedures
A test using an unsupported YARA rule was created. This test successfully passes, which prior to the changes, did not. Strelka should not fail anymore using the default patterns + any unsupported patterns.

Sample output
N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer merged commit b39c78f into master Nov 10, 2023
3 checks passed
@phutelmyer
Copy link
Contributor Author

Note
As Strelka supports pre-compiled rulesets, we recommend using those to prevent rule compilation failures.
Compiling rules in a pipeline ahead of Strelka ensures that all expected rules will load properly every time.

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.

1 participant