We Are Forking dotenvy into dotenv-ng

The SecretSpec team has released dotenv-ng 1.0, a Rust implementation for loading and rendering .env files, forked from dotenvy after a parser bug corrupted secrets containing dollar signs. The fork addresses dotenvy's maintenance gap and adds improvements like literal dollar signs by default, a source-aware parser, and validation before environment mutation. dotenv-ng is now used in SecretSpec 0.20.
A migration tool cannot require users to recognize and escape parser syntax inside their secrets.
- threecheese
Am I weird or old-fashioned for relying on direnv over .env? These days my projects use a lot of different tech, and it just feels weird to me to have them all parsing .env files and hoping everything works. Especially with inference provider tokens basically connecting my checking account to the internet.
- hinkley
> But migrating away from .env starts with reading it correctly.
We had a system that mediated all access to the static config through an in-house library. Because nobody touched the environment-specific data directly, it was a convenient spot to layer on reloadable configuration from a Raft source, and fold in environment-specific secrets coming through an old 12 Factor solution, although we could have also integrated some other secrets management as well.
Or, left it as a separate API. That tends to work for tired and distracted people well. Having security related stuff use a unique code pattern to access it does, I find, help keep people from treating it all the same way they treat other data, which is to throw it around profligately and occasionally write it to the logs. The moral equivalent to the guard over the missile launch switch versus the machine gun trigger. One of those has much more forgiving failure modes than the other.
It's the same problem 'capability' based systems frequently run into - capabilities end up meaning that if you can see something you're entitled to use it. And when your coworkers add new features to the system, you end up accidentally being able to see things you shouldn't be able to see.
Java for instance ran into this rather frequently with theirs. Someone would add an object to the global state and not notice that some peer added a reference to a reference to that object with proprietary data the client code wasn't meant to have at all. In […]
- yoyohello13
Maybe this is a dumb question but what does -ng mean? I see a lot of forks seem to follow the <project>-ng naming convention.
- a1o
What does the ng at the end means? I have seen a few products/projects that added it and no explanation of the meaning.
- drdexebtjl
Can’t you just escape the dollar sign?
If you really believe .env was a mistake (it was), just let it die. You are the ones keeping it alive now.