Conversation
|
This is great and a very useful feature. While we review could add this to the docs: https://github.com/ossec/ossec-docs by creating a pull request? |
src/syscheckd/seechanges.c
Outdated
| snprintf( | ||
| diff_cmd, | ||
| 2048, | ||
| "printf '<Diff truncated>' > \"%s\"", |
There was a problem hiding this comment.
Think this could be more descriptive with something like Diff truncated due to nodiff
There was a problem hiding this comment.
Also is printf always present on all supported platforms. I really hate shelling out for this use case it's pointless outside of integrating into the reset of the function.
There was a problem hiding this comment.
Are you suggesting to directly fwrite() to the file ?
There was a problem hiding this comment.
Nope, sorry for not being clear. Given the code this is sane solution.
|
Also it's not clear that function is_nodiff checks the osman chest if that was used. |
|
One thing that I don't see is how OSmatch is ever used. The is_nodiff function only processes the list of files but does not process the OSmatches that are created via the Conf/xml |
|
Reviewed 8 of 8 files at r1. src/config/syscheck-config.c, line 714 [r1] (raw file):
What happens if it fails? src/syscheckd/seechanges.c, line 52 [r1] (raw file): src/syscheckd/syscheck.c, line 144 [r1] (raw file): src/syscheckd/syscheck.c, line 326 [r1] (raw file): Comments from the review on Reviewable.io |
|
Thanks for the review. I updated the code according to your suggestions. I added the regex match feature. As for |
|
For ExpandEnvironmentStrings good point I did not check on that. Thank you. Reviewed 3 of 3 files at r2. Comments from the review on Reviewable.io |
|
@calve Could you add docs github.com/ossec/ossec-docs ? Also add yourself as contributor? Thank you again great stuff and something I think others will use. |
|
Hi guys, isn't it worth assigning a CVE under Information Leakage (https://cwe.mitre.org/data/definitions/200.html) to spread the fact that sensible informations might have leaked over email ? cc @ddpbsd |
Sensitive data may leak through the diff attached to alerts when some file changes. This pull request add a
nodiffoption, which allows to explicitely set files for which we never want to output a diff.This change is