this post was submitted on 15 Apr 2025
0 points (50.0% liked)

Programming

19710 readers
196 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
top 10 comments
sorted by: hot top controversial new old
[–] cr1cket@sopuli.xyz 17 points 1 week ago (2 children)

Oh wow.

That looks like an overly complicated solution to a problem that doesn't exist. Synching stuff that is in git? Why not just use.... git? Also npm.... and the example has an env var named "DB_PASS" in it. You never put passwords in version control.

It is generally considered a bad idea to use envs for passing secrets in general since envs for process n are available to other processes which have access and permission.

[–] TheCommieAxolotl@programming.dev 1 points 1 week ago* (last edited 1 week ago)

Exactly, you never check passwords into version control. So what happens when you need to share those values with other team members? The github example is not to put a .env file into a repo but to add the secrets to github’s native secret manager, which is what products like actions use to read envs.

[–] Boomkop3@reddthat.com 9 points 1 week ago

Environment variable abuse

[–] mehdi_benadel@lemmy.balamb.fr 7 points 1 week ago

Waiting for the leak announcements

[–] bizdelnick@lemmy.ml 4 points 1 week ago (1 children)

The best way to manage environment variables: don't use environment variables.

[–] PolarKraken@programming.dev 6 points 1 week ago (1 children)

What do you do instead for dynamic values that are needed at runtime and inappropriate to check in to version control?

[–] bizdelnick@lemmy.ml 1 points 3 days ago

I'd rather prefer CI-level variables (macros?) that are not exported to the environment. Unfortunately, most CI developers don't care about security.

[–] Corbin@programming.dev 3 points 1 week ago

Nah, just use direnv instead, comrade.

[–] chonkyninja@lemmy.world -3 points 1 week ago* (last edited 1 week ago)

Lmao, use Nix instead, or if that’s too complicated use DevBox.

Also, nobody with more than 0 brain cells will pay for this trash.