Dependency Monitoring for AI-Built Apps: A Supply Chain Security Guide

Dependency Monitoring for AI-Built Apps: A Supply Chain Security Guide

August 2, 2026
LunaMiaEno
Written byLuna·Researched byMia·Reviewed byEno·Continuously Updated·9 min read

Your AI agent has wired up authentication, payments, and the database, and the interface works. Then, right before deployment, you notice a row of unfamiliar packages in package.json and thousands of lines in the lockfile. Which dependencies actually reach production? What changed in last week's pull request? Nobody may have a clear answer.

The useful question is not whether AI-written code is inherently dangerous. There is not enough primary-source evidence to claim that AI-assisted projects suffer more supply chain incidents than hand-written ones. What we can see is a process gap: AI makes adding packages, editing workflows, and copying install commands fast, while review has not accelerated at the same rate.

Once a dependency runs on your server, payment path, or GitHub Actions workflow, a failure can expose more than a broken build. This guide is for indie makers who have built a Node.js or Next.js app with AI and can use GitHub and a terminal. If those tools are still new, start with the 30-minute version rather than jumping straight into CI gates.

The short answer: commit the lockfile, confirm that GitHub's dependency graph can read it, review every dependency change in a pull request, and then enable alerts and remediation pull requests. A clean npm audit or OSV-Scanner result only means no current match against known-vulnerability data. It does not certify a new package as trustworthy.

Map the blast radius before choosing tools

A small side project can still give a dependency access to servers, build pipelines, secrets, or deployment permissions. Start with five failure modes instead of memorizing attack names.

Failure modeWhat you seeLowest-cost gate
Invisible inventoryYou cannot list direct and transitive dependenciesCommit the lockfile and create a dependency graph
Unreviewed changeAI quietly adds a package in a pull requestRequire a reason and review the dependency diff
No alertingNobody notices when a vulnerability is disclosedEnable Dependabot alerts and security updates
Unsafe remediationA bot update breaks the appRun the existing build, tests, and production-path checks
Scanner blind spotA clean scan is treated as proof of safetyReview package origin, install scripts, and project health

GitHub's dependency graph builds an inventory from manifests, lockfiles, and submitted dependency data. CISA also places open source inventory and SBOMs within a broader risk-management process, but its guidance is not a law requiring every small project to implement every control.

Build an inventory with the lockfile and dependency graph

A dependency inventory is a continuously updated list of direct and transitive dependencies, including at least the package, version, and source file. A transitive dependency is installed by another package rather than directly by you. Without an inventory, alerts and pull request reviews have no dependable baseline.

Do three things first:

  1. Commit the lockfile. For npm projects, that usually means package-lock.json, not only package.json.
  2. Open Insights → Dependency graph → Dependencies in the GitHub repository and confirm that it shows package names, versions, and source manifests or lockfiles.
  3. Create a first vulnerability snapshot:
npm audit

The npm documentation explains that the command sends dependency-tree information to the configured registry and returns known-vulnerability findings. It is useful, but it is not code review and cannot tell you whether a new package deserves trust.

Stop quiet dependency changes at the pull request

An AI suggestion that a library can solve a problem is not an approval to introduce it. Every manifest, lockfile, or workflow change should answer three questions: Why is it needed? Can existing code do the job? What direct or transitive dependencies changed?

GitHub Dependency Review shows added, removed, and updated dependencies in a pull request, including lockfile changes and known vulnerabilities. With the Dependency Review action and a required check, it can block a merge when a change violates your policy.

Keep the pull request template short:

## Dependency change
- Purpose:
- Why existing code is insufficient:
- Manifest and lockfile diff reviewed: yes/no
- Build and test results:

The tool exposes the diff. A person still decides whether the package belongs in production.

Give npm audit, OSV-Scanner, and Dependabot different jobs

Running every scanner in CI can produce the same alert three times. Divide them by the point in the workflow they protect.

