From d894584efd608c025317f141f6af6c8398f4ef21 Mon Sep 17 00:00:00 2001 From: Abhishek Dawer Date: Thu, 9 Oct 2025 15:36:33 +0530 Subject: [PATCH 1/3] bugfix: updated regex and split condition --- output/output.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/output.go b/output/output.go index 7587408..ace79e8 100644 --- a/output/output.go +++ b/output/output.go @@ -68,10 +68,10 @@ func DisplayOutput(finalResult *finding.Output, scanTime *ScanTime) { */ func extractRepoNameFromURL(url string) string { if url != "" { - findRepoNameRegexp := regexp.MustCompile(`[a-z0-9-]+/[a-z0-9-_]+\.git$`) + findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-]+/[a-z0-9-_.]+\.git$`) match := findRepoNameRegexp.FindStringSubmatch(url) if len(match) > 0 { - parts := strings.Split(match[0], ".") + parts := strings.Split(match[0], ".git") if len(parts) > 1 { return parts[0] } From 74d272a1323e95d34bb55bc06f769640b1cc5a4d Mon Sep 17 00:00:00 2001 From: Abhishek Dawer Date: Thu, 9 Oct 2025 16:06:37 +0530 Subject: [PATCH 2/3] updated changelog file --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index 834a272..72462e2 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), --- +## \[Unreleased\] + +### Fixed + +* Enhanced the regex to be case-insensitive and to support `.` in repository names, enabling correct extraction of the repository name from SSH URLs in baseline scan. + ## \[1.1.1\] \- 2025-09-26 ### Fixed From 32bbd17706550de132138c7dd6f035628d527748 Mon Sep 17 00:00:00 2001 From: Abhishek Dawer Date: Thu, 9 Oct 2025 17:56:41 +0530 Subject: [PATCH 3/3] Resolved code review comment --- output/output.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/output.go b/output/output.go index ace79e8..74b1f89 100644 --- a/output/output.go +++ b/output/output.go @@ -68,7 +68,7 @@ func DisplayOutput(finalResult *finding.Output, scanTime *ScanTime) { */ func extractRepoNameFromURL(url string) string { if url != "" { - findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-]+/[a-z0-9-_.]+\.git$`) + findRepoNameRegexp := regexp.MustCompile(`(?i)[a-z0-9-_.]+/[a-z0-9-_.]+\.git$`) match := findRepoNameRegexp.FindStringSubmatch(url) if len(match) > 0 { parts := strings.Split(match[0], ".git")