Could someone also write bad code and commit it using someone else's email address in the commit message, thus making the commit link to the other person's Github profile? (Sort of the reverse problem -- "giving blame" instead of "taking credit")
https://android.googlesource.com/platform/packages/apps/Glob...
Discussed in https://news.ycombinator.com/item?id=17487441
Note that git already provides a way to mark a commit with someone else authorship, but in that case you remain as the "original author" of the commit, usually shown as "X authored commit of Y". I sometimes use that when I need to push other coworkers code for whatever reason, or when you start a codebase from an old project files that weren't versioned (so that you are not the author of all the atrocities of the old code ;)
There are many practical impersonation vectors. I assume Github is gonna have to require signed commits for profile links in the medium term future.