Repository navigation
[Scanning] Parse OCI Link headers per RFC 8288 - #380
Merged
Merged
Conversation
…inks Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018YRorFpvB4ok8utE3yixEe
|
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
OCI tag listings split every
Linkheader value on,before looking forrel="next", so a next-page target containing a comma was cut in two and the listing ended as succeeded with only part of the tags. The header is now parsed per RFC 8288: entries are split only on commas outside an angle-bracketed URI target and outside quoted parameters, andnextis matched as an exact, case-insensitive token of the firstrelparameter (quoted, unquoted or as part of a relation list). The complete target is still handed unchanged to the same-origin pagination guard. The fix is contributed by @seragAhmed; the two original commits keep their authorship.🎫 Issues
Closes #302
💬 Reviewer Notes
Look at
GetNextTagsLinkand the new Link header scanner insrc/DockerUpdateGuard/Images/OciRegistryClient.cs;PaginationLinkGuard(record 0004) is untouched and still validates every target before a request is sent. A malformed entry is skipped and, when no entry has a well-formednexttarget, the listing ends as succeeded with the tags read so far, as before;docs/areas/registries.mddescribes this. The missing page cap on the paging loop is a separate, older problem tracked in #301.📑 Test Plan
New tests in
OciRegistryClientTestscover a comma inside the target, several entries and header values, a quoted comma, a fakerelinsidetitle, an escaped quote, unquotedrel=next, a relation list, a secondrelparameter, an unterminated target and a foreign comma-bearing target that must still fail. The full suite passes (1005 host and 21 data tests) with 97.9 % coverage on changed lines.✅ 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
The paging loop has no page cap or loop detection (#301).