-
Suggestion
-
Resolution: Done
-
None
Git v2.5.0 introduced uploadpack.allowReachableSHA1InWant, which allows fetching any commit from a remote repository as long as that commit is reachable from at least one ref. This can be useful for grabbing smaller subsets of large repositories at specific commits.
Since allowReachableSHA1InWant only allows access to commits reachable from at least one ref, it's not exposing any commits to which a remote client would not already have access; it just means they can fetch such commits directly, rather than having to fetch a ref (which may include a significant amount of unnecessary data in the resulting pack) and then checkout the desired commit.
- is related to
-
BAM-20737 Leverage Git servers that enable allowReachableSha1InWant for custom builds instead of always doing a full fetch
- Gathering Interest
- was cloned as
-
BSERV-10179 Enable uploadarchive.allowUnreachable, or allow configuring it to be enabled
- Gathering Interest
Bitbucket Server 5.5 enables uploadpack.allowReachableSHA1InWant for all repositories.
Enabling uploadarchive.allowUnreachable is a riskier, and therefore more contentious, change. Unlike uploadpack.allowReachableSHA1InWant, which only allows access to commits that are reachable from at least one ref (and can therefore be fetched, indirectly, anyway), uploadarchive.allowUnreachable allows access to any commit, including those which are not reachable. For some organizations, that may pose an unacceptable security risk. For example, consider the case where a developer pushes a commit which adds a clear-text password, or other piece of sensitive information, to a repository, and creates a pull request. One of their reviewers notes the issue, and so the ref and, for added safety, the entire pull request are deleted. However, until the offending commit is pruned from the repository, it would still be accessible to an archive request.
Rather than hold up the less controversial uploadpack.allowReachableSHA1InWant change, I have split out BSERV-10179 for the uploadarchive.allowUnreachable setting. Those who have use cases for that setting should comment on the new issue.
Best regards,
Bryan Turner
Atlassian Bitbucket