AFAIK the only thing that's straight up illegal to look at in the USA is child porn.
You can read bomb-making instructions, for heaven's sake. You can certainly look at this code. Just don't base a product on the ideas you got from looking at it.
Are there any verbatim copies of the original in your project. Did you sign an enforceable ip ownership or non-compete agreement with GitHub about trade secrets learned while working on their source code?
If the answers to those questions are no, there is a very long, very steep, uphill battle facing GitHub.
Legality aside, the clean-room FOSS projects won't like your contributions if you have been exposed to the respective leaked source codes. From the top of my head, WINE requires this: https://wiki.winehq.org/Clean_Room_Guidelines
I'd love to study it but not if just viewing it is a gray area