
In the fast-paced world of software development, dependency management often feels like an afterthought. However, as I learned during my time at Disca, dependency risk is not just a seasonal concern but a daily operational issue that needs attention and thoughtfulness.
When I first joined the engineering team, I saw dependencies as simple tools—little libraries that helped my code run smoothly. I would install them, import them, and then quickly move on to the next task. But more often than I expected, my pull request fails in Continuous Integration (CI) because of "vulnerabilities found.”
It turns out that something deep in my dependency tree got flagged. It wasn’t my fault, but it was now my problem. And at Disca, we don’t ship code with known vulnerabilities. Period.
Dependencies are awesome. They let us move quickly and build upon the work of others. However, they also mean that our codebase includes code from other people, their security habits, and sometimes, their mistakes.
Attackers have shifted their tactics, often targeting small utility packages that countless applications rely on.
A case in point: in September 2025, a phishing attack compromised 18 popular npm packages, including widely used ones such as debug and chalk. These packages boasted over two billion weekly downloads, and the injected code aimed to silently collect sensitive data when the impacted projects were executed. [esecurityplanet.com, wiz.io, semgrep.dev]
These weren’t obscure libraries. They were staples in the JavaScript ecosystem. One day, they were fine. The next day, they weren’t.
Another case: in March 2024, a hidden backdoor was found in XZ Utils, a core library used by most Linux distributions. An attacker spent months pretending to be a helpful contributor, gradually earning trust and gaining commit access to the project. Once inside, they embedded a hidden backdoor into versions 5.6.0 and 5.6.1 of the XZ Utils package. This backdoor compromised the Linux SSH service, allowing attackers to bypass authentication and run code remotely. It served as a direct entry point into affected systems, essentially a “master key” hidden within the operating system's plumbing. [Akamai, JFrog, Datadog Security Labs]
This incident highlighted a critical lesson: supply-chain risks extend beyond your immediate codebase. Your stack's security is only as strong as its weakest link, be it npm modules or foundational libraries.
The reality is that vulnerabilities do not adhere to a schedule. New Common Vulnerabilities and Exposures (CVEs) are published incessantly. Once listed in the National Vulnerability Database (NVD), they may quickly be flagged by your scanners, sometimes within minutes. At Disca, we prioritize nightly dependency audits to ensure that even merged code remains secure.
I've come to see dependency hygiene as similar to brushing your teeth. It’s not enough to do it once and assume you're safe forever. Just as skipping this daily ritual can cause serious dental problems, ignoring regular dependency checks can lead to major security weaknesses.
Faced with a failed audit, my impulse was to simply reinstall everything and create a new lockfile.
Bad idea.
And this is why:
Instead, a thoughtful approach is essential – targeted, deliberate updates that fix only what’s necessary, enabling verification and testing while preserving the stability of the rest.
Disca’s main policy for managing dependency risks is: no merges while a known vulnerability is present in the diff or current codebase.
Disca also promotes the idea that effective dependency management is about building consistent, healthy habits.
Here’s the model we use:
1. All Audits on Every PR
At Disca, we implement PR gates with Socket.dev. Every pull request runs through a supply-chain analyzer that checks for risky or malicious dependencies. If something’s vulnerable, the merge is blocked until it’s fixed.
Why: It’s better to stop the risk before it enters main.
2. Nightly CI Audits
Every night, all repositories are re-scanned. If a new vulnerability is found (even in code that has already been merged), the CI fails, and alerts are sent to Slack.
Why: Vulnerabilities can appear retroactively. Nightly scans are your early warning system.
3. Lockfile Discipline
We treat lockfiles as safety rails. Changes must be minimal, intentional, and reviewed.
Why: Random lockfile churn hides risk. Minimal diffs keep history clean and traceable.
4. “Should We Even Add This Dependency?” Checklist
Before adding any new dependency, ask yourself:
Why: Prevention beats remediation. Fewer, healthier dependencies mean fewer headaches later.
When a vulnerability is flagged, here’s what I’ve learned to do:
In closing, embracing the reality of dependency risks is crucial for any developer. By cultivating disciplined practices and understanding the fluid nature of security threats, we can better navigate the intricate landscape of modern software development.
From consulting to strategy, creation to implementation, along with continued support, Disca is ready to partner with you no matter your needs.
CONNECT