Repository navigation
Conversation
A repository renamed or transferred on its code hosting platform keeps answering at the old path through a redirect. Comparing url without following it makes such a project look like a technical fork of itself.
Lets a project declare the repository locations it endorses, so parsers can tell its own mirrors from technical forks. The key is read only from the publiccode.yml at url, and a listed repository counts only if its own publiccode.yml points back, so neither a clone nor the listing project can claim a location on its own. Refs publiccodeyml#293
|
@lsmith77 is attempting to deploy a commit to the bfabio's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #293.
Many projects live on more than one forge, for example GitHub mirrored to a self-hosted Forgejo such as code.overheid.nl. A mirror carries the same
publiccode.ymlwith aurlpointing elsewhere, so parsers skip it as a technical fork, and a project has no way to say the mirror is its own. This PR lets the project declare its mirrors.Authority stays with
url, as @bfabio asked in the issue:mirrorsis read only from the file aturl, and a listed repository counts only if its own file points back. The key is optional; parsers that do not know it see a technical fork, as today.What a listing means.
mirrorstells parsers that a repository is the project's own copy rather than a technical fork, and records that the project endorses it. It does not say the mirror is in sync. A mirror hours or even days behind is normal; one that stays behind for long should be removed, and one that is ahead ofurlhas diverged. Checking that means comparing the repositories themselves, which is beyondpubliccode.ymland its parsers.Security
The main risk is identity takeover: catalogs attach a project's history to its
url.mirrorscounts only in the file aturl.publiccode.ymlcannot be claimed..git, trailing slash) to slip past a comparison.Not covered: whether a mirror serves the same code (see above; comparing commit hashes checks that, as @bfabio noted), and compromise of the repository at
urlitself, which every key already trusts.Edge cases
urlis the public repository, where the software is published. The internal instance is not listed, since nobody outside could check it and listing it would publish internal host names.deprecated, so references still resolve. It counts only if a parser confirmed it while it was reachable, and that confirmation outlives it. Removing the entry revokes it.Trade-offs
url. A failed fetch changes nothing; the parser keeps the last known result and retries. A repository never confirmed as a mirror is a technical fork, as today.organisation/urialready does ("depends on the implementation and policies of the platform consuming the file").Further adversarial reading is very welcome: these cases came from several rounds of trying to break the rules, and there are likely more.
Out of scope: forge migrations, where
urlitself changes; describing what a mirror is for (backup, development, contributions); multi-repository projects (#169).Rationale: Sanctioned Mirror Declarations.