▲ | mort96 5 days ago | ||||||||||||||||
Surely you'd achieve the same thing by making people manually enter a new version number? I'm not inherently against the idea of specifying a hash, it would protect against NPM hosting infrastructure being compromised, but again, that's not what we're seeing here | |||||||||||||||||
▲ | __MatrixMan__ 5 days ago | parent [-] | ||||||||||||||||
If you end up with bits that hash to 0xabc123 and I end up with bits that hash to 0x456def and we both think we installed fooapp version 7.8.9, there's nothing about the version number that tells us which one of us has been hacked. But if we both attempt to install 0x456def, it's clear that whoever has 0xabc123 is in trouble. This is especially important in cases where you might need a package while you're on a separate network partition than npm. Any peer can provide it and you know it hasn't been tampered with because if it had been it would have a different hash. | |||||||||||||||||
|