Earlier quoted context omitted.
Github only sets their cookie for "github.com". What I'm suggesting is that they set multiple http-only cookies: one for "github.com", one for ".github.com", another for every subdomain you access -- "pages.github.com", etc. If there's already an http-only _gh_sess cookie for every subdomain I can put scripts on, I won't be able to shadow it with my own _gh_sess cookie.
You can shadow other httponly cookies too. Any cookies.
[1] http://security.stackexchange.com/questions/12412/what-cooki...