← Back to BlogSecurity

Linux Foundation: 60% Say AI Coding Tools Add Dependencies

A Linux Foundation survey says 60% see more dependencies from AI coding tools. What it measured, what it did not, and a lockfile check to run.

A Linux Foundation survey of 308 security practitioners reports that 60% of the organizations and projects answering say AI coding tools increase the number of external dependencies in their codebases, against 16% who say they decrease them. The same report says teams review transitive dependencies only about half of the time. Those figures are self-reported survey answers, not lockfile measurements, but the fix does not need better data: list what entered your lockfile on every AI-written branch, and make adding a package a decision a person takes.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF), Linux Foundation research page

Disclosure: we build TLM Forge, a process layer for Claude Code, so weigh the product section accordingly. Most of this post applies with or without us.

What the report says about dependencies

The report is State of AI Impact on Software Security and Cybersecurity 2026, written by Sam Boysel of the Linux Foundation, with a foreword by Laura Guazzelli of OpenSSF and a date of November 2026. OpenSSF, LF AI & Data and ActiveState sponsored it. It surveys practitioners on how AI changes software security risk, and dependencies are one thread among several. For anyone running a coding agent, it is the thread this post follows.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

The reasoning is short. In the report's words, "AI coding tools tend to be quite verbose, directly increasing attack surfaces by introducing more lines of code that often rely on third party dependencies." Each of those packages can pull in indirect, or transitive, ones. The survey then puts numbers on it: 60% of organizations and projects say AI coding tools increase the number of external dependencies in their codebases, against 16% who say they decrease them, and projects and organizations review transitive dependencies "only about half of the time (53%)". The report links that thin review to supply chain attacks, slopsquatting and other dependency-related vulnerabilities.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

Its action items are concrete. The first is a trusted source: "Pull dependencies from a vetted, policy-governed repository so developers and AI coding tools get an approved path by default." The second asks for regular audits, automated dependency scanning and "strict review processes for new dependencies." The report's policy recommendations go further: require review of new dependencies, keep inventories and provenance records, and scan generated code and dependencies. A line from the same report is worth keeping in mind whenever an agent proposes a package: "One less dependency means one less factor beyond the purview of the security team."

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

What the report says about review and policy

The dependency finding sits inside a picture of thin ownership. Only 30% of teams have a dedicated role or group responsible for AI software security threats, and nearly one third of organizations have a formal security policy covering AI tool usage and threats. Among the AI policies respondents described, 76% list approved AI tools, 57% mandate human review of AI-generated code and 36% cover automated scanning using AI tools or services. One action item speaks to production directly: AI-generated code for mission critical production systems "should be prioritized for human review." And 58% of organizations say they ship code faster than security review can keep up.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

Another 2026 survey also puts the constraint on review rather than generation, as covered in Qodo's 2026 Report: Review Is the AI Coding Bottleneck. The Linux Foundation report adds a dependency angle: respondents say review of transitive dependencies is thin, and those are the packages nobody typed.

Read the numbers before you quote them

Start with who answered. The methodology page describes a web survey distributed through Linux Foundation newsletter subscribers, Linux Foundation social channels and partner channels (OpenSSF, ActiveState, LF AI & Data and IoTM2M). It was fielded in June and July 2026, had 308 qualified respondents and states a margin of error of plus or minus 7% at the 95% confidence level. People reached through a foundation's newsletters and partner channels are not a random sample of developers. Answers also pool two groups: 73% of respondents answered from the perspective of organizations and 20% from open source projects, and unless noted the figures are the pooled average.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

Each question also drew fewer answers than the headline sample. The two dependency questions had 176 and 153 respondents, and the shipping-pace question had 173. The press release from sponsor ActiveState, dated November 9, 2026, says the survey covered 172 security practitioners, while the report says 308, so cite the report.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF), ActiveState press release via PR Newswire, November 9, 2026

Headline numberWhat the report says it countsEasy to get wrong
60% versus 16%Share of organizations and projects saying AI coding tools increase or decrease external dependencies (176 respondents)A self-reported answer, not a count of packages added. The report text gives no package counts.
53%Average likelihood of reviewing transitive dependencies, which the report reads as review "only about half of the time" (153 respondents)A self-reported average, not a measure of how many risky packages got through.
58%Share of organizations shipping code faster than security review can keep up (173 respondents)It describes shipping pace against security review. The text gives no separate figure for AI-written code.
57%Share of the AI policies respondents described that mandate human review of AI-generated code (156 respondents)A share of the policies respondents described, not of all teams.
17% and 30%Speed-up of security-related development work and extra workload from false-positive vulnerability reports, as practitioners report themThe report places these in its section on AI-assisted security tools. They describe security work, not how fast AI coding tools produce code.
Insight

Cite the PDF, not the summaries. The research page's summary says AI coding tools boost security development speed by 17%, while the report presents the 17% and the 30% in its section on AI-assisted security tools. Together with the press release's 172 respondents against the report's 308, that is two places where a summary and the PDF differ. The PDF is the document to quote.

