Earlier quoted context omitted.
If you care about security, you should evaluate your dependencies. This preferably means reading the code you're pulling in but it's unrealistic that we're going to read 2000 constantly changing dependencies for every deploy, so you need to establish trust some how. Reputation of maintainers, dep CVE scanning, SAST and protective monitoring can all add additional assurance, but they won't protect you from a random hi…
I used to have all npm modules in source control (SCM), until npm introduced tree shaking. I'm using ZFS which have both de-duplication and compression, so I gain very little by tree shaking. I wish there was a way to disable tree shaking in npm, it's really the source of all evil. Anyway, I reviewed all code diffs after each npm update, very little changed, eg. it wasn't that much work. But it's now impossible as np…
Pika/web: Web Apps Without the Bundler
81–85 of 85 posts
Re: Pika/web: Web Apps Without the Bundler
#82Earlier quoted context omitted.
I disagree that it's the job of a random ops person to ensure that a developers dependencies are sane. Putting the onus on the developer to do a good job with regards to secure development practices is an essential part of a wider system.
Oh I agree with that completely, but it’s very easy for developers to get away with shitty practices in a lot of shops.
Re: Pika/web: Web Apps Without the Bundler
#83Browserify does one thing and does it very well.
I still would like to not have to use any of these, however.
Re: Pika/web: Web Apps Without the Bundler
#84Earlier quoted context omitted.
That never really works out in practice So glad this was such dominant practice and advice for the last 10 years. I wonder for how many of those influential practictioners have known it's more of a lazy include than clever cache reuse. Cargo culting writ larger than most.
It really depends. I think CDNs are still great if you are making smaller content website with few libs for things like lightboxes, sliders etc. It works out better than bundling. There is much less complexity without build process. Many websites don't need too much JS and devs tend to overengineer them nowdays. If you are talking about products with lot of dependencies then of course but don't forget that bundler si…
I just checked, and googling "jquery cdn faster" brings up plenty of examples.
Re: Pika/web: Web Apps Without the Bundler
#85Earlier quoted context omitted.
> The real question is: do you -really- need an external lib with 20 dependencies just to show a freakin’ loading spinner? Remaking the wheel is bad but so is never making truly simple things yourself, or just not using them. So the problem is the sheer number of dependencies? What is a reasonable upper limit? Yes, javascript should continue to standardize commonly used features, but avoiding dependencies doesn't see…
From a security perspective, minimising dependencies is preferred. I have to review at least monthly all our dependencies for published vulnerabilities and new versions. We don’t allow automatic upgrading of packages/dependencies due to the risk of malicious code making it in (see https://www.npmjs.com/advisories for examples). Yeah there are companies that will help manage your vulnerability process but it’s still a…
Off-topic, but can you write about how you manage this without tons of manual work?