-
Notifications
You must be signed in to change notification settings - Fork 194
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
Implement Windows Defender Auto-fix #1453
Implement Windows Defender Auto-fix #1453
Conversation
In general excluding directories from being scanned by the Windows Defender can be a potential security risk, which is why as few files and directories as possible should be excluded. In order to analyze the impact of the Windows Defender on the Eclipse start-up I used the Windows Defender Performance Analyser: https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/tune-performance-defender-antivirus This showed that basically all files touched/accessed by Eclipse are scanned by the Windows Defender, at least at the first for each process. There seem to be some short term caching but that cache didn't last long (only for a few minutes.
All of this together sums up to many directories that would have to be excluded in order to fully turn off the Windows Defender for Eclipse. But if desired more (installation relative) locations can be excluded easily. Alternatively the process of the currently running Eclipse (identified by the location of the executable usually named
It would be simple to configure and would have the effect that the Windows Defender does not slow down Eclipse at all. What is the opinion of the others on this? |
@HannesWell I'm a enthusiast Linux (Ubuntu) user with the rare tendency to boot Windows. But AFAIK I have no Virus protection program installed on Windows |
Test Results 918 files ±0 918 suites ±0 51m 35s ⏱️ + 3m 47s For more details on these failures, see this check. Results for commit 837da54. ± Comparison against base commit 1f7f07a. ♻️ This comment has been updated with latest results. |
Ah, sorry then I remembered that wrong. Nevertheless, if you want, your assessment is of course welcome. |
I wonder if one can exclude the process in general but enable it for certain file types? e.g I think it is fine to still scan |
This is quit complex dialog. A lot text to read and also quite something to understand. And then one has 4 buttons one can press. Can we improve / simplify this dialog further? |
Yes, that would be a good solution, but unfortunately this seems not to be possible.
With that in mind excluding the process from real-time protection has the advantage that the opened files are at least scanned during scheduled and on-demand scans.
That's right, but the task is not so simple, so the users should be aware of what is done, but I agree making it simpler would be good. |
I have several ideas but have to think about this in more detail. How urgent is this? |
I really think this is a great improvement, and I also think it is crucial that the dialog is easy to conceive in order to enable people to do the right decision. One thought: is "Ignore all installations" really needed? |
One option would be to have a simple version, like "Exclude Eclipse from Virus Scanning scanning to improve its performance" Yes/ No with a "See detailed screen " switching to the full blown screen. Yes would then set all possible options which would make all Eclipse installations fast. |
But even then we should decide how much details the "detailed screen" needs. |
That would be great. One reference could also be the dialog from Intelij mentioned in the dev-effort:
In order to handle the But while the first dialog should be simple and should not overwhelm novice users when they open Eclipse for the first time, at the same time power-users should not be annoyed by convoluted workflows to reach more complex goals. So I think it is a difficult balance that should be found. With that input, what do you think about having a relatively simple dialog poping up at start up that only asks to either run the exclusion (should it also show the script?) or to open the preferences, which at the same time provide more details, or can be closed via the corner X. But I'm torn if the third button to ignore this installation should be kept too.
Adding an exclusion (regardless of the kind) always requires Admin privileges, so unless Eclipse runs with such rights the user is prompted by Windows for Admin rights. That prompt should IMHO never come up out of a sudden because the user selected to automatically exclude all installations with another installation (hypothetically) created three years ago. Therefore the dialog should always come up for a new installation that has not been checked yet (with the result to exclude or ignore it). |
1c411e1
to
ebc006f
Compare
ebc006f
to
17a300e
Compare
Happy new year all together. I hope you had relaxing holidays. With tonight's I-build all prerequisites for this should be complete and I would like to work towards completing this PR. |
9091e89
to
3eb1b5d
Compare
regarding the UX discussion I will provide a update later this day. |
3eb1b5d
to
dd2a6a2
Compare
I just had a MS Teams meeting with @HannesWell and Hans-Peter (the ADT UX-Expert). We discussed how the interaction an the UX of this feature can be improved. For transparency reasons I write down the most import topics we talked about:
We did not take a final decision yet. |
dd2a6a2
to
f91fa77
Compare
Sorry for being late in this discussion and first of all: thank you, Hannes, for this work! The Windows defender slowing down startup has also been an issue for us, in particular because we had problems with slow startups where involved colleagues did not know about potential interactions with the Windows defender, so it took us quite some time to find the reason. I can second everything that has already been discussed, particularly with respect to the importance of the dialog being well designed, as it is the first thing that is shown to a user. And the suggestions made so far sound very good. Maybe this was already discussed as well, then sorry that I missed it, but otherwise I want to point out one thing: From my understanding, this functionality will be present in every RCP appcliation, and I would expect this contribution to be very valuable for all of them. Still we need to consider that RCP products may be deployed in corporate environments where the users of the application will usually not be able to do anything with most of the options in the dialog in case it pops up, since they do not have the priviledge to do any of the required configurations. So maybe we need to provide different "check modes" for the Windows Defender status that can be defined "externally", e.g., via some system property? For example, I could image that for our product it makes sense to deploy it in a mode, in which the user is informed in case of a "bad" configuration, but that no option to change the configuration is provided to him or her. Still, the information can be used to inform the IT department that configurations of the clients may need to be changed. And maybe some customers even accept bad startup performance and want to deploy the applications to their clients without this warning popping up.
Even for the provision of our development IDEs for the software development colleagues, such a configuration could be reasonable (in that case we could also set according preferences via Oomph). Our computers usually have specific folders that are already excluded from virus scanners, in which we place tools or data that should not be scanned. Then it would also be good if we can configure the IDE to only report if someone installed the IDE to a folder that is not excluded from virus scan, but not to ask him or her to acquire admin priviledges and change the virus scanner settings. |
f91fa77
to
8b61908
Compare
It is already possible to disable the startup check by setting the In general the start-up check is only executed once if the user decides how to handle this installation and there are basically two options: Perform exclusion and keep the installation being scanned. And unless the user decides to cancel the dialog does not show up again.
That is not possible because you need Administrator privileges even just for reading the current Windows Defender exclusions. Which actually makes sense, because otherwise malicious software could e.g. read the list of excluded folders and just copies itself to any of the excluded folders and could never be detected. The only thing that can be done without Admin-privileges is to check if Windows-Defender is active at all. |
I have now reworked the start-up check dialog and the associcated preference page as discussed with @BeckerWdf and his college. Thanks again for your input. In general, as before, all of the following is only effective for users on Windows. If Windows Defender is active, on first startup of a new installation, the dialog poping-up after the UI startup has completed looks as follows: The usage of two radio buttons without a default selection is intentional to make the user aware it's a choice with two options. Clicking the link, opens the In the Clicking Clicking the In order to to strip down the dialog to the required minimum the option to disable the start-up check is now only presented in the preferences, while the option to skip the start-up check for the current installation was removed from the preference again. The latter was probably already chosen in the dialog shown at start-up or can be made again if Everybody interested, please let me know what you think. |
From #1453 (comment)
On this topic I now came to the conclusion that excluding the process is probably the better choice since it allows all eclipse files to be scanned in on-demand or scheduled scans and only disables real-time scanning at Eclipse execution. This also has the advantage that not only the start-up is speed up (where the jars of Eclipse are scanned) but the overall performance because files opened by Eclipse are not scanned too, regardless where they reside. Of course this assume that a user trusts the code of Eclipse and all installed plugins and the files read by eclipse cannot make Eclipse do malicious things just by being read. Please let me know if you think another choice should be made. |
I have just created eclipse-platform/www.eclipse.org-eclipse#123 for the N&N entry, which also just removes that paragraph. Users potentially affected will be informed through the dialog so I think it is not necessary to have a separate note about that. Please comment on the N&N PR if you think this could be handled differently. |
@HannesWell Will this appear in RCP applications? It's not something that I would want to display in our RCP app. |
If your product uses the |
It doesn't at the moment, it might do one day.
Perfect! |
I downloaded latest Eclipse SDK for Windows and clicked Yes to exclude. I checked in my Windows settings to see what had been excluded and it was the |
Thanks for trying this out and its great that everything worked. I have added some more context and links in #1453 (comment) |
@HannesWell Thanks for the comprehensive replies and information! 👍 |
Tested the scenario above with no success.
|
@HannesWell can you please help my colleague here? |
In this case I suggest to disable this start-up check 'user-wide' for all Eclipse based installations as described in If you don't want to do that through the UI or want to do it before the actual installation you adjust/create the settings file at
If this doesn't help, please create a dedicated issue for your problem. |
Thank you @HannesWell for suggestion. This way the problem sure can be solved, but is not applicable in case of new users: they just need to download an installer and hope the installer takes care of the situation. Instead, I applied the solution described in https://www.genuitec.com/docs/sdc/advanced-administration/advanced-installer-customization. This way, the installation-wide setting is written as an additional step of installation process. This solution does not involve any prior user configuration and acts at the install time, not runtime. |
Start-up slowdowns on Windows 10 or later due to the Windows Defender are a long standing issue in Eclipse (see Bug 548443 or microsoft/java-wdb#9) that is mentioned in the release notes for a while: https://eclipse.dev/eclipse/news/4.13/
💰 This contribution is a development issue founded by the Eclipse IDE working group to mitigate these potential startup performance problems on Windows.
This adds a start-up event handler that, if running on Windows and if the Windows Defender is active, shows a pop-up to inform the user about the potential to suffer start-up slow downs due scans by the Defender and to suggest to exclude the current installation directory from being scanned by the Windows Defender.
A user can decide to exclude the directories containing the bundles installed in the current eclipse, to skip the exclusion check for this or for all eclipse installations of the current user (the latter is persisted in the user-scope introduced with eclipse-equinox/equinox#446).
The script that is run to exclude the installation can also be shown and can be copied by the user:
This screenshot was done in an Eclipse launched from my development Eclipse, which consequently consists of bundles from many different locations (workspace, target platform with IU und Maven targets) and therefore a lot of directories would be excluded.
Additionally this extends the existing start-up preference page to allow the user to adjust settings for skipping the Windows Defender exclusion check at start-up for the current or all installations
or to run the exclusion check now by clicking on
Run exclusion check now
.This PR is a draft of the current state of the work. The open points are:
General
page (usually the first one that opens).This PR requires as prerequisite (as long as this is not submitted one has to check out that PR as well when reviewing this locally)
@vogella and @merks AFAIK you are working on Windows too, are you interested in reviewing this?
@HeikoKlare are you or some of your colleges working on Windows and are interested in a review too?
Of everybody else is also invited to review this.