From 227ca5abc177ee38784cd3b595d5e53d9735e34d Mon Sep 17 00:00:00 2001 From: Mattt Date: Tue, 4 May 2021 05:28:21 -0700 Subject: [PATCH 1/2] Add .swiftpm/config to default .gitignore As discussed in SE-0292, a user may inadvertently reveal the existence of a private registry or expose hardcoded credentials by checking in their project's .swiftpm/config file or directory. By adding this entry to the .gitignore file in the new project template, we significantly minimize the possibility of the user leaking credentials in the future. --- Sources/Workspace/InitPackage.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Workspace/InitPackage.swift b/Sources/Workspace/InitPackage.swift index 5f62172e11c..152f95461d1 100644 --- a/Sources/Workspace/InitPackage.swift +++ b/Sources/Workspace/InitPackage.swift @@ -260,6 +260,7 @@ public final class InitPackage { /*.xcodeproj xcuserdata/ DerivedData/ + .swiftpm/config .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata """ From 33256164edf5223516250aea505239ff5ee84a7a Mon Sep 17 00:00:00 2001 From: Mattt Date: Mon, 28 Jun 2021 09:08:15 -0700 Subject: [PATCH 2/2] Ignore .swiftpm/config/registries.json --- Sources/Workspace/InitPackage.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Workspace/InitPackage.swift b/Sources/Workspace/InitPackage.swift index 152f95461d1..cc3c98e3f8c 100644 --- a/Sources/Workspace/InitPackage.swift +++ b/Sources/Workspace/InitPackage.swift @@ -260,7 +260,7 @@ public final class InitPackage { /*.xcodeproj xcuserdata/ DerivedData/ - .swiftpm/config + .swiftpm/config/registries.json .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata """