Skip to content

Commit 54851ef

Browse files
authored
Merge pull request #1755 from philroche/feature/gitlab-operator-gitlab-match-exception-without-defining-cpe
feat(pkg/sbom/cpe.go): Add exception for gitlab-operator to avoid matching as gitlab-* package and gitlab product
2 parents cb5fcdc + b170501 commit 54851ef

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/sbom/cpe.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ func generateWfnAttributesForAPK(p pkgInfo) *wfn.Attributes {
5454
return &attr
5555
}
5656

57-
if strings.HasPrefix(name, "gitlab-") {
57+
// Not all gitlab-* packages should be treated as GitLab, but most of them are.
58+
// One notable exception is gitlab-operator, which is a Kubernetes operator
59+
// for managing GitLab installations, and not part of GitLab itself.
60+
// Source @ https://gitlab.com/gitlab-org/cloud-native/gitlab-operator
61+
// Adding an explicit exception for this package here.
62+
// If more exceptions are found, we might need a more robust way to handle them.
63+
if strings.HasPrefix(name, "gitlab-") && name != "gitlab-operator" {
5864
attr.Vendor = "gitlab"
5965
attr.Product = "gitlab"
6066
attr.SWEdition = "community"

0 commit comments

Comments
 (0)