offensive-dependency-confusion

offensive-dependency-confusion is a skill for Claude Code, Codex from Miosa-osa/OSA. It costs 168 tokens per session (5,905 once invoked), scanned A, a copy of offensive-dependency-confusion, Apache-2.0.

A security-testing guide to dependency confusion, where a package manager downloads a malicious public package instead of an organization's private package. It covers this risk across common package ecosystems.

In plain words
What is it for?
Use it to review npm, Python, and other package registries, private package scopes, and configuration that controls where dependencies are downloaded.
Why use it?
It helps reveal registry and package-name configuration mistakes that can let untrusted code enter a build. This addresses a supply-chain risk before it reaches deployed software.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to review npm, Python, and other package registries, private package scopes, and configuration that controls where dependencies are downloaded.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miosa-osa/osa/offensive-dependency-confusion
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Miosa-osa/OSA --skill offensive-dependency-confusion
Clone the repo
git clone --depth 1 https://github.com/Miosa-osa/OSA

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for offensive-dependency-confusion

README.md
[![agentmods](https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-dependency-confusion/github.svg)](https://agentmods.dev/skills/miosa-osa/osa/offensive-dependency-confusion)
Your own site
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-dependency-confusion"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-dependency-confusion/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for offensive-dependency-confusion

Your own site · 80×15
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-dependency-confusion"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-dependency-confusion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00168 $0.05905
Opus 5.5 $0.00067 $0.02362
Sonnet 5.5 $0.00034 $0.01181
Haiku 4.5 $0.00017 $0.00590

Measured 1mo ago against content hash d03e56a13aa5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

offensive-dependency-confusion scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

code=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/$pkg/json")
Origin

This is a copy

88% identical to offensive-dependency-confusion — 42 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

priv/skills/offensive-dependency-confusion/SKILL.md · 643 lines

How it starts

The opening of the file, as written. The whole thing — 643 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Offensive Dependency Confusion and Namespace Attacks

Dependency confusion exploits a fundamental design tension in package managers: the need to resolve packages from multiple sources. When an organization maintains internal packages alongside public dependencies, the resolution logic becomes an attack surface. You exploit the gap between how developers intend packages to resolve and how package managers actually resolve them.

Alex Birsan's 2021 research demonstrated that this class of attack affected Apple, Microsoft, PayPal, Shopify, Netflix, Yelp, Tesla, and Uber, among others. The root cause -- preferring a higher-versioned public package over a lower-versioned private one -- remains exploitable wherever registry configuration is incomplete.

This skill provides ecosystem-specific exploitation techniques, safe PoC methodology, and comprehensive reconnaissance approaches for discovering internal package names during authorized engagements.

Quick Workflow

  1. Perform reconnaissance to discover internal/private package names used by the target.
  2. Identify the target's package ecosystems and registry configuration.
  3. Verify that candidate package names are unclaimed on the corresponding public registry.
  4. Prepare a safe PoC package with a DNS canary or HTTP callback and a high version number.
  5. Publish the PoC to the public registry with a clear security research description.
  6. Monitor the callback endpoint for execution confirmations from target infrastructure.
  7. Record callback metadata (hostname, username, CI flag, timestamp) as evidence.
  8. Remove the PoC package from the public registry after confirmation or engagement window closes.
  9. Document the full attack chain, impacted systems, and registry hardening recommendations.

Reconnaissance for Internal Package Names

Discovering what internal packages a target uses is the critical first step. You extract package names from every available artifact and signal.

Lock File Analysis

Lock files are the highest-fidelity source of internal package names. They list every resolved dependency with exact versions and, in some formats, the registry source.

Read the full file on GitHub · 643 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 643 lines · 168 tokens per session scan A d03e56a13aa5

Subscribe to this mod's changes

offensive-dependency-confusion is a skill published in the GitHub repository Miosa-osa/OSA (78 stars, last pushed 11d ago), licensed Apache-2.0. It adds 168 tokens to every session and 5,905 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 88% identical to offensive-dependency-confusion, differing in 42 lines, and is treated as a copy.

Related

Other skills, from other repositories

meta-long-running-build-watchdog

Watches a long-running command via tmux, lets sub-agent diagnose failures and propose a fix, and records the diagnosis to memory. Designed for overnight model fine-tunes, CI image builds, or repeated regression suites that may fail intermittently.

opensquilla/opensquilla · 131 tokens

ci-debug

Diagnose a failing CI run against an 11-pattern playbook. Classifies the failure, cites the relevant memory entry, proposes the exact fix command — but NEVER applies without explicit user approval. Use when a specific PR check or GitHub Actions run failed and you want a diagnosis instead of speculation. Don't use for…

yonatangross/orchestkit · 92 tokens

devops-deployment

Use when setting up CI/CD pipelines, containerizing applications, deploying to Kubernetes, or writing infrastructure as code. DevOps & Deployment covers GitHub Actions, Docker, Helm, and Terraform patterns.

yonatangross/orchestkit · 44 tokens

ci-fixer

A CI job fails on a named revision and the fix belongs in code, config or tests, not in the CI provider.

hex/claude-council · 29 tokens

documentation-patterns

Technical documentation patterns for READMEs, ADRs, API docs (OpenAPI 3.1), changelogs, and writing style guides. Use when creating project documentation, writing architecture decisions, documenting APIs, or maintaining changelogs.

yonatangross/orchestkit · 53 tokens

pr-babysitter

Monitors or repairs an open GitHub PR: CI failures, conflicts, review threads, and merge readiness, reporting state changes. Use when asked to "watch this PR", "fix CI", "resolve conflicts", or "address review comments".

mblode/agent-skills · 55 tokens