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

7.0.x: backport treating unknown requirements as unsatisfied with opt-out flag - v1 #12224

Closed
wants to merge 2 commits into from

Conversation

jasonish
Copy link
Member

@jasonish jasonish commented Dec 4, 2024

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 fail the requirements check if any
are present.

A future version of Suricata may have new requires keywords, for
example a check for keywords.

Ticket: OISF#7418
(cherry picked from commit 820a3e5)
The new behavior in 8, and backported is to treat unknown requirements
as unsatisfied requirements.

For 7.0.8, add a configuration option, "ignore-unknown-requirements"
to completely ignore unknown requirements, effectively treating them
as available.

Ticket: OISF#7434
default-rule-path: /var/lib/suricata/rules
rule-files:
- suricata.rules
ignore-unknown-requirements: true
Copy link
Member Author

Choose a reason for hiding this comment

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

I opted for a top-level key to keep it simple, and to keep it close to where you define your rules. The other option would be under detect somewhere.

@@ -34,6 +34,27 @@ also check all the new features that have been added but are not covered by
this guide. Those features are either not enabled by default or require
dedicated new configuration.

Upgrading to 7.0.7
Copy link
Member Author

Choose a reason for hiding this comment

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

Grr...

@jasonish
Copy link
Member Author

jasonish commented Dec 4, 2024

Replaced by #12226.

@jasonish jasonish closed this Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.17%. Comparing base (093397f) to head (d5dadaf).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-7.0.x   #12224      +/-   ##
==============================================
- Coverage       83.18%   83.17%   -0.01%     
==============================================
  Files             922      922              
  Lines          260858   260880      +22     
==============================================
- Hits           216982   216975       -7     
- Misses          43876    43905      +29     
Flag Coverage Δ
fuzzcorpus 64.15% <100.00%> (+<0.01%) ⬆️
suricata-verify 63.34% <100.00%> (-0.03%) ⬇️
unittests 62.38% <84.90%> (+<0.01%) ⬆️

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

@jasonish jasonish deleted the 7.0.x-7434-requires/v1 branch December 12, 2024 15:14
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.

1 participant