Project security
To prevent potential security risks, GoLand lets you decide how to open a project if you're not sure about its source. GoLand warns you about tasks or configurations that will be executed during the opening process and lets you configure sources that you can trust.
note
You can configure trusted locations to automatically load projects from particular directories.
When you open any project, GoLand immediately lets you decide how to handle a project that contains 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 Untrusted project](https://resources.jetbrains.com/help/img/idea/2024.3/go_untrusted_project_first_open.png)
When you try to open a project from an unknown source for the first time, GoLand displays a warning and lets you decide how to proceed.
You can select one of the following actions:
Preview in Safe Mode: in this case, GoLand opens a project in a "preview mode" meaning you can browse the project's sources, but it might be unsafe to execute any tasks or goals, build, or run your project.
GoLand displays a notification on top of the editor area, and you can click the Trust project link and load your project at any time.
Trust Project: in this case, GoLand opens and loads a project normally. That means build scripts are executed, project's plugins are resolved, dependencies are added, and so on.
Don't Open: in this case, GoLand cancels the action.
note
Select the <html>Trust all projects in <b>''{0}''</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.
If a project you are planning to open was created on a different machine and contains the .idea directory, GoLand opens it in the IDE automatically as if you chose the Preview in Safe Mode action. GoLand doesn't execute build scripts, resolve project's plugins, or add any dependencies. However, you still can browse the project's sources and open them in the editor.
GoLand also displays an editor notification stating that the project is untrusted.
If you trust the source, click Trust project and load it.
In this case, GoLand loads the project, resolves plugins, adds the necessary dependencies, and so on.
You can also add the source to the trusted locations, so the next time you open your project, GoLand will trust it implicitly.
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, GoLand 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.
You can configure what sources GoLand should consider safe and load such projects automatically during the opening process.
You can add your home directory to the trusted locations to disable GoLand'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, GoLand will implicitly trust it.
Thanks for your feedback!