Enhancements to ScanYara Scanner for Improved Rule Organization and Metadata Extraction #440
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.
Description of Change
This update enhances the
ScanYara
scanner's functionality, introducing the ability for users to:In previous versions, all
ScanYara
matches were stored understrelka.yara.matches
, containing only the names of the rules. Metadata was available understrelka.yara.meta
but lacked organization, making it difficult to parse.With this update, users can configure keys inside the
backend.yml
to sort matches into distinct groups and specify whether metadata should be displayed for those groups, including which metadata fields to extract.Consider the following YARA rule example:
Previously, this rule would output a list of matches by filename, along with a separate list of metadata.
Now, with the proposed update, users can create "buckets" of rules, allowing organization by content type:
Users must adapt their backend.yml configuration as follows:
Key Configuration Parameters:
This change maintains backward compatibility with previous versions of ScanYara.
Describe testing procedures
All tests within test_scan_yara pass successfully, and additional testing confirms that existing functionalities remain unaffected by these updates.
Sample output
Checklist