Skip to content

Offensive Dependency Confusion

Guides an agent through dependency-confusion attack methodology and recon across package ecosystems.

Stars
10,230
Licence
MIT
Files
1 file

What it does

This skill gives an AI agent a detailed playbook for dependency confusion attacks, where a public package with a higher version number tricks a build system into installing it instead of a company's private internal package. It covers how to find internal package names (lock files, source maps, error messages, public GitHub code) and how to build a harmless callback proof-of-concept across npm, PyPI, NuGet, Maven, Go, RubyGems and Docker. It is written for authorized penetration testers and includes defensive hardening guidance for reports.

Great for

  • Security professionals running authorized supply-chain engagements who want a structured methodology
  • Red teams writing reports that explain dependency confusion risk and remediation
  • Students learning how package resolution order creates supply-chain vulnerabilities

Skip it if

  • Anyone testing systems they do not have written permission to test, since publishing packages to public registries can affect real companies and is illegal without authorization
  • Developers simply trying to protect their own builds, who would get better value from a defensive guide to registry scoping and pinning
  • Non-security users, because the content assumes familiarity with package managers and attack tooling

Try asking

  • “Analyze this package-lock.json and yarn.lock from our authorized client to list packages that may be internal-only”
  • “Outline a safe dependency confusion proof-of-concept with a DNS canary for an approved engagement”
  • “Write a reconnaissance checklist for finding internal npm and PyPI package names in a client's public footprint”
  • “Draft remediation recommendations for a report covering misconfigured .npmrc and --extra-index-url usage”
Step-by-step guide: how to use Offensive Dependency ConfusionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    offensive-dependency-confusion.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip offensive-dependency-confusion.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip offensive-dependency-confusion.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Scope the engagement in writing first, including which package names may be published and when they must be removed
  • Ask the agent for defensive remediation output (scoped registries, pinned versions, namespace reservation) alongside any offensive steps
  • Keep callback payloads to DNS or HTTP beacons with no data exfiltration, as the skill itself recommends

What's inside

  • SKILL.md

Redistributed unmodified from SnailSploit/Claude-Red under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.