If the source code is publicly accessible, it seems ipso facto legally infeasible to assert closed source license terms up in it. That's not to say that the terms could not prohibit compilation, interpretation, and other forms of machine execution. But the source is open by the author's choice when the terms and conditions of Github are accepted.
That doesn't seem to be a complicated case and I'm not sure what would be different with hosting the code on github under a weird licence "read but no other use".
The bigger point is [IANAL] that "open source" only has legal relevance in regard to concepts like trade secrets (a common connotation of "closed source") where revealing the source code might be subject to tort. Any rights that others have derive directly from copyright law and the way in which the rights holder decides to assert their rights.
Putting something in a public Github repository makes it open source, but "open source" is mostly a common language phrase not a term of legal art.
The term "open source" does have an official definition[0]. It doesn't mean what most people think it does and that is one of the reasons Richard Stallman has criticized it[1].
[0] http://opensource.org/docs/osd
[1] https://www.gnu.org/philosophy/open-source-misses-the-point....
Carving public domain source code out of the definition of "Open Source" is the sort of thing trade bodies do. But it's something that one can argue before a judge. The copyright status and license are all that matters.
That means absent an open source license you cannot "copy" (as distinct from "view") or create a derivative of that work.
"Open source" does not refer to the code being publicly viewable (Microsoft tried to pull that one a decade ago).
Open Source licenses are licenses because the copyright holder retains copyright. The reason there are terms is because the works are not in the public domain.
Remember, that in the US [other countries may differ] fair use is a cornerstone of copyright law.