npm audit Found 69 Vulnerabilities in My Two SaaS Apps. Most of the Work Was Sorting Them. A developer at Null Studio audited the production branches of two self-run SaaS apps, VoiceDash and Upwork Scout, using npm audit with --package-lock-only and --omit=dev, finding 69 advisories that dropped to 45 production advisories after filtering. Mapping each advisory back to its root dependency showed 15 of VoiceDash's 27 production advisories came through the Prisma CLI, which sat in dependencies rather than devDependencies, and that npm's suggested firebase-admin fix was a semver-major downgrade to 12.1.0. At Null Studio I write maintenance guides for clients. One of them, on what software costs after launch https://nullstud.io/blog/software-maintenance-after-launch/ , splits upkeep into four kinds: corrective, adaptive, preventive and security. It ends with seven questions to settle before launch. The first one is "Who receives deprecation and security notices from each platform and service we use?" I had never asked that about my own products. So this week I ran npm audit against the production branches of the two SaaS apps I run myself: VoiceDash white-label client portals for Retell voice agents, Next.js + Prisma + Postgres and Upwork Scout AI-matched Upwork job alerts, Next.js + Firestore . The headline numbers were not great. voicedash 41 vulnerabilities 1 low, 13 moderate, 24 high, 3 critical gig-scout 28 vulnerabilities 16 moderate, 11 high, 1 critical 69 advisories across two apps. Here is how I sorted them, what the tool got wrong, and the boring answer to the "who gets notified" question. My local VoiceDash checkout was 37 commits behind main , so auditing it would have told me about code nobody runs. I pulled the deployed package.json and package-lock.json straight from the branch into a scratch folder and audited the lockfile alone, with no install: git show origin/main:package.json /tmp/vd/package.json git show origin/main:package-lock.json /tmp/vd/package-lock.json cd /tmp/vd && npm audit --package-lock-only --json audit.json --package-lock-only is the useful flag here. It audits the exact tree Vercel installs, it is fast, and it does not run anyone's postinstall script on my machine. The obvious next move is --omit=dev , because a vulnerable ESLint plugin is not reachable from an HTTP request. php voicedash 41 - 27 production advisories gig-scout 28 - 18 production advisories That looked like progress until I mapped every remaining advisory back to the direct dependency that pulls it in. I wrote a small script that walks packages in the lockfile from each entry in dependencies and records which roots reach each vulnerable package. For VoiceDash: | Root dependency | Production advisories it brings | |---|---| | prisma the CLI | 15 | | next | 6 | | next-auth | 2 | | resend | 3 | | zod | 1 | Fifteen of the 27 "production" advisories come through the Prisma CLI: hono , @hono/node-server , mysql2 , chevrotain , lodash , effect and friends. My app does not serve requests with Hono and does not talk to MySQL. Those packages are there because the CLI ships a local dev server and schema tooling. So why did --omit=dev keep them? Because prisma sits in dependencies , not devDependencies , in my own package.json . The scripts are "postinstall": "prisma generate" and "build": "prisma generate && next build" , so the CLI has to be installed at build time, and at some point I put it in the production list. Vercel installs dev dependencies during the build anyway, so it could move. The audit filter trusts my package.json, and my package.json was wrong. That does not make those 15 advisories irrelevant. Build tooling runs on a machine that holds my environment variables. It does mean they are a different risk from a bug in the request path, and they should not be ranked by npm's severity label alone. Upwork Scout split cleanly by comparison: 11 of its 18 come through firebase-admin gRPC, Google Cloud clients, fast-xml-parser , @fastify/busboy , 6 through next , and 1, zod , arrives only through the Anthropic SDK. The app itself does not import zod. npm audit attaches a proposed fix to each advisory. Two of them would have hurt. The firebase-admin "fix" is a downgrade. Upwork Scout runs firebase-admin 13.10.0. The advisory range is 11.0.0 - 14.3.0 , and npm's suggested fix was: "fixAvailable": { "name": "firebase-admin", "version": "12.1.0", "isSemVerMajor": true } 12.1.0 was published in April 2024. The current release is 14.5.1, which sits outside the vulnerable range. npm audit fix --force would have moved my app back two years and across a major boundary in the wrong direction. The real fix is a forward major upgrade that I need to test against my Firestore code, which is exactly the kind of adaptive work the client guide says to budget for. prisma@latest is a release candidate. VoiceDash runs Prisma 7.5.0. The vulnerable range ends at 7.10.0, and 7.10.1 is the newest stable 7.x. But the latest dist-tag on npm currently points to 8.0.0-rc.35 . If I had typed npm i prisma@latest to clear the warning, I would have shipped a release candidate of my ORM to production. The fix I want is prisma@7.10.1 and @prisma/client@7.10.1 , pinned together. The other two big ones were simpler. Both apps pin next to an exact version, which is the create-next-app default, so npm update never touches it. The patched release is in the same major. The auth library in VoiceDash is a beta release, and the patched build is a later beta of the same line. Those are the first two bumps, because they sit in front of every request. firebase-admin 13 to 14 in Upwork Scout. Read the changelog, run the scan endpoint against a test project, then ship. prisma to devDependencies so the next audit tells the truth. zod via the Anthropic SDK, svix and uuid via Resend. These clear when the parent package updates, so they ride along with routine bumps. I have not shipped any of this yet. This post is the audit, not the victory lap. Nobody. I checked both repos with the GitHub API: gh api repos/