I am not a lawyer, but I’ve read this one article:
http://copyright.nova.edu/safe-harbor/
...and I think that if GitHub allowed them to post the content in the first place (ie it’s at the direction of the user, not GitHub’s moderators) and then when a red flag became known to them (for example via publicity) and they used common sense to ban that one repo, they would not lose their safe harbour they’d in fact be acting in accordance with it.
But like I say, I’m no lawyer.