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 YARA execution bugs #444

Merged
merged 6 commits into from
Aug 26, 2024
Merged

Fix YARA execution bugs #444

merged 6 commits into from
Aug 26, 2024

Conversation

sobregosodd
Copy link
Contributor

@sobregosodd sobregosodd commented Aug 20, 2024

YARA execution improvements:

  • adding test cases to opportunistic test every YARA rule if a test file is present (as done for semgrep rules)
  • add yara analyzer exclusions to avoid matching on known doc files or files prone to produce FPs
  • parse from YARA meta to obtain rule descriptions in order to produce docs

@sobregosodd sobregosodd changed the title Adding LOLBins rule Adding LOLBas rule Aug 21, 2024
@sobregosodd sobregosodd marked this pull request as ready for review August 21, 2024 16:40
@sobregosodd sobregosodd changed the title Adding LOLBas rule Fix YARA execution bugs Aug 26, 2024
@@ -177,8 +178,10 @@ def analyze_yara(self, path: str, rules: Optional[set] = None) -> dict:
errors: Dict[str, str] = {}
issues = 0

rule_results = defaultdict(list)
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool

Copy link
Contributor

@ikretz ikretz left a comment

Choose a reason for hiding this comment

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

LGTM

@sobregosodd sobregosodd merged commit b0c9b8e into main Aug 26, 2024
10 checks passed
@sobregosodd sobregosodd deleted the s.obregoso/add_lolbas branch August 26, 2024 12:13
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.

3 participants