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

Requires keyword/v1 #12138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

jasonish
Copy link
Member

The idea is to allow a rule to require the existence of keywords, for example, #12120 brings 2 new keywords that are dynamically loaded as part of a plugin. It could get pretty crazy adding feature flags, version checks, etc. Or we could just add a check for the existence of a keyword.

One other important change: Suricata 7, and 8 before this PR would ignore unknown requires statements like requires: foo bar, I think this was flawed. Instead, we should treat an unknown, yet syntactically valid requirements statement as an unmet requirement.

Ticket: https://redmine.openinfosecfoundation.org/issues/7403

SV_BRANCH=OISF/suricata-verify#2133

For example, "requires: foo bar" is an unknown requirement, however
its not tracked, nor an error as it follows the syntax. Instead,
record these unknown keywords, and fails the requirements check if any
are present.

A future version of Suricata may have new requires keywords, for
example a check for keywords.
To be used by the requires keyword to check for keyword support.

Ticket: OISF#7403
For example:

    requires: keyword foo;

Will require that Suricata supports the "foo" keyword.

Ticket: OISF#7403
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 95.74468% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.10%. Comparing base (5d766df) to head (8523a0e).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #12138       +/-   ##
===========================================
+ Coverage   62.68%   83.10%   +20.42%     
===========================================
  Files         840      909       +69     
  Lines      153669   257928   +104259     
===========================================
+ Hits        96323   214354   +118031     
+ Misses      57346    43574    -13772     
Flag Coverage Δ
fuzzcorpus 60.92% <34.61%> (?)
livemode 19.43% <0.00%> (?)
pcap 44.38% <0.00%> (?)
suricata-verify 62.70% <73.07%> (+0.01%) ⬆️
unittests 59.27% <68.08%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

---- 🚨 Try these New Features:

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23452

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

Successfully merging this pull request may close these issues.

2 participants