News for hackers. Stuff that matters.
Re:Show HN: Zero – A fast, zero-configuration server for Rea... by q3k on Tuesday February 26, 2019 @11:05AM (#19255372)
Because if you ever have a broken upload system that allows you to drop a JS file somewhere accessible by the file system routing, you have remote code execution. Additionally, you now have to write guards in every non-endpoint JS file so that it doesn't get executed just by a misplaced HTTP request.

And as for automatic dependency resolution, this means you're not even aware of what transitive dependencies you're pulling in, what version they are and have no way to vet anything - everything is hidden behind a wall of magic.

Re:Show HN: Zero – A fast, zero-configuration server for Rea... by adrusi on Tuesday February 26, 2019 @11:34AM (#19255723)
Make your application directory read-only to the user running the application, as it ought to be anyway.

Automatic dependency resolution however... Fantastic for experimentation, but that's a dealbreaker for production. Maybe it would be OK if it actually wrote the package-lock.json to the application directory, I'd have to think about that.

Re:Show HN: Zero – A fast, zero-configuration server for Rea... by SahAssar on Tuesday February 26, 2019 @12:48PM (#19256574)
In this case the application also tries to auto-install dependencies, so making it read-only removes one of the stated features.

I think this framework hasn't been written with security in mind at all.

Re:Show HN: Zero – A fast, zero-configuration server for Rea... by adrusi on Tuesday February 26, 2019 @03:01PM (#19257831)
Whatever it's doing, it's not writing the packages into the application directory.
Re:Show HN: Zero – A fast, zero-configuration server for Rea... by SahAssar on Tuesday February 26, 2019 @04:20PM (#19258388)
If it can write to the applications dependencies isn't that as good as writing to the application?