Skip to content

Commit 9158f9f

Browse files
committed
.swiftpm/config is now a directory
This change was made at the request of the Swift core team ahead of second review
1 parent c902204 commit 9158f9f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

proposals/0292-package-registry-service.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ OPTIONS:
535535

536536
Running the `package-registry unset` subcommand
537537
in the root directory of a package
538-
updates the `.swiftpm/config` file
538+
updates the `.swiftpm/config/registries.json` file
539539
to remove the `default` entry in the top-level `registries` key, if present.
540540
If a `--scope` option is passed,
541541
only the entry for the specified scope is removed, if present.
@@ -590,7 +590,7 @@ in descending order of precedence:
590590

591591
* The package manifest in the current directory (`./Package.swift`)
592592
* Any existing lock file (`./Package.resolved`)
593-
* Any local configuration (`./.swiftpm/config`)
593+
* Any local configuration (`./.swiftpm/config/registries.json`)
594594
* Any global configuration file (`~/.swiftpm/config/registries.json`)
595595

596596
### Changes to config subcommand
@@ -609,7 +609,7 @@ $ swift package config set-mirror \
609609
This proposal updates the `swift package config set-mirror` subcommand
610610
to accept a `--package-identifier` option in place of an `--original-url`.
611611
Running this subcommand with a `--package-identifier` option
612-
creates or updates the `.swiftpm/config` file,
612+
creates or updates the `.swiftpm/config/mirrors.json` file,
613613
modifying the array associated with the top-level `object` key
614614
to add a new entry or update an existing entry
615615
for the specified package identifier,
@@ -775,7 +775,7 @@ can both provide similar non-repudiation guarantees.
775775

776776
A user may inadvertently reveal the existence of a private registry
777777
or expose hardcoded credentials
778-
by checking in their project's `.swiftpm/config` file.
778+
by checking in their project's `.swiftpm/config` directory.
779779

780780
An attacker could scrape public code repositories for `.swiftpm/config` files
781781
and attempt to reuse those credentials to impersonate the user.
@@ -812,7 +812,8 @@ is logged as `https://***@swift.pkg.github.com`).
812812
### Denial of service
813813

814814
An attacker could scrape public code repositories
815-
for `.swiftpm/config` files that declare one or more custom registries
815+
for `.swiftpm/config/registries.json` files
816+
that declare one or more custom registries
816817
and launch a denial-of-service attack
817818
in an attempt to reduce the availability of those resources.
818819

0 commit comments

Comments
 (0)