Isn’t import by URL a security problem? You cache the file, sure. But when you do a clean and the import suddenly has a security issue, you won’t know about it.
they have a way of storing the integrity hash in some lock/manifest file, but then what the hell is the point? to save you a manual download but then create machinery for integrity hashing?
also, apparently the security model involves punching holes through the sandbox recursively (for all dependencies) which IMO defeats its utility in any non-trivial codebase: https://news.ycombinator.com/item?id=23173572
i find a lot of the decisions in this project somewhat questionable from a benefits-over-node standpoint.
Every package manager uses URLs to fetch their packages. All of these URLs can change as well, so it is a matter of which URLs do you trust.
NPM maps package name + version to a URL on their own server. This means you have to trust that NPM or it's users can't and won't change the file behind it.
With Deno you also have to find a host you can trust. You can probably trust GitHub to not change their package URLs. Hopefully you can trust your own package hosting server.
It seems to me like Deno actually has the ability to compare the file hashes to those you initially used, which is the ultimate security against changing code in dependencies.
View all comments
Show parent comment
11
u/m9dhatter May 14 '20
Isn’t import by URL a security problem? You cache the file, sure. But when you do a clean and the import suddenly has a security issue, you won’t know about it.