Is it possible to disable sbt 1.x server?

Some of my builds and plugins use personal deployment credentials (sometimes they are read from the file system, sometimes they are entered and stored in memory through InteractionService).

Although this may be overly complex, I try to minimize the attack surface of software that uses confidential information, and it feels like poor hygiene to run the server, even on a local host or UNIX socket, without the need for these assemblies.

I was looking for a parameter that could be set in a plugin that would disable the server starting if it was not canceled by the assembly. So far, nothing of the kind has been found. Is there such a setting?

Many thanks!


Update: With Eugene Yokota, starting with sbt 1.1.1, a logical installation now exists autoStartServer. Build and plugins can prevent the server from starting by installing autoStartServer := false. (Users can still manually start the server by starting startServerif they wish.)

+4
source share
1 answer

At least starting with sbt 1.1.0, the server will not start unless you start the sbt shell, which means that if you run sbt in batch mode (for example sbt test) in the CI environment, it won. You have a server.

, JVM sbt.server.autostart. , sbt sbt -Dsbt.server.autostart=false . , SBT_OPTS.

, :

> startServer

: , autoStartServer , ~/.sbt/1.0/global.sbt:

// This is so it works on sbt 1.x prior to 1.1.1
SettingKey[Boolean]("autoStartServer", "") := false
+3

Source: https://habr.com/ru/post/1693104/


All Articles