Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/rule-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,24 @@ jobs:

echo "All batches submitted successfully!"

- name: Validate YARA rules
if: github.event_name != 'issue_comment'
run: |
sudo apt-get install -y -qq yara > /dev/null 2>&1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Req: pin yara version

failed=0
for f in yara/*.yar; do
echo "Validating $f..."
if ! yarac "$f" /dev/null; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

echo "::error file=$f::YARA rule failed to compile: $f"
failed=1
fi
done
if [[ $failed -eq 1 ]]; then
echo "One or more YARA rules failed to compile"
exit 1
fi
echo "All YARA rules compiled successfully!"

- name: Verify no .yaml files exist
if: github.event_name != 'issue_comment'
run: |
Expand Down
Loading