-
Notifications
You must be signed in to change notification settings - Fork 173
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
Can not exclude specific files (only paths/directories is working) #223
Comments
@thl-cmk You are right. Current version only excludes directories for maximum scan speed. If scanner tries to exclude also files, it should match all files (millions of..) and performance will be severely degraded. If you want to scan specific files, compose log4j2-scan with find command. |
I see.
|
Maybe another option should be added for that.. Exact full path match is relatively cheap (can use hash code), but current option uses prefix match for directory matching.. (comparison count = exclude pattern count x file count) |
would be great to have this, so I could exclude known errors (broken zip for any reason for example) |
This discussion confirms that --exclude-pattern is completely non-functional for files and will continue to be. Please update the help output to clarify that the pattern only applies to directory names, not file names. |
@mrl-siemens Send me Pull Request. I think it already states directory like this:
|
Greetings,
Similar language for the --exclude-filter option would be great.
Sorry, I have no experience with GitHub. What is a PR?
Thanks,
Mark
From: Yang, BongYeol (xeraph) ***@***.***>
Sent: Thursday, December 30, 2021 11:20 AM
To: logpresso/CVE-2021-44228-Scanner ***@***.***>
Cc: Ludwig, Mark (DI SW LCS APPS TC-ENT) ***@***.***>; Mention ***@***.***>
Subject: Re: [logpresso/CVE-2021-44228-Scanner] Can not exclude specific files (only paths/directories is working) (Issue #223)
@mrl-siemens<https://github.com/mrl-siemens> Send me PR. I think it already states directory like this:
…--exclude [path_prefix]
Full paths of ***directories*** whose absolute path starts with the specified value will be excluded.
Does not support relative paths. You can specify multiple --exclude [path_prefix] pairs
—
Reply to this email directly, view it on GitHub<#223 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXDFF4YNYVSYSBAOQYX6TR3UTSIFJANCNFSM5K7LMAGA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@thl-cmk @mrl-siemens |
@xeraph just tested. Windows looks good. Linux dosen't work :-( the config file
the output from the scanner
as you can see the excluded files are not excluded. |
@xeraph I did a little more digging on the Linux issu with the Hope this will help to get this option fixed ;-) |
Hi,
I need to exclude specific files (not paths/directories) from the scan. So far I have tryed the
--exclude
and--exclude-config
options, but no success.and with the --exclude-config option
In both cases the scanner showes the file as excluded but still tryes to scan it.
The text was updated successfully, but these errors were encountered: