Skip to content

Commit

Permalink
fixed gitlab extradata overwriting (#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan0771 authored Oct 31, 2024
1 parent 257413c commit bd5e287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/detectors/gitlab/v1/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 3 additions & 1 deletion pkg/detectors/gitlab/v2/gitlab_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit bd5e287

Please sign in to comment.