Repository navigation
[Host] Validate the Docker Hub user name at startup - #391
Merged
Merged
Conversation
This was referenced Nov 5, 2026
[Squad] Check the tier's required model before every member launch (from DockerUpdateGuard#363)
#392
Closed
|
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 configured
DockerUpdateGuard:DockerHub:UserNamewent into the account listing pathv2/repositories/{name}/withUri.EscapeDataStringonly, so.or..addressed another path of the Docker Hub web API (with the account's bearer token). The configuration validator now requires a non-blank, trimmed user name to be one Docker Hub namespace component (ASCII letters and digits separated by.,_,__or runs of-, at most 255 characters), so an invalid value fails startup and every configuration reload with a fixed message that never contains the value. This is a fix with a behavior change: a user name that is an e-mail address or contains other characters now stops the app from starting. The rule and its reasoning are in docs/areas/registries.md and decision record 0018.🎫 Issues
DockerHub:UserNameas a Docker Hub namespace at startup #363💬 Reviewer Notes
Security area: Registry and Docker Hub calls. The grammar uses explicit
[a-zA-Z0-9]classes with noIgnoreCase, because case folding turns the Kelvin sign intok; the length is checked before the regex so its timeout cannot throw out of the validator.DockerHubClientis deliberately unchanged (decision 0014, option 19). The Docker Scout login still sends the raw value in a JSON body, which is not path-bearing and out of scope.📑 Test Plan
DockerUpdateGuardOptionsValidatorInvalidDockerHubUserNameReturnsFailure(20 rejected forms, including.,..,%2e%2e, the Kelvin sign, a zero-width space and 256 characters),DockerUpdateGuardOptionsValidatorValidDockerHubUserNameReturnsSuccess(valid forms, null, blank and 255 characters) andDockerUpdateGuardOptionsValidatorNoBreakSpaceDockerHubUserNameReturnsSuccess. New and changed code is 100 % covered, overall coverage 88.3 %.✅ 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
None.