StageToolQuestion answeredWhat it does not do
Localnpm auditWhich known vulnerabilities match the npm dependency tree?Judge whether a new package is trustworthy
Pull requestDependency ReviewWhich dependencies changed, and did a known vulnerability enter?Test runtime compatibility
CIOSV-ScannerDo source, lockfile, or container packages match OSV data?Prove unknown malicious behavior is absent
Hosted alertsDependabotWhich dependencies in the graph have known vulnerabilities?Prove a remediation pull request is safe
Remediation PRDependabot security updatesCan it update to the lowest patched version?Replace your build and tests

OSV-Scanner is useful when your CI still lacks coverage for a lockfile, source tree, or container. Its official GitHub Action can produce SARIF output. If GitHub's native workflow already covers your needs, do not add another scanner merely to increase the tool count.

SetupBest forPR gateOngoing alertsMain limitation
Lockfile + npm auditLocal maintenance without GitHub gatesNoneNoneRelies on someone remembering to run and track it
GitHub-native workflowOne GitHub repository needing PR review and hosted alertsDependency Review, subject to plan and configurationDependabot alertsRepository type, plan, and platform constraints
GitHub + OSV-ScannerA remaining CI, lockfile, or container coverage gapWorkflow-dependentDuplicate alerts are possibleAdditional workflow and triage cost

Start with GitHub's native controls for one GitHub repository. Add OSV-Scanner only when you can name the missing scan location. For repositories hosted elsewhere, recreate the four functions through your platform or CI: inventory, a pull request gate, ongoing alerts, and remediation updates.

Build the minimum defense in 30 minutes, two hours, or half a day

These are planning tiers, not measured guarantees. Older repositories, monorepos, and projects without tests will take longer.

If you have 30 minutes

  • Commit and inspect the lockfile.
  • Confirm that the dependency graph recognizes packages.
  • Run npm audit once and save the result in an issue or maintenance log.
  • Assign an owner for future security alerts, even if that owner is you.

If you have two hours

  • Enable Dependabot alerts and security updates.
  • Add a dependency-change section to pull requests.
  • Add a required Dependency Review check if your repository and plan support it.
  • Send one real update pull request through dependency review, build, and tests.

Dependency Review availability differs between public and private repositories and GitHub plans. Alerts, security updates, and Dependency Review are separate features, not one master switch. Confirm the current support and setup steps in the linked official documentation.

If you have half a day

  • Add OSV-Scanner only where CI still has a coverage gap.
  • Configure branch protection or a ruleset so required checks cannot be skipped.
  • Rehearse the path from receiving an alert to merging a fix.
  • Use OpenSSF Scorecard as an additional upstream project-health signal.

Stop there. Every detector needs an owner and a review cadence. An unread dashboard is just better-looking anxiety.

Triage alert overload with a decision tree

Separate security updates from routine version updates. Then work through five questions:

  1. Does the dependency reach production, the build, or deployment? Record the basis for the answer.
  2. Is a patched version available? If not, consider disabling the feature, replacing the package, or reducing exposure.
  3. Does the fix move a parent dependency or major version? Keep broad changes on a separate branch for manual review.
  4. Do existing tests cover the production path? If not, add a focused manual check.
  5. Must you defer it? Record the reason, impact, owner, and next review date.

Dependabot security updates attempts to open a pull request for the lowest version that contains a patch. npm can sometimes update a parent to fix a transitive dependency, while other ecosystems have different limits. A missing bot pull request therefore does not mean the vulnerability can be ignored.

Auto-merge only when your tests deserve that trust

A Dependabot pull request is a candidate for auto-merge only when the dependency diff is narrow, branch protection is active, required checks pass, and your tests cover the affected production path. A security purpose does not guarantee runtime compatibility.

Before merging, confirm that the dependency diff contains no surprises; run the repository's actual build, lint, type checks, and tests; cover login, payments, or data writes where relevant; and make sure the pull request did not weaken branch protection or required checks. If the project has no tests, keep auto-merge off.

A clean scan is not a package trust assessment

npm audit and OSV-Scanner answer whether a version matches currently known vulnerabilities. They do not confirm that the package name is correct, an install script is harmless, a maintainer has not changed, or a new release is trustworthy.