What the dependency findings do not show is harm. The report states that across every threat it evaluated, "concern consistently outpaces preparedness, which in turn outpaces actual threat incidence," and its conclusion says concern is widespread even where reported incident experience remains lower. Read the dependency findings as a statement about review habits and expectations, not as a count of breaches caused by AI-added packages.

Sources: Linux Foundation: State of AI Impact on Software Security and Cybersecurity 2026 (PDF)

Why one package is rarely one package

Your manifest lists what a person or an agent asked for. The lockfile lists everything that came with it. npm describes the packages field of its lockfile as an object that maps package locations to information about each package, and says the file is intended to be committed into source repositories. In a throwaway repo on npm 11.12.1, a lockfile-only npm install of express into an empty project produced a lockfile with 65 package entries besides the root: one direct dependency, and 64 transitive entries nobody typed. The count depends on the package and the day it resolves, so read it as an illustration of the ratio, not a benchmark.

Sources: npm docs: package-lock.json

The other risk is a name that should not exist. A paper on arXiv, listed as appearing at the 2025 USENIX Security Symposium, generated 576,000 code samples in two programming languages with 16 popular code-generation LLMs. It found the average share of hallucinated packages was at least 5.2% for commercial models and 21.7% for open-source models, including 205,474 unique hallucinated package names. OpenSSF's guide for AI code assistant instructions describes the follow-on attack, slopsquatting, where attackers create malicious packages with names commonly hallucinated by AI models. The study measured generated code samples, not a particular agent's install session, so its rates do not transfer to the tool you use. They show the failure mode is real enough to check for.

Sources: arXiv 2406.10279: We Have a Package for You!, OpenSSF: Security-Focused Guide for AI Code Assistant Instructions

A hallucinated name is one problem and a compromised real package is another. An npm worm that rewrote agent configuration files is covered in Tensorlake npm Worm Rewrote Your AI Agent Config Files. The checks below address the first problem and give you the inventory you need for the second.

A five-minute check for every AI-written branch

None of this needs a platform. Four steps, ordered by effort.

1. List what entered the lockfile

``` # Direct dependencies added on this branch (compare against main) diff \ <(git show main:package.json | jq -r '(.dependencies // {}) + (.devDependencies // {}) | keys[]') \ <(jq -r '(.dependencies // {}) + (.devDependencies // {}) | keys[]' package.json) # Every package that entered the lockfile, including transitive ones list() { jq -r '.packages | to_entries[] | select(.key != "") | "\(.key | sub(".*node_modules/"; ""))@\(.value.version)"' | sort -u; } comm -13 <(git show main:package-lock.json | list) <(list < package-lock.json) ```

This needs bash or zsh, jq, and an npm lockfile with a packages field. Each line the second command prints is a name and version, so an upgraded version of a package you already had shows up too. Our test lockfile was version 3, the version npm's docs attribute to npm v9 and above. We ran the commands in a throwaway repo with npm 11.12.1 and jq 1.7.1, under both bash and zsh. Other ecosystems have equivalent lockfiles, and the idea carries over: diff the resolved set, not the manifest. If you review on GitHub, dependency review shows which dependencies were added, removed or updated, with release dates, and includes details of changes to indirect dependencies in lock files. The docs' availability note names public repositories on GitHub.com and organization-owned repositories on GitHub Team with GitHub Code Security enabled, so check your plan. How to Guardrail an AI Agent's CI/CD Pipeline places it in a wider pipeline.

Sources: npm docs: package-lock.json, GitHub docs: Dependency review

2. Look up each new direct dependency

For each name the first command printed, ask the registry before anyone reads the code that uses it.

``` npm view PACKAGE name version time.created npm view PACKAGE maintainers --json ```

On npm 11.12.1 the first command prints the name, latest version and creation time of a package that exists, and fails with an E404 error for a name that does not. The E404 message says the resource could not be found or you do not have permission to access it, so read it as a name you cannot see on the registry you queried, and ask the agent where the name came from. Do not guess a correction, because a near match you did not intend is a different package. A package that is only weeks old and has one maintainer is not disqualified, but it is a fact to weigh in review. Existence is the low bar: a name that resolves can still be a lookalike.

3. Make adding a package ask first

Claude Code evaluates permission rules in the order deny, then ask, then allow, and a matching ask rule prompts even when a narrower allow rule also matches. Put install commands and manifest edits under ask in the project settings file, .claude/settings.json:

Sources: Claude Code docs: Configure permissions

``` { "permissions": { "ask": [ "Bash(npm install *)", "Bash(npm i *)", "Bash(npm add *)", "Bash(pnpm add *)", "Bash(yarn add *)", "Bash(pip install *)", "Bash(uv add *)", "Bash(cargo add *)", "Bash(go get *)", "Edit(package.json)", "Edit(pyproject.toml)", "Edit(requirements.txt)", "Edit(go.mod)", "Edit(Cargo.toml)" ] } } ```

