Detecting Dependency Confusion

Detect and prevent public-over-private name resolution in npm, PyPI, and Maven.

100 stars 27 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add adriannoes/awesome-agentic-ai --skill detecting-dependency-confusion
Manual install
git clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai.git /tmp/awesome-agentic-ai
mkdir -p ~/.claude/skills
cp -r /tmp/awesome-agentic-ai/cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/detecting-dependency-confusion ~/.claude/skills/detecting-dependency-confusion

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Detecting Dependency Confusion

> **Legal Notice:** This skill is for authorized security testing, defensive engineering, and educational purposes only. Registering or claiming package namespaces you do not own, or testing build pipelines without written authorization, may be illegal and may violate the terms of service of public registries. Only run namespace-claiming or resolution-testing activities against names and infrastructure you control or are explicitly authorized to assess.

## Overview

Dependency confusion (also called a substitution or namespace-shadowing attack) was popularized by Alex Birsan in 2021 when he forced malicious code into the internal build systems of Apple, Microsoft, PayPal, and dozens of others. The root cause is that many package managers, when configured to resolve from both an internal/private registry and a public one, will prefer whichever copy has the **higher version number** rather than honoring the source. An attacker who learns the name of a private package (`@acme/internal-utils`, `acme-billing-sdk`) can publish a malicious package of the **same name** to the public registry (npmjs.com, PyPI, Maven Central) with a very high version (e.g. `99.0.0`). When the victim's CI/CD runner or a developer machine resolves dependencies, it pulls the attacker's public package, executes its install scripts, and the supply chain is compromised.
Read the full skill on GitHub

Details

Skill name
detecting-dependency-confusion
Path
cursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/detecting-dependency-confusion/SKILL.md
License
MIT
Repo updated
2 November 2026

FAQ

What does the Detecting Dependency Confusion skill do?

Detect and prevent public-over-private name resolution in npm, PyPI, and Maven.

How do I install the Detecting Dependency Confusion skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add adriannoes/awesome-agentic-ai --skill detecting-dependency-confusion. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Detecting Dependency Confusion popular?

It lives in adriannoes/awesome-agentic-ai, which has 100 GitHub stars and 27 forks, and is included in 2 curated skill lists.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.