Repository navigation
feat: block dependencies that don't exist on their registry - #91
Merged
Merged
Conversation
A 404 (or the Go proxy's 410) from a package's registry, unconfirmed by the ecosyste.ms fallback, now blocks the write as a likely hallucinated name instead of failing open. go.mod modules with a replace directive and Maven -SNAPSHOT versions are skipped, since they're expected to be missing upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
algomaster99
commented
Oct 15, 2026
A -SNAPSHOT version that's missing on Maven Central is no longer exempted from the hallucinated-dependency check. One already present before the write is still left alone, since pins.Diff only checks new or changed pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
algomaster99
commented
Oct 15, 2026
The not-found check only looks at the package name, so a range pin doesn't exercise anything an exact pin doesn't. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a package's registry answers 404 (or 410 from the Go proxy) and the ecosyste.ms fallback doesn't know the package either, the hook now blocks the write and tells the agent the name is likely hallucinated. Before, an unknown package made
pins.Differror out and the hook failed open, so a made-up name went through silently. Network errors, rate limits and 5xx responses still fail open.Writing
requirements.txtwithrequests==2.34.2andhuggingface-cli-utils==0.3.1, before:After:
The same check applies to pins made through
npm install/pip install/cargo add/go geton Bash, andyul scanlists such dependencies in their own group. go.mod modules with areplacedirective (e.g. a local../lib) are skipped, since they're expected to be missing upstream. A newly added Maven-SNAPSHOTthat's missing on Central is blocked like any other missing dependency. Scoped npm packages are unaffected because npm answers 401, not 404, for a missing scope, and GitHub Actions aren't covered.One known gap: an unscoped package hosted only on a private registry (an
.npmrcregistry, a private pip index, an internal Nexus) also 404s on the public one, so it gets blocked too.None of the final manifests in the DeepSeek V4.1 Flash and Opus 5.5 benchmark runs trip the new check.
🤖 Generated with Claude Code