Adjust the commands to your package managers. A trailing * with a space before it also matches the bare command, so Bash(npm install *) prompts on a plain npm install too. Edit rules apply to all built-in tools that edit files, so Edit(package.json) prompts when Claude edits the manifest directly. The rule matches the file path, so it prompts for any edit to that file, not only edits to the dependency lists. The modes docs list tools matched by an explicit ask rule among the actions no permission mode auto-approves, bypassPermissions included. Read the docs' limits before relying on this. A Bash rule matches the command text Claude writes and is not a security boundary: the docs' own table shows Bash(curl *) does not stop sh -c 'curl https://example.com', and the same reasoning applies to install commands. For filesystem and network enforcement that does not depend on command text the docs point to sandboxing, and to a PreToolUse hook to inspect the full command with your own logic. Claude Code Permissions: What Deny Rules Miss goes through the gaps.

Sources: Claude Code docs: Configure permissions, Claude Code docs: Permission modes

4. Write the rule down, and know what it is

Add a line to CLAUDE.md that asks the agent to justify any package:

``` Do not add a dependency without asking first. For each candidate, say what it replaces and why the standard library or an existing dependency is not enough. ```

This line is advisory. The permissions docs say rules are enforced by Claude Code, not by the model, and that instructions in your prompt or CLAUDE.md "shape what Claude tries to do, but they don't change what Claude Code allows." The line's job is to make the agent show its reasoning, and the ask rule's job is to make it stop. Why Your CLAUDE.md Gets Ignored covers why advisory text fades. OpenSSF's guide offers its own sample wording for assistants, including "Do not add dependencies that may be malicious or hallucinated."

Sources: Claude Code docs: Configure permissions, OpenSSF: Security-Focused Guide for AI Code Assistant Instructions

ControlCatchesMisses
Lockfile diffEvery package added, including transitive onesWhether any of them is a good idea
Registry lookupNames the registry cannot find, very new packages, thin maintainer listsA real package with bad intent
Ask rules in Claude CodeInstall commands and manifest edits Claude issues in the usual formUnusual command forms, other agents, installs run by scripts you started
GitHub dependency reviewAdded and updated dependencies on a pull request, with vulnerability data, release dates and indirect changes in lock filesRisk not yet recorded as a vulnerability
Design review before buildingA package the plan names, before any code existsA package that arrives later by a different route
Pro Tip

Start with the lockfile diff. It costs nothing, needs no tooling decision, and turns "the agent added a library" into a list a reviewer can read.

Where TLM Forge fits, and where it does not

TLM Forge sizes each task Light, Medium or Deep. For Medium and Deep it shows a design for your OK before building, so you can ask whether the plan needs a new package and refuse it before any code exists (design sign-off). If the spec lists new packages as out of scope, the phase-auditor checks that out-of-scope items were respected.

The limits are real. The phase-auditor is an LLM agent and can miss a package, Light tasks get no review agents, and TLM Forge does not replace a lockfile diff, a vulnerability scan or a look at who maintains a package. Those checks are yours to run.

Frequently asked questions

01Do AI coding tools add more dependencies to a project?

In a Linux Foundation survey of 308 practitioners, 176 answered the dependency question. Of them, 60% said AI coding tools increase their external dependencies and 16% said they decrease them. These are self-reported answers, not package counts. A lockfile diff on an AI-written branch shows what a tool did in your project.

02What is slopsquatting?

OpenSSF describes slopsquatting in its guide for AI code assistant instructions as attackers creating malicious packages with names commonly hallucinated by AI models. A developer who installs such an invented name gets malicious code. Because the attacker registers the name, a registry lookup alone proves little. Check who published it, when, and whether a person chose it.

03How do I see which packages an AI agent added to my project?

Compare the lockfile on your main branch with the one on the agent branch and list entries that exist only on the branch. The manifest diff shows direct additions, and everything else is transitive. A GitHub dependency review shows added, removed and updated dependencies and includes indirect changes in lock files.

04Can Claude Code ask before it installs a package?

Yes. Add ask rules for install commands and manifest edits to your settings, and Claude Code prompts when it tries them. Rules match the command text Claude writes, so they cover usual forms and are not a security boundary. A line in CLAUDE.md asking for approval is advisory only.

05Is the Linux Foundation AI security survey reliable?

Treat it as directional. It has 308 qualified respondents reached through foundation newsletters, social channels and partner channels, a stated margin of error of plus or minus 7%, and fewer answers on each question. It measures self-reported views and practices, not incidents caused by AI-added dependencies.

Ship AI-written code you can trust

TLM Forge is the missing process layer for Claude Code: a spec audit, independent multi-agent review, enforced TDD, and an adversarial red-team gate.

Get TLM Forge