log4j-detector icon indicating copy to clipboard operation
log4j-detector copied to clipboard

Linux Mint: Which folders need to be scanned?

Open gadgetmuc opened this issue 3 years ago • 2 comments

Hello there, first of all, thanks for this handy tool. But I keep wondering, which folders need to be scanned and which can be ignored (Linux Mint). I used to scan from '/', but the program got stuck somewhere within the /dev/usb/... structure everytime.

Please give me some advice - and take a look at my other issue also. ;)

TIA

gadgetmuc

gadgetmuc avatar Dec 16 '21 11:12 gadgetmuc

You should not scan special device located in /dev, /proc, /sys etc.

And a small note regarding my merge request: ;) This could of course be solved with find / -xdev -type f and the detector option --stdin which I added yesterday (#42 and #43) Example:

find / -xdev -type f | java -jar log4j-detector-2021.12.17.jar --stdin

beckerr-rzht avatar Dec 18 '21 13:12 beckerr-rzht

There is a new --exclude option available. Could do --exclude=["/dev", "/proc"].

Also, later versions might be fine regardless since the scanner looks at the filename now before attempting to read the file. Whereas the original versions of this tool attempted to read every file! (Assume everything is a zip file unless told otherwise!). But I ditched that logic as too slow in v2021.12.16.

juliusmusseau avatar Dec 20 '21 23:12 juliusmusseau