169 points · by thunderbong · 3y ago · 86 comments
I was already skeptical of the product, having heard of it before. Unfortunately, attending that talk confirmed to me that they've just re-invented a severely limited version of Nix powered by yaml files that can output SBOMs in a standard format.
Their software repository only has around 500 packages vs the 80k+ in nixpkgs. When I read "Alpine Linux", I was immediately reminded of its use of the musl libc which has endless DNS resolution issues[1][2] in and outside of Kubernetes, however, thankfully, it seems like they realized bundling musl was a bad idea and ship glibc instead.
I'll stick to Nix and nixpkgs to build my reproducible container images with full dependency graphs back to the source code.
/ # apk update fetch https://packages.wolfi.dev/os/aarch64/APKINDEX.tar.gz [https://packages.wolfi.dev/os] OK: 9494 distinct packages available
We're definitely coming at this from a different angle from Nix, but the approaches are pretty complementary. I'm a big fan of all the work they do.
musl vs. glibc is one of the big departures we make from Alpine though, we use glibc everywhere because of those issues you pointed out.
I opened that apkindex file and it had duplicate entries for a ton of packages with different versions, taking a look at https://github.com/wolfi-dev/os I only see about 840 yaml files which I assume define the packages. I don't think claiming to have 10k packages when only 10% of them are actually different pieces of software is a good claim to make. Nixpkgs would have millions of packages if we added up every single unique package from every revision.
glibc explodes into a few dozen, for example.
My reading indicates that DNS resolution simply might not work in certain cases. This seems like a huge problem, yet Alpine Linux is widely deployed and I think Zig uses musl libc as well. In fact , every fully static binary I’ve seen (except for Go?) relies on musl.
For what it’s worth, I’ve seen DNS errors on Alpine (specifically I was getting EAGAIN), but I assumed this was unrelated to musl (and am still unsure). In general, I feel like I see a lot more transient networking errors on Alpine, and I wonder if this is related.
Edit: I also didn’t think DNS would be in libc, so I’ve got a lot to learn…
To summarize the issue: DNS is done optimistically over UDP because it's faster, but this doesn't work when DNS responses are large because of the design of UDP. TCP should be used as a fallback mechanism when responses are large. This is uncommon normally, but increasingly DNS responses are large in special scenarios; for instance when you're querying an internal DNS for service discovery (read: k8s or nomad deployments, most commonly).
Musl's maintainer interpreted the spec for a libc's resolver to not require TCP fallback (source: https://twitter.com/RichFelker/status/994629795551031296?lan...), so for a long time Musl simply didn't support this feature, justifying it as better UX because of the more predictable performance.
I don't agree with the maintainer on this interpretation, but I am glad the feature was added and the issue is no longer a concern as an otherwise very happy Alpine user!
RFC2181 specifically says 'Where TC is set, the partial RRSet that would not completely fit may be left in the response'
'may be' being the key words. This would mean that it's up to the implementation to decide whether to include any records at all, and many do not.
Edit: Hacker News link from last month:
should now be resolved (UDP fallback to TCP), even though it's arguable that this is actually rooted in issues elsewhere in the stack.
For an HTTP server replying with 200 OK instead of an 404 Not Found upon ENOENT, the situation is clear that this is not a client-side bug. The same should be assumed of DNS/NXDOMAIN.
[Previous comment](https://news.ycombinator.com/item?id=35058094): ---
My personal 'musl broke it' story comes from resolving domains from Cloudflare that use DNSSEC in a K8 cluster. Basically this:
- K8 sets container to use `ndot:5`, causing the search list to be used
- Musl walks that search list looking for domain
- Cloudflare does not set the NXDOMAIN flag on a DNSSEC domain but does include an NSEC record (if you query with the dnssec flag).
- Musl takes this 'NOERROR' reply and returns an EAI_NODATA.
Is Cloudflare wrong? I don't know, maybe. They say some things about the standards[0] and that it's technically 'right'. I don't see why they couldn't change the behaviour for queries without the dnssec flag, but I digress.The issue is that every other libc I tested will continue searching and actually resolve the domain. Musl is the odd one out, and _only_ in the case where the search list ends up with domain using Cloudflare and dnssec.
Even if Musl is 'right' here, when it disagrees with major implementations and a major DNS nameserver does it really matter?
There is no SBOM because I didn't bother publishing one but the way Nix builds derivations, you basically get the SBOM for free. You could use a tool like sbomnix[1] to trivially generate an SPDX-format SBOM from the nix derivation that builds the container image.
Edit: Since you mention swapping out base images, I think there is a misconception about how building images with Nix works. There is no such thing as a "Base" image, nix builds images from the Dockerfile equivalent of "scratch". You would ditch the Dockerfile completely and use only Nix to build the image.
It's almost the opposite of that in fact.
We (Chainguard) still represent most of the maintainers to Wolfi, but there are external folks too. We're going to need help scaling Wolfi to get it to where we want it to be, and that will require a real community.
We've also tried to be very clear on the business model for us, to avoid any "rug pulls" or "bait and switches" later. Here's some more context on that too: https://www.chainguard.dev/unchained/scaling-chainguard-imag...
We do fully intend for wolfi to be a community project, but it will take some time. We do say on the home page:
>What are the plans for long-term Wolfi governance? We intend for Wolfi to be a community-driven project, which means over time it will have multi-vendor governance and maintainers. For now we're focused on building the project and community, and will revisit this in several months when a community has formed.
https://www.google.com/calendar/event?eid=aWpydnZxc2VhaHBlMz...
> Wolfi is a Linux undistro designed from the ground up to support newer computing paradigms such as containers. Although Wolfi has a few similar design principles as Alpine (such as using apk), it is a different distribution that is focused on supply chain security. Unlike Alpine, Wolfi does not currently build its own Linux kernel, instead relying on the host environment (e.g. a container runtime) to provide one.
Is it possible to expand on this more? Why should I, a technical expert, use this over an already established distribution (Alpine)? What are good talking points I can bring to management / architects that would sell them on a switch?
Can you expand on what “supply chain security” actually means?
We're also more flexible on packaging extra software in Wolfi than other distros are, which has an effect on your overall supply chain security posture. We're aiming to package the entire Cloud Native landscape (to start!), so you can simply "apk add" anything you need, without having to drop back to "curl | bash" in your Dockerfile.
By making it easier for devs to get the software they need "the right way", they'll have a reduced need to work around the already existing secure distribution mechanisms built into their distros.
If you're already on Alpine and like it, that's great! If there are some packages you can't find in Alpine, or musl vs. glibc ever causes you issues, or you need SBOMs for some reason, give Wolfi a try!
Alpine is out of the picture for us because the guy that works on their security tracker just doesn't care, and responds half a year after filing an issue. The tracker itself is broken for over a year and the response was to basically rebuild our own package index and host our own security tracker.
So I would not say that Alpine has security as a high priority, even though in theory there are the secfixesdb.
Redhat Enterprise, Debian and Ubuntu are used because they provide an OVAL feed that are easily integrated with zero development overhead. So if compliance is your focus, I'd heavily recommend generating an OVAL feed when you're regenerating the secfixes json files.
Source: Am building a cross-linux-distro vulnerability database and I am scraping _all_ linux security trackers. [1]
I don’t think any other container images are strictly compliant with these standards - they’re not certified, but the technology stack (ECS, EKS, etc) is certified. Either way, if you can get this certified with different compliance platforms that would be a big selling point for B2B customers.
The images are very useful for other organizations working on FedRAMP or HIPAA though, even though we don't need to have those ourselves. We wrote a bit more about that here: https://www.chainguard.dev/unchained/fortify-comply-and-conq...
https://www.chainguard.dev/unchained/minimal-container-image...
[1]: https://github.com/GoogleContainerTools/distroless
[2]: https://github.com/tektoncd/pipeline/issues/5507#issuecommen...
Wolfi is its own upstream - packages are sourced and built directly from source, without another Linux distro.
The rest of the differences stem from here - we get more control over what we package and how, and are able to more quickly add new versions of packages, or roll out CVE patches.
It's not a traditional Linux distro you can actually run standalone, it's just another base for building OCI containers.
But regarding being a full linux distro, we're really just missing the kernel and I could see that happening at some point in the future.
Is this less an OS and more like a toolchain to build container images?
When you run Linux containers, you're using the kernel from the host, but everything else is provided in the container i.e. file system, utilities etc. So you can effectively run Debian or Alpine on top of a Arch kernel by just doing "docker run debian" etc. And now you can also do "docker run cgr.dev/chainguard/wolfi-base".
Whats wrong with current distros vuln assesment and security reporting to have another one?
If you "apt-get install nodejs", you can only have Node.js v18, in the very very recently released Debian bookworm. If your devs need Node.js v20, or even v22 which will both be LTS releases during the bookworm release cycle, you're out of luck.
You can go install those outside of the Debian package manager, but then you're on your own for vuln assessment and security fixes. Worse - many scanners don't actually even "see" packages that are installed outside of package managers, so you may not know that these exist or are installed.
We designed Wolfi to be more flexible around package versions. This is a very very hard problem to solve in general, but since we're focused on immutable containers, we can skip a lot of the complexity around conflicts, upgrade/downgrade scenarios, and cross-version compatibility.
It's going to be hard to scale, but we're going to at least try! We have a lot of ideas on how to make this work that I'm excited to try out.
As silly as it sounds, try running "snyk container test --print-deps" on that image, and look around for Node.
This approach works fine, but means that you might not be able to rely on most container security scanners to let you know when there's an issue.
So, this is not at all this, but now I wonder if a distribution like the one I imagined exists?
I'm also aware of (but haven't used) https://github.com/siderolabs/talos#readme
I just realized your question may have implied a desktop os, whereas Bottlerocket, Flatcar, and likely the others in this specific thread are server-side. I don't have much experience with trying to solve that problem on the desktop except for the horror-show that is snap
It's actually based on some ChromeOS update tools under the hood but is a regular Linux distro, just super minimal and designed to run containers.
We still work with them upstream on apk and apk-tools, and would be happy to collaborate on more tooling.
But we heard overwhelming demand for glibc support from customers. So we built a companion distribution for customers who needed to run GNU/Linux workloads, but still wanted to leverage the advantages of Alpine.
Paraphrased in jest from https://www.youtube.com/watch?v=_OEO79B-CZ4
Seems they use it to highlight it's not just distroless but also kernel-less[1].
[1]: https://www.chainguard.dev/unchained/introducing-wolfi-the-f... (last section)
Yeah, was just a silly connection I made to the sample used in the track[1]. From a documentary on LSD[2].
[1]: https://www.psydb.net/release/hallucinogen-the-lone-deranger...