Answer the question
In order to leave comments, you need to log in
How can Node.js protect process.env from being read by 3rd party npm packages?
Very often, all sorts of settings, such as connecting to databases, are passed as environment variables. But any third party script can read process.env . How to protect yourself from this?
Answer the question
In order to leave comments, you need to log in
Run the application under it by the created user, making the config file available only to this user.
At the beginning of index.js (before the first require) copy process.env and replace it with an empty object)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question