Skip to content

Commit 5d0f0a2

Browse files
authored
fix: missing external id from bitbucket annotations report (#668)
1 parent 5a2d8d2 commit 5d0f0a2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/reporter/bitbucket/bitbucket_annotations.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ func newBitBucketAnnotationForPackage(pkg *models.Package) []*CodeInsightsAnnota
3434
annotations = append(annotations, &CodeInsightsAnnotation{
3535
Title: title,
3636
AnnotationType: AnnotationTypeVulnerability,
37-
Summary: fmt.Sprintf("Vulnerability in %s@%s", pkg.GetName(), pkg.GetVersion()),
37+
Summary: fmt.Sprintf("%s vulnerability in %s@%s", vulId, pkg.GetName(), pkg.GetVersion()),
3838
Severity: vulnerabilitySeverityToBitBucketAnnotationSeverity(v),
3939
FilePath: packagePath,
40-
ExternalID: vulId,
40+
ExternalID: utils.NewUniqueId(),
4141
})
4242
}
4343

@@ -52,6 +52,7 @@ func newBitBucketAnnotationForPackage(pkg *models.Package) []*CodeInsightsAnnota
5252
Severity: AnnotationSeverityCritical,
5353
FilePath: packagePath,
5454
Link: threatLink,
55+
ExternalID: utils.NewUniqueId(),
5556
})
5657
}
5758
if malwareInfo.IsSuspicious {
@@ -62,6 +63,7 @@ func newBitBucketAnnotationForPackage(pkg *models.Package) []*CodeInsightsAnnota
6263
Severity: AnnotationSeverityHigh,
6364
FilePath: packagePath,
6465
Link: threatLink,
66+
ExternalID: utils.NewUniqueId(),
6567
})
6668
}
6769

0 commit comments

Comments
 (0)