Repository navigation
[Host] Refuse dot segments in registry request paths - #365
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
LarsLaskowski
marked this pull request as ready for review
October 28, 2026 17:50
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018g33ASaUG3htJVXZexd5We
|
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.



Pull Request
📖 Description
The OCI, Docker Hub and Docker Scout request builders escaped each path segment with
Uri.EscapeDataString, which leaves.alone, andSystem.Urithen collapses.and..segments (a registered reference such ascorp/../../../v2/_catalogaddressed/v2/_catalog). Measured on .NET 10,%2Eis collapsed as well, so encoding cannot keep the dots; the builders now refuse a repository, tag or digest with a segment that is exactly.or..and answer as not found, without sending a request or a token request and without logging. This also covers digests a manifest names, and the Docker Scout path, which was built without any escaping and sent with a Bearer token (a tag with?or#could add a query). It is a bug fix and changes no behavior for valid references.🎫 Issues
Closes #360
Follow-up issues: #363 (validate
DockerHub:UserNameat startup), #364 (check the registry host of a registered reference). Decision record 0014 is extended in place.💬 Reviewer Notes
Security area: Registry and Docker Hub calls. Focus on
RegistryReferenceValidator.HasDotSegmentand on the call sites of theUri?builders inOciRegistryClient,DockerHubClientandDockerScoutVulnerabilityProvider(a refusal must happen before any login or token request). ThereturnatDockerHubClient.cs:628is a defensive guard no input reaches and stays uncovered on purpose.📑 Test Plan
22 new test methods (47 cases) plus later additions cover each URI builder, digests read from manifests, exact escaped request URIs for the Scout path, and pins that names containing dots (
my.app,...,%2E%2E) are still requested unchanged. Full suite: 941 + 21 tests pass; coverage 98.7 % on new or changed lines, 88.1 % overall; analyzer gate reports no diagnostic.✅ Checklist
.squad/stack.md, and the Analyzer gate reports no diagnostic in a changed file..squad/stack.mdpasses (line coverage on new or changed production code and overall).README.md,ARCHITECTURE.md) to reflect my changes..squad/stack.mdprescribes.csharp.instructions.mdare followed.⏭ Next Steps
DockerHub:UserNameas a Docker Hub namespace at startup #363