News for hackers. Stuff that matters.
Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @08:53AM (#25455547)
Docker images should be treated the same way as you'd treat any library you use or any package you create.

Do you think Java .jars in Maven repos or .NET .dlls in Nuget are faring any better?

Find solid dependencies, don't use too many of them, make sure you update them, use static analysis tools and dependency scanners, etc. Same drill as for anything.

Re:51% of 4M Docker images have critical vulnerabilities by Frost1x on Thursday December 17, 2020 @09:44AM (#25455985)
>Find solid dependencies, don't use too many of them, make sure you update them, use static analysis tools and dependency scanners, etc. Same drill as for anything.

That's hilarious simply because most heavy Docker users I've interacted with basically use it as a way to build houses of cards which glue-sticked piles and piles of dependencies together rapidly.

This is largely because application complexity in some domains and expectations of development pace have ballooned to insanity but there are plenty of heavy Docker users that do this even when these sort of pressures don't exist.

I think as software progresses and more development techniques become easier to leverage and automated (correctly and incorrectly), we're getting to a point advanced statistical software packages have been at for quite some time: no matter what data you throw at the software for analysis and what analysis you choose, the software has so much experience baked into it that you'll get some result that makes assumptions what you're doing is valid that may look like reasonable outputs even if they aren't. If you do need to do some preprocessing, much of that is even automated so it's incredibly easy to do something very wrong if you dont know what you're doing but not realize it. Automation has made it much easier to fail late instead of fail early.

Re:51% of 4M Docker images have critical vulnerabilities by rhencke on Thursday December 17, 2020 @09:54AM (#25456074)
This was all achingly true well before Docker, though. (That's why Docker got popular, after all!)

Docker isn't the disease, its use in such manner is just a symptom.

Re:51% of 4M Docker images have critical vulnerabilities by evilduck on Thursday December 17, 2020 @10:21AM (#25456323)
The trouble is finding balance between simple DIY implementations or cobbling together a house of cards.

"Allow CRUD of names" ok, you'll have it next sprint. "Allow upload of their resumé docs" no problem, two more weeks. "Parse the docx and PDF files users upload and extract the contents and fill our db schema with relevant data". Well shit. The specs to understand either of those formats are gigantic and now I'm forced to cobble together something using more dependencies if you want it done in less than two year's time.

Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @10:33AM (#25456441)
Is it really that troublesome to strike a balance between implementing something yourself and using a library when the difference is two weeks versus two years?

If, for example, a file format is really complex, it has most likely one implementation that almost everyone uses. If there is a problem with it, you will hear about it. Use that.

On the other hand, if a file format is really simple or you only need a simple subset of it, rolling your own could avoid you getting 0-dayed when the most popular implementation has a vulnerability.

Re:51% of 4M Docker images have critical vulnerabilities by ComodoHacker on Thursday December 17, 2020 @11:32AM (#25457107)
>you getting 0-dayed when the most popular implementation has a vulnerability

vs getting hit when your vulnerable implementation becomes popular. Not an obvious choice indeed.

Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @11:57AM (#25457388)
> vs getting hit when your vulnerable implementation becomes popular.

Which is not going to happen, because there's no point in publishing something that is tailored to your specific purpose.

Re:51% of 4M Docker images have critical vulnerabilities by ivanche on Thursday December 17, 2020 @12:55PM (#25458130)
This reminds me of one Finnish student publishing some sort of OS kernel in 1991 or so which supported only his PC-compatible machine...
Re:51% of 4M Docker images have critical vulnerabilities by incrudible on Thursday December 17, 2020 @01:04PM (#25458277)
Of course, who could rule out that a crappy little domain-specific parser turns into a trillion dollar industry? One should let that remote possibility guide the decision making at all times.
Re:51% of 4M Docker images have critical vulnerabilities by neodymiumphish on Thursday December 17, 2020 @06:17PM (#25461796)
Can confirm: my whole home server / coworker collaborative setup is run from a Docker house of cards...
Re:51% of 4M Docker images have critical vulnerabilities by marcosdumay on Thursday December 17, 2020 @10:27AM (#25456384)
Hum... Docker automatically adds an entire OS as static dependency to anything. How does that goes with "not using too many dependencies" rule?

Also, good luck doing static analysis on binary tools.

There's an entire area of work people call "ops" that specializes on managing that dependency. But they can only do that if it's dynamic and loosely coupled.

Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @10:38AM (#25456506)
Ummm...

You make your own images, if you really care. You involve your "ops" people in that.

They manage the base images that are then used by your dev team. They're responsible for updating the base images.

Your dev team provides a CI/CD pipeline which the ops team can use to check that security updates don't break functionality.

It's not rocket science.

Re:51% of 4M Docker images have critical vulnerabilities by cle on Thursday December 17, 2020 @12:13PM (#25457573)
Docker doesn’t add anything as a dependency, you do. Use “FROM scratch” if you want to run a process with nothing but the Linux kernel. You won’t even get libc.
Re:51% of 4M Docker images have critical vulnerabilities by pjmlp on Thursday December 17, 2020 @09:49AM (#25456034)
They definitely are, because each jar/dll doesn't have the whole world inside itself.

Docker is like shipping EAR + Websphere + OS in one package.

Re:51% of 4M Docker images have critical vulnerabilities by oblio on Thursday December 17, 2020 @10:18AM (#25456302)
Yeah, I know, but you'd use the same mechanism for both.

For jars/dlls you look up dependency scanners and hook them up to your CI/CD.

For Docker images you look up image scanners and hook them up to your CI/CD.

Re:51% of 4M Docker images have critical vulnerabilities by thu2111 on Friday December 18, 2020 @07:25AM (#25466398)
Realistically a lot of Java apps are shipped as fat JARs that do in fact include the (Java) world.

Hot-patching apps to use newer versions of JARs because of security bugs, outside of the update stream of the actual app itself, is not really a good idea due to the risk of regressions. Docker has basically codified the failure of dynamic linking in the real world.