Add YARA rule compilation validation to CI#4357
Open
aidenmitchell wants to merge 1 commit intomainfrom
Open
Conversation
Adds a step to the rule validation workflow that compiles all YARA rules using yarac, catching syntax errors before they are merged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cameron-dunn-sublime
approved these changes
Apr 17, 2026
| - name: Validate YARA rules | ||
| if: github.event_name != 'issue_comment' | ||
| run: | | ||
| sudo apt-get install -y -qq yara > /dev/null 2>&1 |
Member
There was a problem hiding this comment.
Req: pin yara version
| failed=0 | ||
| for f in yara/*.yar; do | ||
| echo "Validating $f..." | ||
| if ! yarac "$f" /dev/null; then |
Member
There was a problem hiding this comment.
This may produce different results than the parsing and validation we do within the platform. We can talk offline for more detail, but I know we've seen subtle differences between our validation in feeds vs. supported features in Strelka.
This file contains hidden or 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
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.
Summary
yaracto catch syntax errors before mergeyaravia apt and validates each.yarfile in theyara/directory::errorannotations for inline PR feedback on failuresTest plan
🤖 Generated with Claude Code