Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: _parseVault() doesn’t respect processEnv option. #776

Open
jaswrks opened this issue Oct 4, 2023 · 3 comments
Open

Bug: _parseVault() doesn’t respect processEnv option. #776

jaswrks opened this issue Oct 4, 2023 · 3 comments

Comments

@jaswrks
Copy link

jaswrks commented Oct 4, 2023

If I call _parseVault() with processEnv option, it makes no difference because internally _parseVault() makes another call to configDotenv(), and it only passes that helper the path option, not processEnv. Therefore, it always writes to process.env, even if you tell it not to.

Problematic line:

const result = DotenvModule.configDotenv({ path: vaultPath })

@jaswrks
Copy link
Author

jaswrks commented Oct 4, 2023

Also, it would be wonderful if dotenv-vault exported a parse() method of its own. The underscore prefixes suggest these were meant only for internal use, and yet there’s no other way to parse, because dotenv-vault doesn’t expose that method, only config().

@jaswrks
Copy link
Author

jaswrks commented Oct 4, 2023

Oh, I see. That's configuring the environment variables inside the vault itself. Well, it still seems less than ideal to leak those out whenever processEnv is passed through to explicitly state not to pollute process.env.

@motdotla
Copy link
Owner

motdotla commented Nov 2, 2023

They are encrypted so it's not a leak per se, but I think the spirit of what you are saying is right @jaswrks. Feels dirty.

Will take a look at filtering those out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants