Skip to content

fix(security): resolve ReDoS in image name validation regex - #243

Merged
Dima Birenbaum (DimaBir) merged 1 commit into
mainfrom
fix/code-scanning-alerts
Apr 13, 2026
Merged

Dima Birenbaum (DimaBir) merged 1 commit into
mainfrom
fix/code-scanning-alerts

Conversation

@DimaBir

Copy link
Copy Markdown
Collaborator

Summary

  • Fix exponential backtracking vulnerability in validateImageName regex (CodeQL alert #352)
  • Remove . from hostname character classes so it only matches as a segment separator, eliminating ambiguous quantifier overlap

Test plan

  • Verify valid image names still pass: registry.example.com:5000/org/image:tag, myimage:latest, org/image@sha256:abc...
  • Verify ReDoS input -.-.-.-.-.-.-.-.-.-. no longer causes hang

@DimaBir
Dima Birenbaum (DimaBir) requested a review from a team as a code owner April 13, 2026 06:38
@DimaBir
Dima Birenbaum (DimaBir) merged commit 91a1da1 into main Apr 13, 2026
17 checks passed
@DimaBir
Dima Birenbaum (DimaBir) deleted the fix/code-scanning-alerts branch April 13, 2026 06:40
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.

2 participants