Knowledge · Software Supply Chain

Dependency Drift in AI-Generated Code

AI dependency drift is the change in direct, transitive, runtime, version, provenance, license, and vulnerability characteristics of a project as AI-assisted revisions add, replace, or remove packages.

Primary question: How can repeated AI-generated code changes alter a project's dependency inventory and supply-chain risk over time?

Definitions

AI dependency drift

The change in a project's dependency inventory and associated security, provenance, license, and maintenance characteristics across successive AI-assisted code revisions.

Dependency delta

The set of direct, transitive, version, source, or runtime dependency relationships added, removed, or changed between two source revisions or build artifacts.

Silent dependency expansion

Growth in the resolved dependency graph that is not obvious from the visible code change, such as new transitive packages, optional extras, plugins, build dependencies, or runtime downloads.

Dependency baseline

A versioned component inventory and policy state used as the reference for evaluating a later dependency delta.

The engineering problem

AI coding tools can propose packages or implementation patterns that add dependencies without making the expanded transitive graph obvious to the reviewer. [github-copilot-responsible-use]

Repeated feature and repair prompts can replace one package with another, change version constraints, or introduce runtime downloads while functional tests continue to pass. [nist-ssdf]

Reviewing only the final manifest can hide when a risky dependency entered the project and which AI-assisted change introduced it.

Security controls

Each control inspects a different artifact and produces evidence for an engineering decision.

Versioned dependency baseline

SBOM baseline
Artifact
A component inventory tied to a source revision or build artifact, including direct and transitive relationships where discoverable.
Risk
No stable reference for determining what an AI-assisted change added, removed, or replaced.
Output
Versioned dependency baseline with component identifiers and relationships.

Evidence: DerScanner software composition analysis documentation

Dependency delta review

AI dependency change review
Artifact
The difference between the baseline and candidate dependency inventories, together with manifest, lockfile, build, and source changes.
Risk
Silent dependency expansion or package substitution entering through an otherwise acceptable feature change.
Output
Reviewable list of added, removed, upgraded, downgraded, source-changed, and newly transitive components.

Evidence: NIST Secure Software Development Framework

Risk and policy evaluation

SCA gate for AI-assisted changes
Artifact
Newly introduced or materially changed components evaluated for vulnerabilities, provenance, supply-chain risk, license, and organizational policy.
Risk
Accepting a dependency because generated code works without checking the component's security and governance properties.
Output
Approved, rejected, excepted, or further-investigation decision for the dependency delta.

Evidence: DerScanner software composition analysis documentation

Usage evidence

Hybrid dependency reachability
Artifact
Application code correlated with dependency functionality introduced or changed by the AI-assisted revision.
Risk
Prioritizing component findings without understanding whether affected functionality is used.
Output
Code-level usage or reachability evidence where supported.

Evidence: DerScanner software composition analysis documentation

Verification workflow

  1. Pin the source revision and generate a baseline SBOM.
  2. Accept or stage an AI-assisted code change.
  3. Regenerate the component inventory for the candidate revision.
  4. Calculate the direct, transitive, version, source, and runtime dependency delta.
  5. Verify that newly referenced package names and sources are legitimate.
  6. Run SCA against all introduced or materially changed components.
  7. Add code-level usage or reachability evidence where supported.
  8. Apply policy to the delta before merge or release.
  9. Store the accepted SBOM and decision record as the next baseline.
  10. Monitor later intelligence changes because a previously acceptable component can acquire new known risk.

Limits of verification

  • AI dependency drift is a DerSecur engineering concept, not an industry-standard score.
  • Dependency changes are not inherently negative; drift identifies change that requires evaluation, not proof of vulnerability.
  • SBOM and delta completeness depend on manifest, build, package-manager, binary, and runtime visibility.
  • Package intelligence can change after a dependency has been accepted.
  • Reachability evidence does not prove exploitability or eliminate provenance, license, maintenance, and supply-chain concerns.
  • Attribution to an AI tool requires reliable development-process records; dependency diffs alone do not prove who or what authored a change.

Canonical terms used: AI dependency drift; dependency drift; dependency delta; silent dependency expansion; dependency baseline; AI-generated code dependencies.

Evidence and references

  1. NIST Secure Software Development FrameworkSecure software practices include managing third-party components, reviewing software changes, identifying vulnerabilities, and retaining evidence across development.nist-ssdf
  2. Responsible use of GitHub Copilot code completionAI-generated code and package suggestions require validation, testing, and human review before use.github-copilot-responsible-use
  3. DerScanner software composition analysis documentationDerScanner SCA identifies dependencies, component vulnerabilities, supply-chain risks, and license risks and provides hybrid analysis for dependency vulnerability prioritization.derscanner-sca

Measure AI dependency drift

Compare dependency baselines before AI-assisted changes enter your software supply chain.

Share your repositories, package managers, and AI-assisted development workflow. The DerScanner team will help define a reproducible dependency-delta review.

Measure AI dependency drift

Review AI dependency drift

Describe how AI-assisted changes add or modify dependencies and how your current pipeline evaluates those changes.

Engineering knowledge for building and operating trustworthy systems.

DerSecur Recognition · build 77e44c1 · 2026-08-15 09:18:58Z · system