The Security Risks Hiding in Software You Didn’t Write
Here's an uncomfortable truth about modern software development: most of the code in your application wasn't written by you or anyone on your team. A modest web application might easily contain hundreds of third-party dependencies—though the number varies enormously depending on the project—each one written by someone else, maintained by someone else, and potentially compromised by someone else entirely.
These dependencies—libraries, frameworks, packages, modules, whatever you want to call them—are the building blocks of contemporary software. They handle everything from parsing dates to encrypting passwords to displaying nice-looking buttons. Using them is sensible. Reinventing the wheel for every project would be madness. But every dependency you add is also a door into your system, and you're trusting that the person who built that door knew what they were doing and hasn't left the keys lying about.
The Problem Isn't Theoretical
Software supply chain attacks aren't some distant possibility that security researchers worry about in conference presentations. They happen with alarming regularity, and when they do, they tend to affect a staggering number of systems simultaneously. That's rather the point of targeting widely-used dependencies: compromise one library that's included in thousands of applications, and you've just compromised thousands of applications in one go.
The methods vary. Sometimes an attacker gains access to a legitimate package maintainer's account and publishes a malicious update. Sometimes they create packages with names deliberately similar to popular libraries, hoping developers will mistype and install the wrong one. Sometimes vulnerabilities exist in code that's been sitting there for years, waiting to be discovered. And sometimes—perhaps most worryingly—the attack is so subtle that it passes code review and sits quietly in production for months.
Your Dependencies Have Dependencies
It gets worse, naturally. The libraries you deliberately choose to include have their own dependencies, which have their own dependencies, and so on down the chain. You might carefully vet the ten packages you've directly added to your project, but what about the two hundred others that came along for the ride?
This transitive dependency problem means you're inheriting risk from code you didn't choose and quite possibly don't know exists. When a vulnerability is discovered several layers deep in the dependency tree, you're affected whether you've heard of that particular package or not. It's your problem now.
The Notification Gap
There's often a concerning delay between a vulnerability being discovered and you finding out about it. Security researchers might discover a flaw. The package maintainer might be notified. A patch might be prepared and released. And at some point in this process, assuming everything works as it should, you'll receive some kind of notification that you need to update your dependencies.
But that assumes rather a lot. What if the maintainer has abandoned the project? What if they're on holiday? What if your notification system isn't configured properly? What if you're using an automated dependency management system that hasn't been told which updates are security-critical? The gap between "vulnerability exists" and "you've actually fixed it in production" can be days, weeks, or indefinitely.
Trust but Verify (Except You Probably Don't)
The dirty secret is that most of us trust our dependencies implicitly. We install them, we use them, we assume they're fine. Actually reading through the source code of every package you use would take longer than writing the application in the first place. Even if you did somehow review everything before installation, updates arrive constantly. Are you reviewing those too?
This creates an uncomfortable relationship where we're entirely dependent on the good intentions and security practices of people we don't know, who aren't being paid to maintain these projects, who might lose interest at any moment. The open-source ecosystem runs on this collective trust, and most of the time it works remarkably well. But "most of the time" isn't particularly reassuring when you're responsible for protecting customer data.
What Actually Helps
Complete security is impossible, but there are practical steps that meaningfully reduce risk. Automated dependency scanning should be part of your development process, flagging known vulnerabilities before code reaches production. These tools aren't perfect—they only know about disclosed vulnerabilities, and they can't tell you if a package is suspicious in ways that haven't been formally documented—but they're considerably better than nothing.
Keeping dependencies updated sounds obvious, but it requires discipline. Not every update needs to be applied immediately, but security patches do. Having a process for reviewing and deploying security updates quickly matters more than having the perfect technological solution.
Minimizing dependencies helps too. Each package you include is a potential vulnerability, so it's worth occasionally asking whether you really need a library to do something you could handle in twenty lines of code. This isn't about never using dependencies—that would be absurd—but about being deliberate rather than casual in what you include.
Using lock files to pin specific versions of dependencies might seem counterintuitive when we've just discussed the importance of updates, but it serves a purpose. It means your builds are reproducible and you're choosing when to accept updates rather than randomly getting new code the next time someone runs the install command. You still need to actually update regularly, mind you.
The Awkward Reality
Software supply chain security isn't glamorous. It's administrative work that nobody notices when it's done well and everyone notices when it goes wrong. It's the difference between patching a problem and explaining to your customers how their data ended up somewhere it shouldn't.
The uncomfortable truth is that modern software development requires accepting risks from code you didn't write. The alternative—writing everything yourself from first principles—isn't realistic. What matters is being aware of those risks and having systems in place to manage them. It's not exciting, it's not fun, but it's rather important if you'd prefer not to become a cautionary tale in someone else's security article.
More on Security and Privacy
If you found this useful, we've written plenty more on security and privacy topics. The field moves quickly, the challenges are genuinely interesting, and we try to explain things in a way that doesn't require a cryptography degree to understand. Have a browse through our Security and Privacy section for more—there should be something there to worry you appropriately.
Beyond Passwords: Why Your Business Needs a Digital Deadbolt
Incognito Mode: The Privacy Feature That's Mostly Just Hiding Things From Your Mum
Two-factor authentication: which methods actually work and which are security theatre
Why We Write About This Stuff
We don't write about security and privacy because we think it sounds impressive. We write about it because it's fundamental to how we build things. Every website we create, every piece of software we develop has security and privacy considerations baked in from the start. It's not an afterthought or a checkbox exercise—it's simply part of building systems that deserve to be trusted with real data from real people.
Work With Us
If you need a website built properly or software developed by people who think about these things before they become problems, we'd be delighted to hear from you. We're good at what we do, we explain things clearly, and we don't disappear the moment your project launches. Get in touch and let's talk about what you're trying to build.
How We Build Custom Software Around Your Business
What are transitive dependencies and why should I care about them?
Transitive dependencies are the dependencies of your dependencies—libraries that get pulled in automatically without you directly choosing them. You should care because they create hidden security risks: you might carefully vet the ten packages you install, but those could bring along two hundred others that you never reviewed and possibly don't even know exist.
How often should I update my software dependencies?
Security patches should be applied quickly—as soon as they're available. Not every update needs immediate attention, but having a disciplined process for reviewing and deploying security updates matters more than waiting for the perfect moment.
What's a software supply chain attack?
It's when attackers compromise a widely-used software library or package to gain access to all the applications that use it. Methods include hijacking maintainer accounts to publish malicious updates, creating fake packages with similar names to trick developers, or exploiting existing vulnerabilities in popular code.