Skip to content

fix(helpers): fail-fast when no relevant signature is available (#394) - #395

Open
Ferdinand (guzmud) wants to merge 1 commit into
mainfrom
fix/394-explictly-fail-on-no-signatures
Open

Ferdinand (guzmud) wants to merge 1 commit into
mainfrom
fix/394-explictly-fail-on-no-signatures

Conversation

@guzmud

Copy link
Copy Markdown
Member

Proposed changes

  • Adding a fail-fast in _match_alert_elements_original in case no signature is available
  • Adding a couple of tests related to OpenAEVDetectionHelper

Testing Instructions

  1. Build a crowdstrike collector using this version pyoaev
  2. Launch nmap
  3. Do not have a match in the expectation

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

Copilot AI balanced review requested due to automatic review settings November 30, 2026 14:36
@github-actions github-actions Bot added the filigran team Item from the Filigran team. label Nov 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the fix preventing matches when filtering leaves no relevant signatures.

No open issues 🎉

What changed in this PR

This PR addresses #394 by preventing OpenAEVDetectionHelper’s original matcher from reporting a match when no relevant signatures remain after filtering.

Changes:

  • Return False immediately when the filtered signature list is empty.
  • Add tests for helper initialization, matching-path selection, and the no-relevant-signature regression.
File Description
test/​test_helpers.py Adds helper initialization, dispatch, and regression tests.
pyoaev/​helpers.py Adds the early return when no relevant signatures remain.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(helpers): wrongfully matching when no relevant signature is available

2 participants