GeezerVison is showing github.com — Prefer the most specific index authentication policy by zaniebot · Pull Request #174 · astral-sh/uv-dev
Conversation
zaniebot
commented
Jul 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Overlapping index roots use the first hash-set match, so a broader authenticated index can override a nested authenticate = "never" index and send credentials. Choose the most-specific matching root, prefer never on ties, and reject credentials already attached to the request. uv#11896 introduced this policy to prevent credential leakage, and uv#19154 fixed related path-boundary matching.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
zaniebot
added
priority:1
High: material security boundary, data loss, silent incorrect results, or major regression.
size:3
Substantial: interacting behaviors, difficult compatibility questions, or a careful migration.
bug
Something isn't working
security
risk:3
Credible risk of meaningful incorrect behavior or regression; bounded or recoverable.
labels
Sep 9, 2026
codspeed
Bot
commented
Oct 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will not alter performance
⚠️ 8 benchmarks spent significant time in system calls
System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.
Measurement and system calls
✅ 69 untouched benchmarks
⏩ 35 skipped benchmarks1
Comparing zb/bughunt200/154-authenticate-never-index-overlap (6e89b85) with main (f1c34ca)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
14078
to
+14082
|
|
uv_snapshot!(context.filters(), context.add().arg("anyio"), @"
|
|
|
exit_code: 1 (failure)
|
|
|
exit_code: 2 (failure)
|
|
|
----- stderr -----
|
|
|
error: Failed to add dependencies
|
|
|
cause: No solution found when resolving dependencies
|
|
|
cause: Because anyio==4.3.0 could not be fetched from the network (`401 Unauthorized`) and only anyio==4.3.0 is available, we can conclude that all versions of anyio cannot be used.
|
|
|
And because your project depends on anyio, we can conclude that your project's requirements are unsatisfiable.
|
|
|
|
|
|
hint: Metadata for `anyio` (v4.3.0) could not be fetched; the server returned: `401 Unauthorized`
|
|
|
|
|
|
hint: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing
|
|
|
error: Failed to fetch: http://[LOCALHOST]/basic-auth/simple/anyio/
|
|
|
cause: Credentials were provided for `***[LOCALHOST]/basic-auth/simple/anyio/`, but authentication is disabled for this index
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Retain coverage of ignored wheel-metadata HTTP errors
This now fails in AuthMiddleware before receiving an HTTP response, so ignore-error-codes = [401] cannot affect the result and the test duplicates add_auth_policy_never_with_url_credentials above. The previous snapshot exercised converting a wheel-metadata fetch failure into MetadataUnavailable::Network; the nearby add_ignore_error_codes test only covers index queries. Adjust this fixture to serve the Simple API anonymously and return 401 for the wheel or metadata request, without URL credentials, so that distinct coverage remains reachable.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch was successfully deployed
1 active
deployment
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
bug
Something isn't working
priority:1
High: material security boundary, data loss, silent incorrect results, or major regression.
risk:3
Credible risk of meaningful incorrect behavior or regression; bounded or recoverable.
security
size:3
Substantial: interacting behaviors, difficult compatibility questions, or a careful migration.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|