In my company, we decide the following solution for you. In the configuration file, we associate sections with "secret" values in external configurations. External configurations are in source control. At first it wasn’t, but after a problem, when our build server lost the disk, we decided it was safer to store it in place with backup. The folder in the source control (it can also be on the file server) is really limited to reading and writing only to those who need it. Create a project folder to verify the process and add a configuration folder and build. After the assembly "Configuration" is removed. Access to the build server is also limited.