-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add a way to suppress flagging good log4j files as potentially vulnerable if renamed #112
Comments
I could specify "crawl --disable-unknown-versions" but that might suppress the flagging of other issues we need to remediate and in this case the version IS known (and known to be non-vulnerable) via the md5 checksum matching in vulnerabilityFileWalkFunc(). |
I "fixed" this by making vulnerabilityFileWalkFunc() save version info in a global variable when the md5 check matches a non-vulnerable version and added code in resolveNameAndContentFindings() to use this global to avoid flagging files like this as invalid / potentially vulnerable. This is a terrible kludge but is small enough for me to port to later versions of this code if necessary. I tested this by crawling the entire examples directory after making a copy of the "good_version" subdir containing the exact same files but renamed:
I verified the results and the only differences were that these messages were now absent
|
It would help if someone could fix this properly. I'm not submitting a pull request because this is just a quick hack intended to reduce our false positives. In case this helps, here are the changes I needed to make to v1.9.0 for this
|
Hi @mcainx, Unfortunately we do not have cycles to implement the change that you are after. I understand that this will be a frustrating answer. The |
I tested this and it looks like this We'll probably continue using this global variable kludge for large scale scanning since our aggregation processing relies on I already maintain a fair number of local modifications to support automated large scale scanning and aggregation anyway -- like the addition of metadata to the (Yes, I do realize I could have done a lot of this aggregation support via a wrapper but we needed to make running this as simple as possible.) FWIW, if this issue is found to affect other companies, I wouldn't mind seeing this kind of "fix" dropped into the official code as awkward as it is. At least it gets the job done and that's what counts. (Just something to keep in mind.) |
Thanks @mcainx, I appreciate your understanding and am glad to see that log4j-sniffer has at least provided a decent base for you to action your remediations from! Let's leave this issue open and see what happens. |
It would help if we had a way to suppress these matches (produced by the crawl command) when the application owner has upgraded to log4j-core-2.17.1.jar but renamed the file.
In this example, I scanned examples/good_version/log4j-core-2.17.1.jar but removed "core-" from the name.
The text was updated successfully, but these errors were encountered: