Re:Deno 1.9
by tlrobinson on Wednesday April 14, 2021 @12:11AM
(#26802855)
Integrity checking & lock files https://deno.land/[email protected]/linking_to_external_code/int...
The same problem (and solution: package-lock.json or yarn.lock) exists in npm if you use semver version specifiers, or npm itself could be hacked, it’s just a bit more acute in Deno since it’s easy and common to load files from arbitrary hosts that don’t enforce immutable versions.
Re:Deno 1.9
by nikisweeting on Thursday April 15, 2021 @10:10AM
(#26820712)
npm has a lot more to lose from being hacked than some random URL, I trust npm with my packages because they fix stuff when something like left-pad happens, the same is not true for every URL I'd have to import to build a deno package.
Re:Deno 1.9
by dkdbejwi383 on Wednesday April 14, 2021 @03:18AM
(#26803974)
> In npm we at least know that a package is immutable once published, someone could publish a malicious version as a newer release but a current release.
This is only true as long as you trust NPM. If they were hacked or taken over by a malicious actor, packages could be modified unbeknownst to you.
Re:Deno 1.9
by felixfbecker on Wednesday April 14, 2021 @05:33AM
(#26804796)
No they could not. Because your package-lock.json contains integrity hashes that are verified during installation.
If a server gets hacked those TS can be replaced with malicious versions.
In npm we at least know that a package is immutable once published, someone could publish a malicious version as a newer release but a current release.
Does demo generate some type of file that keeps a hash of all downloaded imports to verify against the next time those imports are downloaded?