I do believe there is a legal liability here on the person using the tool, but not on GitHub.
GitHub would only need to remove the 'auto-insertion' of the code to get around any liability. Then, it would be on YOU if you chose to copy-paste their provided suggestions into your own code.