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
| Defense | Private names leave your network? | Stops a public squat? |
|---|---|---|
Scoped packages, such as @acme/ on npm | No. | Yes for scoped names. Unscoped legacy names stay exposed. |
One index per client, never pip --extra-index-url | No. | Yes, when every client and CI image is configured correctly. |
| Hosted service that reads your manifests | Yes, as part of the manifest. | Usually. |
Osty keyed-hash match in osty-edge | No. Only hashes are compared inside your VPC. | Yes, and osty-proxy blocks the hijack (a06). |
osty policy validate .osty/policy.yamlHow 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-urlthat 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-proxyare 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.