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")

Now you're thinking like the author of git-blame-someone-else: https://github.com/jayphelps/git-blame-someone-else