REAL AUDIT
What a real audit found that npm audit missed
We audited and fixed one of our own apps, a small public web app with a React frontend, a Node.js API and a Postgres database. This is what the scanner said, what it missed, and what we did about it.
GuidesPublished 9 November 2026
How we looked
Read-only. We ran npm audit, read the code and sent ordinary requests to the live site. No aggressive scanning, and nothing changed until the findings were written down.
What the scanner said
npm audit reported 2 critical, 2 high and 13 moderate results on the frontend, and 6 moderate on the backend. That looks alarming, so we checked what each one actually touches.
- Both critical results were in test tools. They never reach visitors.
- Counting only what ships to production, the frontend had 0 critical, 1 high and 3 moderate.
- The 1 high was a memory problem in a form validation library that runs in the visitor's own browser, so the real risk was low.
What the scanner missed
Reading the code found problems that npm audit doesn't report:
- Admin routes open to anyone. The API had routes for its background jobs, including routes that start jobs able to write to the database, and none of them asked for a login. This was the most serious finding.
- A runtime out of support. The Dockerfile still used a Node.js version that no longer gets security fixes.
- No lockfile on the backend, so each deploy could pull different package versions.
- No rate limiting, and a proxy setting that accepted forged addresses.
- Almost no tests, which made every upgrade risky.
One more turned up during the work: an API route that failed on every request, because of a query the database library rejects.
What we did
- Closed the open routes first. Everything else could wait, that couldn't.
- Added basic tests of the main pages and forms before upgrading anything, since the app had almost none.
- Recorded how the app behaves in a real browser: pages, map, links and forms.
- Upgraded the packages one group at a time, testing after each, including major versions of the build tool, the router and the validation library.
- Shipped in small steps, repeating the browser check on the live site after each one.
It was our own app, so changes went straight to the main branch. A client's change also goes through a staging copy and an approval before production.
The result
| Before | After | |
|---|---|---|
| npm audit, frontend | 2 critical, 2 high, 13 moderate | 0 |
| npm audit, backend | 6 moderate, no lockfile | 0, with a lockfile |
| Automated tests | 1 empty example | 20 |
| Rate limiting | None | On the API |
| Open admin routes | Yes | Closed |
| Browser check of the main pages | Recorded before upgrading | Same results |
A few items need the owner's own accounts, such as hosting settings and a review of database permissions. Tests this basic lower the risk of an upgrade, but they don't remove it.
What we took from it
- A scanner's severity isn't your risk. Check whether the flaw reaches production before you panic, or before you relax.
- The worst problem may not be a known vulnerability at all. Somebody has to read the code.
- No tests isn't a reason to stop. Add basic ones first, and compare the app before and after each upgrade.