Not only ‘bad practice’ but Disallowed (unless someone has a better link)
OpenAI's "bring your own key" policy - #2 by ishant.singh.
If your system is compromised the damage could be significant…
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety

