Baking Security into the Toolchain: Accurate Swift SBOMs with Apple's Ev Cheng and Sam Khouri
Intro Music & Promo Soundbyte (00:00)
“External tooling has a fundamental disadvantage. It's always working with less information than the build system has. The build system is the source of truth. Anything outside that has to reconstruct the picture, and reconstruction is inherently lossy. If you build tooling into the canonical toolchain, though, any developer who builds their project gets the capability automatically. That's a huge multiplier for security outcomes across an ecosystem.”
Sally (00:23)
Hello, hello, and welcome to What's in the SOSS, the OpenSSF podcast focused on ingredients, challenges, and solutions for making OS more secure. I'm your host today, Sally Cooper, Marketing and Communications lead for the OpenSSF. And today I'm joined by some very special guests, Ev Cheng and Sam Khouri, lovingly referred to as the Swift SBOM folks at Apple.
Ev, Sam, welcome to the show. Let's start with the basics because our audience spans everyone from seasoned security architects to developers who've been told you need to care about SBOMs now. And we're still figuring out what all that means. Ev, can you just level set us what is an SBOM and why is 2026 the year everyone suddenly has to care?
Ev Cheng (01:16)
Thanks for having us. So, an SBOM, a software bill of materials, is fundamentally an inventory list. It's structured, it's machine readable, and it's a document that says here are all the components that went into this piece of software and how they relate to each other. The analogy I like is the ingredient list on food packaging. When you pick up a box at the grocery store, you don't have to guess what's in it.
Regulators decided that transparency was a baseline right for consumers. We're at that same inflection point in software. Governments, particularly the US Executive Order on Improving the Nation's Cybersecurity from 2021 and the EU Cyber Resilience Act, have started requiring SBOMs for software sold into critical sectors. So it's shifted from a nice to have to you may legally need this.
Sally (02:10)
Ah, thanks, Ev. And from a pure security standpoint, beyond compliance, what’s the actual threat model? And why do security engineers care?
Ev Cheng (02:22)
The core problem is that modern software is mostly composed, not written. When Log4 Shell hit in late 2021, the hardest part for most organizations wasn't actually patching. It was finding out whether they were even affected. So that was asking questions like, which of our products use Log4J at what version, directly or transitively? That's a question that an SBOM answers in seconds. Without one, teams were manually auditing code bases for days or weeks.
SBOMS are the foundation for everything else in supply chain security. You need SBOMS to vulnerability match with databases like the NVD or OSV. You need SBOMS to check for license compliance, export controls, and dependency auditing. None of those workflows work well without the inventory layer underneath them.
Sally (03:12)
Sam, you come from this from the build tooling side rather than the security side. When did SBOMS land on your radar?
Sam Khouri (03:20)
Honestly, it started from a practical frustration. There were third party tools that could generate SBOMs for Swift projects, but they all had the same fundamental limitations. They worked by analyzing the package manifest and the resolved dependency file. And that only gives you, you know, gives the developers a partial picture.
You'd get a list of Swift packages, but Swift packages are not what get built. Products that are defined within Swift packages are what gets built. A package can expose multiple products, and your application might only use one of them. So these tools were either over reporting, including components that your software never used or linked against, or under reporting because they did not understand the product dependency graph. Either way, the SBOM was incorrect. And an incorrect SBOM can be worse than no SBOMs at all because it gives people false confidence.
Sally (04:31)
So you set out to fix this by going deeper or building the SBOM generation into the tool chain itself rather than layering on top of it. Ev, walk us through the high-level design. What does it actually mean to generate an SBOM at build time?
Ev Cheng (04:49)
The key insight is that the build system already has to do the work of figuring out exactly what gets compiled and linked. We just needed it to capture that information and emit it in a standard format. Swift Package Manager goes through two main stages when it builds something. First is package manifest loading, and this is when Swift PM resolves all your dependencies, figures out what versions to use, and builds what we call the resolve modules graph.
That graph represents every package and product and how they relate to each other. The second part is build execution, where Swift Build, the build engine, takes that modules graph and computes a build dependency graph. That's the actual targets that will be compiled with all the platform conditions and feature flags resolved. The SBOM integrates at both layers. The resolve modules graph gives you accurate package and product relationships. That's your bill of materials at the dependency level.
And the build dependency graph adds build time precision. It knows which conditional dependencies actually got included based on your target OS, your Swift traits, and your build configuration.
Sally (05:57)
Ah, so let's talk about that for a second. Traits and conditions for people who aren't deep in Swift. What are those?
Sam Khouri (06:04)
Traits can be considered as something similar to feature flags, though they're not quite the same. A package author can define traits for their own packages and not package dependencies, but can decide to enable package dependency traits. So a package might have an optional cryptography support that's only included if you explicitly enable that trait.
The resolved package graph reflects which traits are active. So our SBOM automatically captures whether those optional components are present or not. Conditions are different. They're evaluated at build time. The most common example is platform-specific dependencies. For example, on Linux, depend on this library. On macOS, use this other one.
The package manifest loading stage doesn't know which platform you're targeting until a build is performed. So to capture conditional dependencies correctly, we read them from Swift Build's computed build dependency graph, which has already evaluated those conditions.
The result is that the SBOM you get isn't just, here's everything in this package you could ever depend on. It's, here's exactly what was included in this binary, given these build settings on this platform with these features enabled.
Sally (07:37)
That level of precision is really compelling from a security standpoint. Ev, what formats do you support and why those?
Ev Cheng (07:46)
We support Cyclone DX and SPDX. Those are the two formats that have emerged as two of the most popular choices. They both have significant adoption, tooling ecosystems, and are reference in regulatory guidance. Supporting both means developers don't have to choose based on what their downstream consumers require. You can generate both in a single build indication. The CLI is simple. You just put Swift Build SBOM spec CycloneDX or SBOM spec SPDX, you can pass both Cyclone DX and SPDX flags at once. When you build, you get the full build graph aware SBOM. Without the build, you get the package graph only version, which is still significantly better than what third-party tools produce.
Sally (08:34)
One thing I want to ask about, and this comes up a lot in security conversations, is attestation. An SBOM is only as useful if you can trust it. So what's the story there?
Ev Cheng (08:44)
That's a great question, and it's currently under discussion. There are open issues in GitHub for SBOM signing. The idea being that when you generate an SBOM as part of your build, you can cryptographically sign it so downstream consumers can verify it wasn't tampered with. There's also open GitHub issues in Swift Package Manager around checksums and hashes for each component in the SBOM, so you can verify the integrity of individual dependencies, not just the document itself.
This connects to the broader supply chain security ecosystem, so tools like Sigstore, In toto attestations, and SLSA Provenance. The SBOM is the inventory and the attestations layer provides the trust chain. We want Swift PM to plug into those ecosystems cleanly in the future.
Sally (09:28)
I want to zoom out because I think there's a broader conversation here that's really relevant to the OpenSSF community. What happened with Swift is a model? You took a problem that was being solved imperfectly by external tooling and moved it into a canonical tool chain. Ev, how do you think about the that pattern and what it meant for other language ecosystems?
Ev Cheng (09:50)
The pattern matters because external tooling has a fundamental disadvantage. It's always working with less information than the build system has. The build system is the source of truth. It knows exactly what got compiled, what got linked, and what conditions were evaluated. Anything outside that has to reconstruct the picture, and reconstruction is inherently lossy. There's also a distribution problem with external tooling. Even great tools have adoption challenges. Developers have to discover them, install them, integrate them into their CI pipelines and keep them updated. If you build tooling into the canonical toolchain, though, any developer who builds their project gets the capability automatically. That's a huge multiplier for security outcomes across an ecosystem. I think we'll see more languages move in this direction. Cargo, the Rust package manager, has some of this thinking baked in. And the Python ecosystem is actively working on it. NPM has audit tooling.
The direction of travel is towards security capabilities as first class features of build tooling, not add-ons.
Sally (10:55)
Sam, you went through the Swift evolution process to ship this, SE0509. For people who aren't familiar, can you describe what that process looks like and why it matters, that a security feature went through this process?
Sam Khouri (11:09)
Yeah, the Swift evolution process is how the Swift open source community makes decisions about the language and its core tools. You first start with a pitch where you write up your idea, post it on the Swift forums and you get early feedback. That shapes a formal proposal.
The formal proposal goes through a community review period where anyone can comment, ask questions, and raise concerns. A review manager, in our case, Franz Busch, synthesizes the feedback, and ultimately the proposal is either accepted, revised, or rejected. What the process gave us was a lot of perspectives we wouldn't have had otherwise.
Security engineers who work in regulated industries gave us feedback about compliance requirements. Package authors raised edge cases around how products and targets interact. Tool authors who build on top of SwiftPM told us what they needed from the API. The result is a better design.
The pitch and the accepted proposal are meaningfully different because of that community input. And because it went through open governance, the design rationale is all documented publicly. Anyone can read the proposal, the pitch thread, the review thread, and understand not just what we built, but why we made the specific trade-offs.
Sally (12:47)
That's really healthy framing. Last question for both of you: What do you want the security community to do with this? If someone's listening to this podcast, they're a security engineer trying to make the case internally for better SBOM hygiene, or a developer who wants to get involved in the open source work, where do you point them?
Ev Cheng (13:10)
On Swift side, the feature is available in Swift 6.4, which can be downloaded from Swift.org and is also available in Xcode 27. Just like with many Swift features, Swift SBOMs are available to use if you want to, but you don't have to if it's not part of your workflow. To use the feature, you execute Swift Build SBOM spec cyclonedx spec spdx, where the SBOM spec option triggers the SBOM generation.
You want to run that on a real project and look at what comes out. Real usage generates real feedback, and we have open issues tracking the next wave of improvements, including signing, richer metadata, SDK support, and additional formats. The GitHub issues are public and contributions are welcome. More broadly, I'd say push your toolchain maintainers on this. If you work in Go, Python, Java, Kotlin, wherever, ask whether SBOM generation is on the roadmap for the canonical build tooling.
The conversation is happening in most of those communities and external pressure from security practitioners helps.
Sam Khouri (14:11)
For developers, the Swift evolution process is generally open SE 0509, which is the Swift SBOM feature, is accepted. But there are follow-up proposals being shaped right now around signing richer component metadata, embedding SBOM information and compiled binaries. If those problems interest you, come to the Swift forums and participate. The work happens in the open. And anyone who wants to understand the design in detail, the proposal document is thorough. It covers the motivation, the design, alternatives considered, and non-limitations.
It's a good read if you want to understand the engineering trade-offs in building this kind of tool.
Sally (15:05)
Thank you both. And now it's time for our rapid, rapid fire round. I'm going to ask you some questions. Say the first thing that comes to your mind, and we'll have some fun. Starting with Ev. Are you ready for the rapid, rapid fire?
Ev Cheng (15:21)
Yes.
Sally Cooper (15:23)
Coffee or tea?
Ev Cheng (15:25)
Tea
Sally (15:27)
Early bird or night owl?
Ev Cheng (15:30)
Definitely early bird.
Sally (15:32)
Love that. Audiobook or paper?
Ev Cheng (15:36)
I I'm a little old school, I like paper.
Sally (15:39)
Mmm. Spicy or mild?
Ev Cheng (15:41)
My mouth looks spicy, my stomach looks mild, so I'm gonna have to say spicy.
Sally (15:47)
Yeah, same. Favorite open source mascot.
Ev Cheng (15:51)
Well that's an easy one. This is about Swift. I'm gonna have to say the Swift bird is very elegant and very pretty.
Sally (15:56)
It is pretty and elegant. Well thank you. And for Sam, are you ready for rapid, rapid fire?
Sam Khouri (16:02)
I am as ready as I will be.
Sally (16:06)
Ready as ever. Okay, podcasts or music?
Sam Khouri (16:09)
I favor music.
Sally Cooper (16:12)
Mmm, favorite comfort food.
Sam Khouri (16:14)
That’s an easy one for me, I’d go with poutine - basically, fries with cheese curds, all topped with gravy sauce
Sally (16:22)
Cook at home or order takeout?
Sam Khouri (16:25)
I'm not much of a cook, but I prefer home cooked meals.
Sally (16:28)
Yeah, those are the best. Movie theater or streaming at home?
Sam Khouri (16:35)
With a 7 and 9 year old in the house, my living room is the premium cinema. Mostly because it has the pause button for bathroom breaks, and much cheaper popcorn.
Sally (16:47)
Mm. Favorite open source mascot.
Sam Khouri (16:51)
Just like Ev, I find the Swift bird very nice, but if I had to choose another, I would say the Jenkins logo.
Sally (17:00)
Time for some new stickers for me. I gotta check that one out. Well, thank you, Ev and Sam. And with that, I wanna wish everyone a great day. Happy open sourcing. And stay cyber safe and sound. Let's call it a wrap.
Clips from this episode
You May Also Like

Hell Money
Hell Money

Machine Learning: News on AI, OpenAI, ChatGPT, Artificial Intelligence, AI Models
Machine Learning: News on AI, OpenAI, ChatGPT, Artificial Intelligence, AI Models

ITSPmagazine
ITSPmagazine, Sean Martin, Marco Ciappelli

The Paul Barron Crypto Show
paulbarronnetwork.com

The New Stack Podcast
The New Stack

MacVoices
Chuck Joiner

Bitcoin Magazine Podcast
BTC Inc

Jack Hopkins
Jack Hopkins

Day Two DevOps
Packet Pushers

The Fat Pipe - Most Popular Packet Pushers Pods
Packet Pushers
Community discussion