-
Notifications
You must be signed in to change notification settings - Fork 1.6k
output/file: validate force-hash YAML values #14305
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
base: main
Are you sure you want to change the base?
output/file: validate force-hash YAML values #14305
Conversation
Previously, the force-hash configuration for file logging silently accepted unknown or invalid hash types (e.g., 'shanani') Now, invalid values trigger FatalError. Bug OISF#4330
|
"grep suricata.log: no such file or directory" does not seem like it is a correct error message. |
catenacyber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work,
CI : ✅
Code : good
Commits segmentation : ok
Commit messages : good
Git ID set : looks fine for me
CLA : I think you signed it
Doc update : not needed
Redmine ticket : ok
Rustfmt : no rust
Tests : I pushed a new better version ;-)
Dependencies added: none
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14305 +/- ##
==========================================
- Coverage 84.21% 84.17% -0.04%
==========================================
Files 1013 1012 -1
Lines 262126 261872 -254
==========================================
- Hits 220752 220438 -314
- Misses 41374 41434 +60
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
jufajardini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Philippe's SV test is a good match for this PR, I think that this is good, now.
So, would you review/approve my SV PR ? |
Bug #4330
Make sure these boxes are checked accordingly before submitting your Pull Request -- thank you.
Contribution style:
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html
Our Contribution agreements:
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Changes (if applicable):
https://redmine.openinfosecfoundation.org/projects/suricata/issues/
Link to ticket: https://redmine.openinfosecfoundation.org/issues/4330#change-42436
Describe changes:
unknown or invalid hash types (e.g., 'shanani'), leading to potential
misconfiguration.
This patch updates FileForceHashParseCfg() in util-file.c to:
test mode (-T) if invalid values are detected.
Tested by adding an invalid hash type ('shanani') in suricata.yaml and
confirming that Suricata fails with the correct error message.
Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCHvariable.SV_BRANCH=OISF/suricata-verify#2751
James Kaddu: [email protected]