Skip to content

fix: parse digest-pinned refs and host:port registries correctly - #83

Closed
Abhinesh Jha (Abhineshhh) wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/extract-registry-digest-port
Closed

fix: parse digest-pinned refs and host:port registries correctly#83
Abhinesh Jha (Abhineshhh) wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/extract-registry-digest-port

Conversation

@Abhineshhh

Copy link
Copy Markdown
Contributor

Description

ExtractRegistryAndRepo split on the first :, mangling digest suffixes (@sha256:...) and registries with ports (localhost:5000).

Related Issue

Fixes #74

Changes

  • Strip @digest before parsing
  • Use last : after last / as tag separator
  • Recognize host:port and localhost as registry hosts
  • Expand unit tests

Checklist

  • task lint passes locally
  • task test passes locally
  • Documentation updated (if applicable)

ExtractRegistryAndRepo previously split on the first :, which mangled
digest suffixes (@sha256:...) and registries with ports (localhost:5000).
Strip digests first and use the last : after the last / as the tag
separator, matching Docker reference parsing.

Fixes microsoft#74
@Abhineshhh

Copy link
Copy Markdown
Contributor Author

Closing in favor of a consolidated stack to avoid multi-PR conflicts on the same files.

Superseded by consolidated registry stack (ExtractRegistryAndRepo is included there).

Please review the replacement PR linked above (Trivy stack or registry stack).

@Abhineshhh

Copy link
Copy Markdown
Contributor Author

Replacement: #88 (registry stack).

@Abhineshhh
Abhinesh Jha (Abhineshhh) deleted the fix/extract-registry-digest-port branch July 16, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ExtractRegistryAndRepo mishandles digest-pinned refs and registries with ports

1 participant