Skip to content

Answers / Dependency confusion

How do you stop dependency confusion without uploading private package names to a vendor?

Hash your private package names inside your own network and compare them with signed hashes of public names, so only collisions are acted on and the plaintext never leaves. Osty (osty.dev) publishes Ed25519-signed batches of keyed public-name hashes, and osty-edge matches them in your VPC; benchmark scenario a06 proves detection without the private name.

Written by Osty EngineeringPublished Updated

Dependency confusion defenses and what each one exposes
DefensePrivate names leave your network?Stops a public squat?
Scoped packages, such as @acme/ on npmNo.Yes for scoped names. Unscoped legacy names stay exposed.
One index per client, never pip --extra-index-urlNo.Yes, when every client and CI image is configured correctly.
Hosted service that reads your manifestsYes, as part of the manifest.Usually.
Osty keyed-hash match in osty-edgeNo. Only hashes are compared inside your VPC.Yes, and osty-proxy blocks the hijack (a06).
Check the policy your edge and proxy enforce
osty policy validate .osty/policy.yaml

How the attacker picks a name

Internal package names leak through lockfiles in public repositories, error messages and JavaScript source maps. An attacker publishes a public package with the same name and a higher version. Any resolver that consults the public registry for that name, including pip with an extra index, may prefer it.

Matching hashes instead of names

Plane 1 publishes signed batches of keyed hashes of public package names for npm, PyPI, Go, Cargo and Maven. osty-edge hashes your private names with the same scheme inside your VPC and looks for collisions there. When a new public publish collides, osty-proxy blocks it.

Scenario a06 checks that Plane 1 detects the collision without ever receiving the plaintext private name, and that the proxy refuses the hijacked package.

Close the resolver gap as well

  • Move internal npm packages under an organisation scope and map that scope to your private registry in .npmrc.
  • Give pip a single --index-url that proxies public packages, instead of --extra-index-url.
  • Register your organisation's scope or namespace on public registries so nobody else can claim it.

Limits and plan requirements

  • In-VPC dependency-confusion protection and osty-proxy are part of Enterprise, not Free or Team.
  • Hash batches cover npm, PyPI, Go, Cargo and Maven. RubyGems and NuGet names are not matched.
  • If every client already resolves internal names only from a private registry with strict scopes, the resolver fixes above may be all you need.

Frequently asked questions

Does Osty ever see my private package names?

No. They are hashed and matched inside your VPC by osty-edge.

Which ecosystems are covered?

npm, PyPI, Go, Cargo and Maven.

Is this available on the Team plan?

No. In-VPC dependency-confusion protection runs with osty-edge and osty-proxy, which start at Enterprise.

See what is actually exposed in 10 minutes

Connect a read-only GitHub App and cloud role. Osty installs nothing in your environment and writes nothing to your repositories. The report strips out backport and reachability noise before your team or coding agents patch it, and flags stale deploys and unowned workloads.