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

fix: demo extractor updated yara #62

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

seb-acsc
Copy link
Contributor

@seb-acsc seb-acsc commented Nov 14, 2024

This PR fixes the demo complex extractor for yara v4.3.0 compatibility and adds a test case so we can pick up the failure in the future.

Fixes #56

@seb-acsc
Copy link
Contributor Author

unfortunately I can't see why the tests failed - is it related to the use of the unittest module?

@cccs-ml
Copy link
Contributor

cccs-ml commented Nov 14, 2024

The tests failed on Py3.8 and Py3.9.
Running locally the tests appear to give non-deterministic results on Py3.8 at least.

-              'decoded_strings': ['Complex', 'Paradise'],
?                                  -----------

+              'decoded_strings': ['Paradise', 'Complex'],
?                                            +++++++++++

Re-Running the tests results in some runs passing and others failing.

@cccs-ml
Copy link
Contributor

cccs-ml commented Nov 14, 2024

ps: not related to the use of unittests or tox.

I get the same results running the tests via tox, and also after converting to purely use pytest

@cccs-rs
Copy link
Contributor

cccs-rs commented Nov 14, 2024

We could convert those into sets in the test files, I believe we do that as a workaround in the AL pytests

Copy link
Contributor

@cccs-ml cccs-ml left a comment

Choose a reason for hiding this comment

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

Forcing sorted output in the demo extractor would make testing easier.

demo_extractors/complex/complex.py Outdated Show resolved Hide resolved
tests/test_demo_extractors.py Outdated Show resolved Hide resolved
@cccs-rs cccs-rs merged commit c872397 into CybercentreCanada:master Nov 14, 2024
1 check passed
@seb-acsc seb-acsc deleted the fix/demo_extractor_complex branch December 8, 2024 23:33
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.

yara.Match unexpected incompatibility
3 participants