▲ | clbrmbr 3 days ago | ||||||||||||||||||||||
Is it typical in the JS space to include dependencies without versioning? Also, curious: does freezing a version really provide much protection? Shouldn’t a commit hash be used? (Attacker can change a tag.) | |||||||||||||||||||||||
▲ | naugtur 3 days ago | parent | next [-] | ||||||||||||||||||||||
packages published to npm are immutable. if you pin a version, you get the same exact version as long as MSFT servers are not compromised. Installing from git is not recommended and has more issues than you might think https://dev.to/naugtur/a-phish-on-a-fork-no-chips-52cc You are supposed to update packages, even if you use lockfiles (very common) or tools that pin your direct dependencies (renovate etc. not so common) And when you do update, will you read the package and all of its updated dependencies? It's a hard problem with a bunch of tradeoffs. Can be done, with enough attention and tools. Tools include LavaMoat :) | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | vel0city 3 days ago | parent | prev [-] | ||||||||||||||||||||||
The package-lock.json includes a hash of the package, not just a version number which should be immutable. | |||||||||||||||||||||||
|