top | item 40791679

(no title)

stiiv | 1 year ago

dotenv has zero npm dependencies. dotenvx has 21, including a few I have never heard of. Is this really more secure?

discuss

order

iamsaitam|1 year ago

This is quite a common remark when it comes to Javascript. I rarely see the same being made about Rust libs, which also rely heavily on external dependencies.

stiiv|1 year ago

Justifiably! Supply-chain attacks have occurred via npm, and have been widely reported. A lack of oversight and lack of standard libraries are often cited as the cause.

I don't know if it's a problem for Rust (or other platforms like Python, .NET, or Java afaik).

As someone who primarily writes TypeScript to run in browsers and on node.js, this kind of threat requires an extra level of vigilence, and often nudges me toward writing my own things rather than importing them.