The easiest way to prevent this is to block Google from seeing user profiles by requiring login to see the profiles.
googlebot adheres to robots.txt, right?
in which case couldn't self-hosted gitlab admins add a robots.txt entry for the profile page url?
Nobody views snippets and user profiles as a common part of daily development, so it takes time away from development to investigate those things to prune them. And if you don't prune it fast enough, it gets into the search results at which point it's even more of a pain in the ass to remove (even using Google's webmaster tools).
Isn't then the problem not that it is viewable but that it's not excluded from indexing by robots.txt?
But even if you require login to post stuff to the issue tracker, creating a login and posting a comment has been trivially automated.
You're no longer running a useful issue tracker, you're running a free ad network: you're hosting a dozen useful issues and a thousand advertisements and blackhat SEO comments for spammers.
If it's not visible to search engines, and your repo doesn't get much traffic, it's not nearly as valuable to spammers. It's kind of like cutting off your nose to spite your face, but those basic economics of cost to spammers, cost to users, value to spammers, and value to users are the only rules that you can really apply when hosting content on the Internet.
Isn't this what various CAPTCHA tools handle?
You can also require email address validation.
2. Create spam content (snippets, profile, etc.)
3. Get spam content search indexed
4. Profit