HACKER Q&A
📣 petergibbonsini

Do you trust GitHub Copilot with .env files containing secrets?


I notice GitHub Copilot will try to autocomplete when I am typing secrets into .env files.

As far as I understand GitHub Copilot works feeding an large language model with code available on the Internet, code in GitHub repos and potentially input text it gets from the GitHub Copilot extensions in the IDE

Is there a risk Copilot could autocomplete someone else's .env files with my secrets?

Do you trust GitHub Copilot with secrets in .env files?


  👤 chesterjosiah Accepted Answer ✓
Your .env file should never be seen by github. You should add your .env file to .gitignore