Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39,511
    • Issues 39,511
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,222
    • Merge requests 1,222
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #36662

You need to sign in or sign up before continuing.
Closed
Open
Created Nov 18, 2019 by Bob Van Landuyt@reprazentMaintainer

Forking public projects does not take repository feature availability into account

When forking a public project with the repository feature set to "Members Only", we leak the the repository when a user with access forks the project. In this case we create a Public project with the repository feature set to "Everyone with access".

Steps to reproduce:

  1. Create a public project with some code
  2. Mark the repository feature as "Members Only"
  3. As a user with access, fork the project to a different public namespace
  4. The code is now available to anonymous users in the fork.

Other things to consider:

Should we deal with this for existing forks when a project lowers the visibility level of the repository feature?

Proposal

  1. Constrain the list of acceptable values for ProjectFeature#repository_access_level in a fork, in the same way we used to do for Project#visibility_level: https://gitlab.com/gitlab-org/gitlab/-/issues/198519#note_319181207
  2. Copy the project_feature record from source to fork when forking (via Projects::ForkService)
Edited Apr 16, 2020 by Patrick Bajao
Assignee
Assign to
Time tracking