diff --git a/pkg/detectors/gitlab/v1/gitlab.go b/pkg/detectors/gitlab/v1/gitlab.go index 5e9c0ea94b54..ce0c070f5897 100644 --- a/pkg/detectors/gitlab/v1/gitlab.go +++ b/pkg/detectors/gitlab/v1/gitlab.go @@ -72,7 +72,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if verify { isVerified, extraData, verificationErr := s.verifyGitlab(ctx, resMatch) s1.Verified = isVerified - s1.ExtraData = extraData + for key, value := range extraData { + s1.ExtraData[key] = value + } s1.SetVerificationError(verificationErr, resMatch) s1.AnalysisInfo = map[string]string{ diff --git a/pkg/detectors/gitlab/v2/gitlab_v2.go b/pkg/detectors/gitlab/v2/gitlab_v2.go index 98233fe4ac0b..18e55084da5b 100644 --- a/pkg/detectors/gitlab/v2/gitlab_v2.go +++ b/pkg/detectors/gitlab/v2/gitlab_v2.go @@ -61,7 +61,9 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result if verify { isVerified, extraData, verificationErr := s.verifyGitlab(ctx, resMatch) s1.Verified = isVerified - s1.ExtraData = extraData + for key, value := range extraData { + s1.ExtraData[key] = value + } s1.SetVerificationError(verificationErr, resMatch) s1.AnalysisInfo = map[string]string{