About Copilot and code licences

Hi!
I have heard about GitHub Copilot and I thought “what a great tool for productivity” but then I thought “How is Copilot ensuring intellectual ownership of the snippets/code it copies from other projects”? Is Copilot respecting the legal text we are forced to reproduce in that code we copy from other projects? Especially from those with OpenSource licences?

How do you ensure we won’t get into legal troubles due to illicit copies of proprietary code?

Is Codepilot blatantly copying code with no permission? If no. Who are we notified about others importing our code?

Thank you in advance!