Keeping a web app's dependencies up to date: a plan
Short answer: A web app is built on dozens or hundreds of open-source packages, and they need regular updating: security fixes promptly, routine updates on a schedule, major versions as planned projects. Tools such as GitHub's Dependabot can open update pull requests automatically, and npm audit lists known vulnerabilities in JavaScript projects. What makes it safe is a routine with testing, not the tools alone.
An app that worked perfectly at launch slowly falls behind: packages release fixes, security advisories appear, and two years later a "small" update means rewriting half the project. This plan sets out a sensible rhythm for a small business app, from the first week to the long term.
Why dependencies need a routine
Your developers wrote perhaps a fraction of the code your app runs. The rest comes from frameworks, libraries and their own dependencies. Each of those receives updates for bugs, compatibility and security. Leaving them untouched has two costs: known vulnerabilities stay open, and the gap between your versions and current ones grows until upgrading becomes a project in itself.
The tools, briefly
Dependabot (GitHub). GitHub's documentation describes two related features:
- Version updates keep your repository up to date with the latest releases of the packages it depends on. You enable them by adding a
dependabot.ymlconfiguration file, which also tells Dependabot how to maintain your dependencies. Dependabot looks at semantic versioning to decide whether to update. - Security updates: when a Dependabot alert is raised for a vulnerable dependency, Dependabot automatically tries to fix it by opening a pull request that updates the dependency to the minimum version containing the patch, linked to the alert.
npm audit. For JavaScript projects, npm's documentation explains that npm audit checks dependencies against known advisories, each with details such as severity and vulnerable versions. npm audit fix applies fixes where possible, but npm notes some vulnerabilities can't be fixed automatically and need manual review, and that fixes requiring changes beyond your declared version ranges need the --force option, which can install breaking major updates.
Other ecosystems (PHP, Python, Ruby, mobile) have equivalent audit tools, and other code hosts offer similar automation.
The plan
Week 1: get visibility
- Make sure the code is in a repository your business controls, with a lock file committed (for example
package-lock.json), so builds are reproducible. - Turn on vulnerability alerts on your code host.
- Run an audit (
npm auditor the equivalent) and save the output. This is your baseline. - List the big pieces: framework, major libraries, runtime version (such as Node.js or PHP), and their support status according to each project's own site.
Weeks 2–3: fix what's urgent
- Address critical and high-severity issues first, especially in packages exposed to user input or the internet.
- Prefer updates within your current major versions; these are usually low-risk.
- Avoid
npm audit fix --forceon a whim; review what it would change first (npm documents a dry-run option). - Test after each batch, not after everything.
Month 1: automate routine updates
- Add a
dependabot.yml(or your host's equivalent) for version updates on a weekly or monthly schedule. - Configure grouping or limits so you aren't flooded with dozens of individual pull requests.
- Make sure automated tests run on every update pull request. If you have few tests, add some for the critical paths: sign-in, payments, booking, key forms.
Monthly from then on
- Review and merge routine update pull requests after tests pass.
- Re-run the audit and compare with last month.
- Deploy updates in small batches rather than saving them up.
- Keep a short changelog of what was updated and when.
Quarterly
- Check the support status of your framework and runtime. Plan upgrades before versions stop receiving security fixes.
- Remove dependencies you no longer use; fewer packages mean fewer updates and less exposure.
Yearly (or as needed): major upgrades
Major versions often include breaking changes. Treat them as small projects: read the upgrade guide, update on a branch, test thoroughly, deploy at a quiet time and keep a rollback plan.
Who does what
For a small business without in-house developers, agree this in your maintenance arrangement:
- Who receives security alerts, and how quickly they act on critical ones
- How often routine updates are merged
- What testing happens before deployment
- How you'll be told about upcoming major upgrades and their effort
A maintenance plan that says "updates included" without these details may mean very different things to each side.
What a good update looks like when it lands
A well-handled update is boring, which is the point. It arrives as a pull request naming the package, the old and new versions and, ideally, a link to the release notes. Automated tests run and pass. Someone skims the release notes for anything flagged as breaking, merges it, and the change goes live with that week's other small updates. If something does go wrong, the history shows exactly which update to roll back, rather than a single large jump nobody can untangle.
Signs your app is falling behind
- Security alerts left open for months
- Update pull requests piling up unmerged
- Developers saying a small change needs "upgrading everything first"
- The framework or runtime version no longer listed as supported by its own project
FAQ
Can I just merge every Dependabot pull request automatically?
Some teams auto-merge minor and patch updates when tests pass. Without good automated tests, that's risky. Review at least until you trust your test coverage.
Is npm audit fix --force safe?
npm's docs explain it can install major version updates outside your declared ranges, which may break things. Use it deliberately, after reviewing the changes, on a branch with testing.
How often should dependencies be updated?
Security fixes as soon as practical, routine updates weekly or monthly, major upgrades as planned projects. The right rhythm depends on how actively the app is developed.
Does this apply to mobile apps too?
Yes. Mobile apps depend on SDKs and libraries, and app stores periodically require newer platform versions, so the same routine applies.
Inherited an app with a long list of security alerts and outdated packages? Share the audit output and we'll help you plan the catch-up.