You pushed your Lovable, Bolt, Cursor or Replit app to GitHub. Now there is a yellow banner, or a terminal says "found 14 vulnerabilities (3 high, 1 critical)". It looks scary, and the fix button looks like a trap. This post explains what these alerts are, which ones matter, and how to update without breaking your app. Vendor facts below come from each vendor's own docs, checked in November 2026.
Short answer: your app is not automatically in danger. An alert means a package your app uses has a known problem. First find out if that package runs for your real users, or only on your laptop while you build. Fix the ones that run in production first. Update on a branch, build it, test it on a preview, then merge. Do not run npm audit fix --force on your live branch.
1. What the alerts are
Your app is built from your own code plus many small packages written by other people. A vulnerability is a known weakness in one of those packages. Several different GitHub and npm features talk about this. They are easy to mix up.
Dependabot alerts
GitHub's Dependabot alerts page says they "help you find and fix vulnerable dependencies before they become security risks." Dependabot scans your default branch. An alert is sent in two cases: when a new vulnerability is added to the GitHub Advisory Database, or when your dependency graph changes, for example when you push commits that update packages or versions. The page also says "Only advisories reviewed by GitHub trigger alerts."
An alert is only a warning. It changes nothing in your code. Each one shows details about the vulnerability and its severity, the affected file and, when available, a fixed version.
Dependabot security updates
These are the automatic fixes. The security updates page says "Dependabot raises a pull request to update the dependency to the minimum version that includes the patch." A pull request is a proposed change that you can read before you accept it. It is linked to the alert. When you merge it, the alert closes.
Dependabot version updates
This is a different feature. The version updates page says they are "automated pull requests that keep your dependencies updated, even when they don't have any vulnerabilities." You turn them on by checking a dependabot.yml file into your repository. Security updates are for known vulnerabilities. Version updates are routine upkeep. If you only want to deal with security, you do not need the second one.
npm audit
This one runs on your computer, not on GitHub. The npm audit docs say it "submits a description of the dependencies configured in your project to your default registry", and the registry answers with known vulnerabilities. By default it needs a package-lock.json file to run. That file records the exact version of every package, so keep it in your repository.
With the fix argument, npm audit applies suggested updates. The docs say "remediations will be applied to the package tree." Be careful with --force. The docs say it allows npm to "install modules outside your stated dependency range (including SemVer-major changes)", and add: "If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!" In plain words: --force can install new major versions of packages, and major versions can break your app.
One more difference. Secret scanning is a separate thing. If your worry is a leaked key and not an old package, read the API key check.
2. Which alerts matter first
A list of 14 does not mean 14 emergencies. Ask these questions in this order.
Does the package run for your users?
Your package.json has two main lists. dependencies are packages your app needs to run. devDependencies are tools you only need while building, such as a dev server, a test runner or a code formatter. A weakness in a dev tool usually matters only on your own machine while you work. A weakness in a package that ends up in the browser, or runs on your server or in your functions, can reach real users.
GitHub helps here. The page on viewing alerts says you can use "the scope:development filter" to find alerts on development dependencies, or look for alerts labeled "Development". The same page says you can filter alerts by package, ecosystem or manifest. So: look at the alerts without the Development label first.
On your own computer, you can ask npm to leave dev packages out. Run:
npm audit --omit=dev
The npm docs describe --omit as the "dependency types to omit from the installation tree on disk", and the value dev is one of those types. The result is a shorter list that is closer to what runs in production. Treat it as a first filter, not as proof. A generated project can have build tools listed under dependencies, so a package in that list may still be build-only. Check the alert text.
Can the vulnerable code even be reached?
A package can have a weakness in a part your app never calls. GitHub has an optional feature for this. The alerts page says reachability analysis helps prioritize alerts by "identifying whether your application can reach vulnerable dependency code." At the time of checking, it was a public preview and supported only JavaScript repositories using npm, pnpm or Yarn, and TypeScript repositories. The alerts view has a "Reachability" dropdown, and you can type reachability:reachable,potentially-reachable in the search bar. It may change or not be on for your repository, so look in your own Security tab.
Severity is a start, not the answer
Every alert shows a severity. Use it to sort, not to panic. A "high" alert in a tool that only runs on your laptop is less urgent than a "medium" alert in the login code on your server. GitHub's own page says to weigh the dependency scope and the dependency relationship when you prioritize. The page also suggests using EPSS scores (Exploit Prediction Scoring System) next to severity.
A rough order that works for most small apps:
- Packages that run in production, on the server or in functions, with a fix available.
- Packages in the browser bundle with a fix available.
- Reachable alerts, if GitHub shows that verdict.
- Development-only alerts, last.
3. A safe update routine
Understand version numbers first
Package versions look like 4.17.21. The Semantic Versioning rules give each number a meaning. The last number, PATCH, goes up "when you make backward compatible bug fixes". The middle number, MINOR, goes up "when you add functionality in a backward compatible manner". The first number, MAJOR, goes up "when you make incompatible API changes". So:
- Patch and minor updates (4.17.20 to 4.17.21, or 4.17 to 4.18) should not break your code. Do these first.
- Major updates (4.x to 5.x) can break things. Do them one at a time, never in a pile.
This is a promise by the package author, not a guarantee. So you still test.
The routine
- Make a branch. Never update on your main branch. If something goes wrong, the live app is untouched.
- Update only what the alert names. Update one package or a small group, not everything.
- Commit the lockfile. The
package-lock.jsonchange is part of the fix. If it is not committed, your host may install different versions than you tested. - Build. Run your build command. A build that fails now will fail on your host too.
- Run the app and the tests. Click the key flows: sign in, the main action, payments if you have them. If you have no tests yet, see the first tests worth writing.
- Open a pull request and check the preview. A preview deploy shows the change at its own address before it goes live. The staging post explains how to make sure it does not touch your live data.
- Merge. Then do one quick check on the live site.
If an update breaks the live site anyway, go back to the last good version first and debug later. How to roll back a broken deploy shows how.
Reading the pull request Dependabot opens
Do not merge it blind. Look at three things:
- The version jump. The title says from which version to which. A patch or minor jump is low risk. A major jump needs the full routine above.
- The compatibility score. GitHub says "An update's compatibility score is the percentage of CI runs that passed" for that version change, based on CI results in other public repositories that got the same update. A high score is a good sign. It is not a test of your app.
- The files changed. You expect
package.jsonandpackage-lock.json. If it touches other files, ask why.
The same docs say the update goes to "the minimum version that includes the patch". That is the smallest step to a fix, which is what you want.
When there is no fix yet
Sometimes an alert shows no fixed version. Then there is nothing to update to. The honest options are:
- Check whether the package runs in production at all. If it is a dev tool, the risk is small.
- Check whether your app uses the weak part. Read the advisory text.
- Look for another package that does the same job.
- Leave the alert open and look again in a few weeks, in case a fix has been released.
GitHub's docs pages checked for this post do not cover this exact case, so treat this list as common sense, not as GitHub's rule.
Dismissing an alert
You can close an alert you have judged as not relevant. The GitHub page says you can only dismiss open alerts. You choose "Dismiss", click a reason, and you can add an optional comment that shows in the alert timeline. Write the comment. In six months you will not remember why you closed it. For example: "Dev server only, not part of the production build."
Dismiss only after you checked. Never dismiss an alert just to make the banner go away.
4. What your AI tool can do, and what you check yourself
Lovable, Bolt, Cursor and Replit can all edit package.json for you. This is a good job for them if you give clear limits. Example prompts:
- "Update only the packages named in this Dependabot alert. No major versions. Show me the diff before you apply it."
- "Run
npm audit --omit=devand explain each result in plain English. Which ones are in the browser bundle, and which run on the server?" - "List which of these vulnerable packages are in devDependencies and which are in dependencies."
- "This update needs a major version. List what changes between the versions and which files in my project use this package."
What to check yourself:
- The diff only touches
package.jsonandpackage-lock.json, and no unrelated packages changed. - The AI did not run
npm audit fix --forcewithout telling you. - The build passes and the key flows work on a preview, not only in the editor.
- The alert is gone after the merge. GitHub rescans the default branch, so look at the Security tab again.
The AI can also invent a fix, such as removing a feature to make an alert disappear. Read what it changed. If your code lives only inside a builder, moving it to your own GitHub and hosting comes first, because the routine above needs a repository.
5. Checklist
- Open the alerts and note the severity, the package and whether a fixed version exists.
- Check scope: is it Development (build tool) or does it run in production?
- Run
npm audit --omit=devfor a production-only view. - Start with production packages that have a fix.
- Make a branch. Never update on main.
- Update only the named packages. Patch and minor first, majors one by one.
- Commit
package-lock.jsonwith the change. - Build, run the app and click the key flows.
- Check the preview deploy before merging.
- Do not use
npm audit fix --forceon your main branch. - If there is no fix, judge the exposure and write down your decision.
- Dismiss only with a reason and a comment.
- After merging, test the live site once and check the alert is closed.
Want this fixed for you?
I finish and fix apps built with Lovable, Bolt, Cursor or Replit, including clearing security alerts without breaking the app. Send me the details and I'll reply within 24 hours.