Hey everyone, welcome to today's episode of the Insecure Agents podcast. I'm your host Ali How, and today we have Feross Aboukhadijeh, CEO of Socket, a developer-first security platform that protects your code from both vulnerable and malicious dependencies. Feross, would you like to introduce yourself and tell us more about Socket?
Yeah, sure. Hey, it's great to be here, Ali. And I'm Feross, founder of Socket. Socket is a company that I started in 2020 after spending about a decade before that as an open source maintainer. So I published open source software that today collectively gets over a billion downloads a month. So I learned a lot about the software supply chain during that time period, and you know, especially seeing how companies were using my software as well as that of, you know, the broader open source ecosystem. And I saw a lot of challenges with like how you consume open source. How do you know the packages are safe? Obviously, vulnerabilities is on everybody's mind. Everybody wants to get to zero vulnerabilities. But the other part that I thought was not really addressed by the market at the time was software supply chain attacks, which we're now seeing a whole bunch more of than we've kind of ever seen before. And so I felt like the existing solutions didn't really even attempt to solve that problem. And so I felt like, you know, that was the reason, that was really the impetus to start the company.
One thing I think differentiates Socket, or one thing I like about it, is the fact that you all like rate on different criteria like supply chain security, vulnerability, quality, maintenance, license. Really cool to be able to go and see before you go and like download a package, or it's nice to see what your options are, what you're kind of signing yourself up to in terms of like security risk. So yeah, definitely like very, very cool. How long ago did you start Socket?
So we started it in 2020. So it's been about four or five years now since we've had a product in the market that you can use, and we've continued to, you know, it's really not just focused only on software supply chain attacks anymore. We now do reachability analysis and help people prioritize vulnerabilities. We do autofixes, and we even now just announced something called certified patches, which is a way to kind of actually fix the problems without having to do any work to update your dependencies. So there's a lot of stuff now that kind of makes it more of a comprehensive dependency management and supply chain management platform. That's kind of where we're at now.
Yeah, I saw the announcement about certified patches, and that was super interesting to me because I think a lot of people just kind of assume that the latest patch is safe when they go to update dependencies, but a lot of times that actually introduces like even more security risk, which is something I think a lot of people don't realize. How did you decide that like that was like a need in the market and that you were going to go after like certified patches? And do most people today like use those instead of like going after like the latest upgrade, for example?
Mhm. I mean, everybody who's tried to fix vulnerabilities in their dependencies knows the challenge, right? So you have a CVE that's announced, and you go and look at it, and it says we're using version 1.0 at our company, let's say, and the vulnerability exists in that version and a whole bunch of other versions. And the solution is to upgrade to, let's say, version 4.0, right? And so that's where the challenge comes in because now you're moving across like multiple major versions, and there's almost always breaking changes or, you know, refactors that need to happen in your application code in order to actually successfully upgrade to that new version. And so it creates this pain where you're just trying to fix a vulnerability. You might be doing this under like some time pressure because, you know, you want to like remediate it under some reasonable number of, you know, hours or days, but now you're stuck having to go refactor your application, and like, you know, that new version 4.0 is bringing you a bunch of new features that you don't necessarily care about. You just want to fix the vulnerability. That's extra challenging when you have a security person who may not even be a developer or may not even be an expert in the application that they're patching. And so, you know, we've had cases where people are, you know, there's these legacy applications that have no tests. No one even knows how the application works anymore, and then it's some poor security person's job to go and like patch the dependencies, and then in some cases to rewrite the code in the application, and they're just like basically screwed. [laughter] You know, it's like not a fun situation to be in. And so the solution we came up with is what we call Socket certified patches. And a certified patch is basically a targeted fix that goes directly into the version of the package that you're using and just patches maybe one line of code that addresses the vulnerability, without requiring you to upgrade to the new version. So you can remain on that old version 1.0 in our example, and you just effectively take in a couple-line diff that fixes that version. And so you remain on the old version, but you no longer have the vulnerability. And so that solves the immediate problem of addressing the CVE and remediating it, but it gives you time to go and update to that like latest version later on if you want to. So you can kind of decouple fixing the vuln from taking in all these new features that are going to require you to rewrite your application code. So you just decouple those two things, and you can do them separately instead of having to do them together, which is what makes it so painful to fix vulns today.
And if you installed a certified patch from Socket, would like an external vulnerability scanner like a Dependabot or something pick that up, or would you like have to use Socket to be able to like recognize that that was fixed?
Yeah, that's a really good question. So the way it works today, we keep you on the old version that you're on, and then we go into the actual source code of the dependency and patch it. And so that means that Socket will be able to recognize that this has been patched, but today the other scanners still pick it up as the original version. We have a couple ways to mitigate that. One is there's this new standard called OpenVEX, and you can include information in your SBOM that explains why the vulnerability in this package has actually been remediated through some technical means, in this case a certified patch. And the other kind of way we're going to address this is we're working on a different deployment model that's going to address this in a more fundamental way. So instead of keeping you on that old version, you'll basically point to a new Socket-hosted version, which then will make all the scanners see it as a completely different package and sort of solve that problem. So there's going to be a couple ways to address that because it's absolutely an important problem to solve. Especially we hear from our customers that like even if they've addressed something, if one of their customers puts, you know, the SBOM or, you know, the app into a scanner and comes back with a bunch of findings, it doesn't matter if they're actually remediated and properly addressed because the customer is going to still hassle them about it, and it's going to waste their time, and they're going to have to like have conversations that they don't want to have. So it's an important problem that we want to address for sure.
Supply chain security has always been a big issue, like you talked about, but I feel like today it's even, you know, more relevant. There's been so many different attacks like in the news, especially like around like npm and the JavaScript ecosystem. One of those is Shai-Hulud, which is like named after like the Dune movie, I guess, like the worms in the movie. I've seen like maybe like five minutes of that movie, but pretty like aptly named, so I've heard. But basically, it's like this huge attack where it created one of like the largest npm package compromises in history. It's basically just like a self-replicating npm worm that once installed will be able to like search for secrets such as like API keys, tokens, like using TruffleHog, and then will like publish anything it finds to a public GitHub repository, and then it will push new copies of itself to npm to infect like even more hosts. So it's definitely like, you know, a big problem, and it's struck like not once but like twice now. How does Socket help protect teams from attacks like Shai-Hulud?
Yeah. So fundamentally, what you're doing when you install an open source package is you're pulling untrusted code written by somebody that you don't know, who doesn't work at your company, who put it online, and you're downloading it and running it usually without even auditing the code. So if you just think about what we're doing when we use open source packages every day, it's kind of crazy, and we're not just doing it like once or twice. We're doing it, you know, literally tens of thousands of times because of the amount of dependencies in modern applications. And so the fact that this doesn't happen more often is actually kind of a testament to how amazing open source is and how well it works most of the time. Basically what Socket does to address the problems of like Shai-Hulud and just in general how do you know you can trust the software is you need to have something that reviews the code before you bring it in and run it. And the gold standard for that is ideally you'd have a like security expert, like a human, you know, reviewing every line of code and like looking at exactly what the code is going to do before you bring it into your project. And I said that's kind of like the gold standard. Not practical. Almost nobody can do this. I think there's only been maybe two companies in my entire career in this space that I've seen actually have a process like that where they have human review of every line of code of all of their third-party code. And they basically treat it as their first-party code. And it kind of makes sense, right? This code is going to run in your application. It's part of your application. It kind of makes sense to treat it that way. It's just not practical for almost anyone except for like the very largest companies in the world or maybe, you know, companies with very, very particular intense security requirements, like we see that sometimes with cryptocurrency companies. So what you need to do is you need to have some process to scan this code. And before Socket, what we saw the norm in the industry was to use a CVE scanner or a vuln scanner, and it would just tell you, you know, hey, you know, these are your vulnerable packages, but that doesn't address supply chain attacks at all. It's like kind of a completely different problem. So it's really important to understand the difference between vulnerabilities and supply chain attacks. Vulnerabilities are accidents, right? They're bugs that the good guys, the maintainers, accidentally put into their projects. Whereas a supply chain attack or a malicious package, it's what it sounds like. It's an intentional malicious code added into a project that used to be good, but now contains, you know, it's effectively a poisoned artifact that you don't want to use. And so what you really need is you need to know before you bring that package in whether it's malicious or not. The CVE system and the vuln scanners, the legacy stuff that people were doing before, is too reactive. So you're basically waiting for some human to kind of stumble upon a malicious package, make a big stink about it, write some blog posts, get some news stories, and then these vuln scanner vendors would just go in and kind of add in these package names like to their list of bad packages even though there's no CVE for them because again, this is not a vulnerability, so you can't, it's sort of separate from the CVE system. If you look at CVEs, you're not even going to see supply chain attacks 99% of the time, right? So basically, that's kind of what Socket does. So we go in, we download every open source package before any of our customers. We have a feed where we're kind of pulling in every latest package that's published within a couple seconds of it being published. You can kind of think of it like this really big web crawler that just goes around and finds all open source software. And then we scan it with our own kind of proprietary scanner that we created, and it looks for signs of capability creep. So a package that used to behave one way, but suddenly you see it making network calls, reading environment variables, like opening up files that it never did before, obfuscated code, anything that like, you know, is a significant change in the way the package has behaved in the past is a really big red flag. New maintainers is a really big one, new people that are contributing that we've never seen before or don't have a reputation. And then the other really big one is install scripts. So these are pieces of code that automatically run whenever a package is installed. They do have some legitimate uses, but almost all malware uses install scripts because it allows the code to trigger immediately instead of later on. So as soon as a developer, an unlucky person, installed one of these packages, it would immediately run the payload and then kind of scan your whole system looking for more secrets that it could use to spread itself further. And so when you see enough of these signals, or sometimes in some cases even one of these signals that's really bad, it means it's really worth taking a close look at this code. And so what Socket does is we kick it over to a human threat research team that we have, and they will take a look at the finding and make a definitive determination as to whether it's malicious or not. And that is really nice because it means you get really low false positives because our AI system, while it's awesome, still has, you know, 5% false positives or something like that. And we want to provide kind of like a really, really solid experience. And so everything goes through this like human-in-the-loop process where a human signs off on all findings. And so it makes it really, really trustworthy for our users. And all that data, by the way, is free. So we put all this on our website, and people can kind of go and look and see if their packages are safe and, you know, check this before they bring in code.
So the Shai-Hulud attack was one of the largest like npm compromises in history. What specifically about that attack stood out to you?
Yeah, so the Shai-Hulud attack was one of the largest scale software supply chain attacks we've seen. It was the second version of this attack. So we'd seen something similar just a couple months ago. 834 npm packages were affected, 700 versions compromised, and then there was even a bunch of high-profile targets. So companies like Zapier, Sync API, Postman, PostHog, and a bunch of others that had packages that were affected. It was a worm. That was the other interesting element of it. When it ran, it would pull your tokens and then publish itself to your packages. And so it had this like viral nature to it that was like really scary and that we've now seen a couple times. So I think the most interesting part of the attack from my perspective was the way they initially got access to the PostHog package. The attacker opened a malicious pull request against a PostHog public repository, and it abused, in my opinion, a design flaw in GitHub Actions. So basically, GitHub Actions has this way to trigger code that runs automatically when a pull request is opened. And there's a couple ways to do that in GitHub Actions. And the one that was recommended for a really long time that a lot of people used is called pull request target. And what that means is when someone opens a pull request against your repository, you want to run this action in response. And the problem with that is that it runs the code with a token in the environment that gives it write access to the repository. So that's really bad because it means that someone opening a PR can potentially like use that token and then, you know, make commits to the repo or do things like that. The other really unintuitive part about the way that that works is if you have a GitHub action that you've worked on, that you've kind of improved over time, and so maybe you had some flaw with the way that it worked, a vulnerability, and you fixed it, it turns out an attacker can often still trigger the old version of your GitHub action. If you have any branches at all in your repository that are pointing to an old commit that has the old version of the GitHub action, then an attacker, when they open their PR, can point that PR at the, you know, old branch, and so it'll run the action from that old branch, which could be an action from two, three, four, five years ago that had flaws in the design that allowed it to, you know, like allowed an attacker to sort of steal the token. So it's sort of like even if you fix the flaws, if you don't go and clean all your branches and make sure there's no, and obviously like a lot of people don't clean up their branches on GitHub, like there's thousands of old branches on a lot of repos, especially high-profile repos that get a lot of PRs and stuff. So I think that was probably the most interesting part. So GitHub just has this, in my opinion, this design flaw, and actually I saw a post a couple days ago that they've actually now finally fixed this flaw, and so pull request target now the behavior has changed to sort of address this exact issue. I think that's actually really good to see that that's being fixed because it's just such a common problem, and this is, you know, not the first time we've seen this lead to an initial access compromise in this way.
Amazing. Yeah, that's such a good point. Yeah, I didn't realize that about like the old branches that are left over that aren't cleaned up that might have an old action sitting around they're connected to. So, wow. Mhm. Yeah. I was going to ask how like Socket has evolved over the last like four or five years since you started, since like agents have come out, and if you're using agents to help with that process.
The analysis doesn't necessarily use agents today. We use agents actually for the patches. So to generate the patches, that's actually a very iterative process of bringing code back from the patched version and bringing it back to the version that the customer is using in their project. So that's where we've actually found the most value from agents today. But yeah, to your question of like how things have evolved with agents, I think the biggest thing we see is agents when they're running in, you know, kind of like yolo mode, they're installing packages, and, you know, there's a lot of ways that can go wrong. There's obviously the supply chain attacks where you have compromised packages. The LLMs that power the agents were trained oftentimes, you know, six months ago or twelve months ago. And so they have no idea about the, you know, latest state of these packages. And so what you really need to do is kind of inject information about the latest security status of the packages that the agents want to bring in into the process so that they can get that like information and they can decide whether to continue using the package or not. And so that's what we've seen is kind of then the most useful way to kind of continue using agents but ensure that they're not going to bring in a backdoor package or something that violates your security policy at your company or your organization.
Yeah. Because I think coding agents have become so prolific. I just went to the AI Engineer Code Summit that was in New York City where like coding agents were the main topic, and we did the MCP debate, and one of the learnings that came out of that was, you know, code execution with MCP is a lot more efficient and better way to make tool calls than using like MCP calls themselves. I think it like increased performance by like, I don't know, like 98% or something like that. Anthropic did a blog on it. Obviously, there's all these developers that are using coding agents to just improve their own productivity, but I think developers that are writing agents, building them, and connecting them to different tools, they're going to be using agents to write code to call those tools. So I think we're going to see like even more usage of agents to write code because they're just so good at that. So solving this issue of like, hey, like can I just like go trust this agent to download whatever it needs to go and complete this task and do meaningful work? That means it's downloading whatever dependencies it needs. So agents for sure need something like Socket. And there's going to be way more agents out there than there are humans today. I've heard people say it's like to the power of N or whatever, of like maybe like every human out there is going to have like 10, 100, a thousand different agents. All of them need something to help them make sure that they can install the right dependencies. So it'll be really interesting to see like not just Socket, but I just feel like security companies in general, like how much greater the need is for that. Where do you see, I guess, the future going with agents and what they're going to need to be able to make sure that they can run and execute code securely?