-
Notifications
You must be signed in to change notification settings - Fork 1.6k
output-file: validate force-hash YAML values. #14223
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
output-file: validate force-hash YAML values. #14223
Conversation
|
NOTE: This PR may contain new authors. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14223 +/- ##
==========================================
- Coverage 84.17% 84.17% -0.01%
==========================================
Files 1013 1013
Lines 262327 262331 +4
==========================================
+ Hits 220809 220812 +3
- Misses 41518 41519 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
Code looks good.
Also output/file instead of output-file
I think it is too long
The text could be something like
Previously, the force-hash configuration for file logging silently accepted
unknown or invalid hash types (e.g., 'shanani')
Now, invalid values trigger FatalError.
I put a question in the SV PR
aeb11e3 to
cb93a5c
Compare
thank for the review, all requested changes have been cleared. Even the SV PR |
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
cb93a5c to
91c0420
Compare
|
Hi @kaddujames501-ship-it ! Force pushes are discouraged here. Please read the contribution guidelines and create a new PR for any changes incorporated. Thank you! |
|
closing this for #14305 |
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#2735
James Kaddu: [email protected]