Project security
To prevent potential security risks, WebStorm lets you decide how to work with a project if you're not sure about its source. WebStorm warns you about tasks, File Watchers or webpack configurations that will be executed and lets you configure sources that you can trust.
tip
Projects created from the Welcome screen or via File | New | Project as described in Creating projects are automatically considered trusted.
note
You can configure trusted locations to automatically load projects from particular directories.
When you open a project that was created outside WebStorm and was imported into it, WebStorm displays a dialog where you can decide how to handle this project with unfamiliar source code.
Every time you open a project for the first time, the IDE shows the Trust Project dialog. This helps to ensure that the project is safe to perform the following actions:
![Untrusted project warning Untrusted project warning](https://resources.jetbrains.com/help/img/idea/2024.3/ws_webpack_project_security_warning_2021_3_1.png)
You can select one of the following actions:
Preview in Safe Mode: in this case, WebStorm opens the project in Safe Mode, meaning you can browse the project's sources, but there are restrictions in executing any tasks or scripts or running/debugging your project.
tip
If you stay in Safe Mode, WebStorm will not show extra notifications for other potentially dangerous features in your project. For more information, refer to Safe mode preview limitations.
WebStorm notifies you about Safe Mode on top of the editor area. You can click the Trust project link and load your project at any time.
Trust Project: in this case, WebStorm opens and initializes the project, resolves project plugins, adds dependencies, and enables all WebStorm features.
Don't Open: in this case, WebStorm cancels the action.
note
Select the <html>Trust all projects in <b>'<path>'</b> folder checkbox to trust the directory from which you are trying to open the project. Next time you open a project from that directory, it will be opened and loaded automatically.
When you open a project created on a different machine, it might contain some scripts or tasks that are executed during the opening process. If such tasks are found, WebStorm displays a notification suggesting that the code you are about to execute might be harmful.
You can review what tasks will be executed and modify the settings.
In the Settings dialog (CtrlAlt0S) , go to Tools | Startup Tasks.
On the Startup Tasks settings page, you can review and modify the startup tasks.
If you open a project in Safe Mode, the following limitations will apply:
Startup tasks: any scripts or tasks that are executed during the opening process are disabled.
VCS support: VCS support is fully disabled.
File Watcher scripts will not wake up and run corresponding tools.
npm, pnpm, and yarn scripts will not be executed.
You can configure what sources WebStorm should consider safe and accordingly load them and run File Watchers or webpack configurations without showing the notification.
You can add your home directory to the trusted locations to disable WebStorm's warnings about untrusted projects.
In the Settings dialog (CtrlAlt0S) , go to Build, Execution, Deployment | Trusted Locations.
On the Trusted Locations settings page, specify the local directories that the IDE should trust. Click OK to save the changes.
The next time you open a project from one of those locations, WebStorm will implicitly trust it.
Thanks for your feedback!