For every new package:

  • Cross-check the registry entry, official repository, and package name.
  • Look for unusual changes in releases, maintainers, or repository activity.
  • Inspect scripts, especially commands executed during installation.
  • Avoid adopting a brand-new production release immediately without a concrete reason.

OpenSSF Scorecard adds project-health signals such as branch protection, dependency updating, and risky workflows. Treat the score as a clue, not a security certificate.

Review the defenses themselves

A scanner in .github/workflows receives permissions, downloads actions, and executes code. Treat workflow changes like production dependency changes: require human review, reduce permissions to the minimum needed, and pin action references according to your team's policy. Security-tool updates still go through required checks.

Keep the system alive with a weekly 20-minute timebox

The timebox is a habit, not a promise to clear every alert. Spend the first five minutes on security alerts and production scope, eight minutes reviewing low-risk fixes that passed CI, five minutes deciding what to do with one larger update, and the final two minutes recording deferrals and removing notification noise.

If you always run over, check whether routine updates and security fixes share one queue, whether scanners duplicate findings, and whether missing tests make every low-risk pull request expensive. Alert fatigue is often a workflow bottleneck rather than a detector problem.

Upgrade to formal SBOM or paid SCA only when the need appears

For a small single-repository project, a usable dependency inventory is usually the practical starting point. Move toward a formal SBOM when customers need a machine-readable deliverable, compliance enters the picture, or multiple repositories require shared governance.

Keep the minimum workflowEvaluate a platform or formal SBOM
One or a few repositoriesMany repositories need a shared policy
Weekly manual triage is manageableAlerts need assignment and audit trails
Dependency diffs and CI provide enough evidenceReachability or cross-project analysis is required
No external reporting format is requiredCustomers, procurement, or compliance request reports
Current hosting and plan supply the needed gatesThe repository is elsewhere or the plan lacks integrations

Do not buy a system you cannot maintain because larger companies use it. But if customers already ask which open source components you ship and who owns vulnerability response, an occasional npm audit is no longer enough.

Put one dependency pull request through the full loop today

AI-assisted shipping will not slow down, and you do not need to research every package for a week. Today, commit the lockfile, confirm that the dependency graph works, and take one real dependency pull request through justification, diff review, vulnerability checks, build, tests, and human approval.

If you only have one evening, stop after the inventory and first vulnerability snapshot. If CI and tests already exist, add Dependency Review and rehearse an update. Tools will keep changing names; the review path that speed cannot bypass is what keeps the app maintainable after launch.

FAQ

Should I let an AI agent run npm audit fix --force?

Not directly on your main branch. Run it on a separate branch, inspect the lockfile diff, and execute your existing build and tests. If it introduces a major-version change, keep the compatibility decision with a human reviewer.

Does a side project need an SBOM or SLSA?

A small single-repository project can start with a reliable dependency inventory, a pull request gate, known-vulnerability scanning, and scheduled triage. Consider a formal SBOM or broader supply chain framework when customers, compliance requirements, or multi-repository governance demand it.

Are free dependency security tools enough?

For one side project, free tools can usually create a basic closed loop, subject to current GitHub plan availability. Consider a paid SCA platform when you need cross-repository policies, reachability analysis, team workflows, or compliance reporting.

Was this article helpful?

Tenet Security identified at least 2,388 organizations with injectable Sentry DSNs: attackers can hijack Claude Code or Cursor via fake error reports to exfiltrate AWS credentials. Tenet reported an 85% success rate across tested agents, with no account breach needed.

Agentjacking: How a Fake Sentry Bug Report Can Hijack Your AI Coding Agent

Read next9 min read

Tenet Security identified at least 2,388 organizations with injectable Sentry DSNs: attackers can hijack Claude Code or Cursor via fake error reports to exfiltrate AWS credentials. Tenet reported an 85% success rate across tested agents, with no account breach needed.

Read next

Quality guarded by our community

We're committed to accuracy. Spot something off? Your feedback helps every reader.

AI and dev tool comparisons, in your inbox