An issue has been discovered in GitLab CE/EE affecting all versions starting from 13.2. When querying the repository branches through API, GitLab was ignoring a query parameter and returning a considerable amount of results.
{ "binaries": [ { "binary_version": "8.5.8+dfsg-5", "binary_name": "gitlab" } ] }