Skip to content
← All articlesEngineering

Software Dependency Management and Supply Chain Security

How to manage open-source dependencies safely: lockfiles, updates, vulnerability scanning and licence checks, plus what to require from an outsourced team.

Modern applications are mostly assembled, not written. A typical web or mobile project pulls in hundreds of open-source packages once you count the dependencies of your dependencies. That is efficient, but it means much of your running code was written by people you have never met, and a flaw or a malicious change in any one package can reach your product.

For a CTO or founder who outsources development, dependency management is a practical risk that is easy to overlook. This guide explains what to control and what to ask your delivery team for.

Why dependencies are a business risk

  • Known vulnerabilities. Public flaws in popular libraries are catalogued and actively exploited by attackers who scan for out-of-date versions.
  • Malicious or hijacked packages. Attackers publish look-alike package names (typosquatting), take over abandoned packages, or compromise a maintainer account.
  • Abandoned projects. A package with no maintainer stops receiving security fixes, yet your product keeps depending on it.
  • Licence obligations. Some open-source licences place conditions on how you distribute or sell software. Finding this out during an investor’s due diligence is expensive.
  • Breaking upgrades. Postponing updates for years turns a routine change into a risky migration. This is a form of technical debt.

The foundations: lockfiles and pinned versions

Every project should commit a lockfile (such as package-lock.json, yarn.lock, poetry.lock, Podfile.lock or Gemfile.lock). A lockfile records the exact version of every direct and indirect dependency, so the build on a developer laptop, in CI and in production uses the same code.

Practical rules:

  1. Commit the lockfile and fail the build if it is out of sync with the manifest.
  2. Install in CI using the strict, lockfile-respecting command (for example npm ci) rather than a command that may resolve new versions.
  3. Avoid wildcard or “latest” version ranges for production dependencies.
  4. Use a private registry or proxy if your organisation needs control over which packages can be installed.

Automate updates in small steps

Teams that update rarely tend to update dangerously. A better pattern is small, frequent, automated updates:

  • Use a tool that opens pull requests for new versions (Dependabot and Renovate are commonly used).
  • Group low-risk patch updates, and review major version bumps individually.
  • Let the automated test suite decide whether an update is safe. Without regression tests, teams become afraid to update and fall behind.
  • Set a regular cadence, for example a weekly review slot, so updates are routine rather than heroic.

Scan for vulnerabilities continuously

Run dependency scanning in the pipeline on every pull request and on a schedule, because new vulnerabilities are disclosed against code you shipped months ago. Most package ecosystems and hosting platforms offer built-in audit commands or free scanners, and commercial tools add reachability analysis and reporting.

Agree a policy before the first alert arrives:

Severity Suggested response
Critical, exploitable in your usage Fix or mitigate immediately, treat as an incident
High Fix in the current sprint
Medium Schedule within an agreed window
Low or not reachable Track, review at the next update cycle

The exact windows are a business decision, but writing them down avoids debate under pressure. Scanning complements, rather than replaces, deeper checks described in our comparison of penetration testing and vulnerability scanning.

Know what you ship: SBOMs and licences

A software bill of materials (SBOM) is a machine-readable inventory of the components inside your application. Standard formats such as SPDX and CycloneDX exist, and many build tools can generate one automatically. Enterprise buyers, regulators and security questionnaires increasingly ask for them, and having one also speeds up your response when a new vulnerability makes headlines: you can search the inventory instead of guessing.

Alongside the SBOM, run an automated licence check and agree which licence families are acceptable. Flag anything unusual for legal review before it ships.

Reduce the attack surface

  • Prefer fewer dependencies. Do not add a package for a ten-line function.
  • Vet new packages. Check maintenance activity, number of maintainers, release history and whether the name matches what you intended to install.
  • Protect the pipeline. Use least-privilege credentials in CI and keep tokens out of the repository; see our guide to secrets management.
  • Enable two-factor authentication on accounts that can publish packages or approve merges.
  • Review lockfile changes in pull requests, since that is where unexpected packages appear.

Checklist for outsourced projects

When working with an external team, put dependency practices into the contract or statement of work and ask for evidence rather than promises:

  • Lockfiles committed, strict installs in CI
  • Automated dependency update pull requests with a named reviewer
  • Vulnerability scanning on every pull request, with the severity policy above
  • An SBOM and licence report delivered at each release or on request
  • A short list of approved registries and a rule for adding new packages
  • Dependency health reviewed in regular release reports

Include these in your vendor evaluation and review them as part of handover, so you inherit a codebase you can maintain.

Getting help

Dependency hygiene works best when it is built into the delivery pipeline from day one. Our cloud and DevOps services cover automated pipelines, scanning and release controls, and our software testing team builds the regression suites that make frequent updates safe. If you want an independent review of an existing codebase or a team that treats supply chain security as a default, contact us to discuss your project.

Let’s build what’s next.

Tell us about your platform, your product idea or the systems you want to modernise. Someone from our Chennai engineering team will get back to you personally.