Skip to content

Commit 8b98931

Browse files
committed
Updated the function signatures in various services to use useragent as pointer
Signed-off-by: rafi <refaei.shikho@hotmail.com>
1 parent 86e6a85 commit 8b98931

16 files changed

Lines changed: 73 additions & 65 deletions

controllers/dependency_vuln_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ func (controller DependencyVulnController) CreateEvent(ctx shared.Context) error
405405
justification := status.Justification
406406
mechanicalJustification := status.MechanicalJustification
407407

408-
ev, err := controller.dependencyVulnService.CreateVulnEventAndApply(ctx.Request().Context(), nil, asset.ID, userID, &dependencyVuln, dtos.VulnEventType(statusType), justification, mechanicalJustification, assetVersion.Name, ctx.Request().UserAgent())
408+
userAgent := ctx.Request().UserAgent()
409+
ev, err := controller.dependencyVulnService.CreateVulnEventAndApply(ctx.Request().Context(), nil, asset.ID, userID, &dependencyVuln, dtos.VulnEventType(statusType), justification, mechanicalJustification, assetVersion.Name, &userAgent)
409410
if err != nil {
410411
return err
411412
}
@@ -469,7 +470,8 @@ func (controller DependencyVulnController) BatchCreateEvent(ctx shared.Context)
469470
continue
470471
}
471472

472-
ev, err := controller.dependencyVulnService.CreateVulnEventAndApply(ctx.Request().Context(), nil, asset.ID, userID, &dependencyVuln, eventType, status.Justification, status.MechanicalJustification, assetVersion.Name, ctx.Request().UserAgent())
473+
userAgent := ctx.Request().UserAgent()
474+
ev, err := controller.dependencyVulnService.CreateVulnEventAndApply(ctx.Request().Context(), nil, asset.ID, userID, &dependencyVuln, eventType, status.Justification, status.MechanicalJustification, assetVersion.Name, &userAgent)
473475
if err != nil {
474476
slog.Error("could not create event for dependencyVuln", "err", err, "vulnID", vulnID)
475477
continue

controllers/first_party_vuln_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ func (c FirstPartyVulnController) CreateEvent(ctx shared.Context) error {
190190

191191
mechanicalJustification := status.MechanicalJustification
192192

193-
ev, err := c.firstPartyVulnService.UpdateFirstPartyVulnState(ctx.Request().Context(), nil, userID, &firstPartyVuln, statusType, justification, mechanicalJustification, ctx.Request().UserAgent())
193+
userAgent := ctx.Request().UserAgent()
194+
ev, err := c.firstPartyVulnService.UpdateFirstPartyVulnState(ctx.Request().Context(), nil, userID, &firstPartyVuln, statusType, justification, mechanicalJustification, &userAgent)
194195
if err != nil {
195196
return err
196197
}

controllers/license_risk_controller.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ func (controller LicenseRiskController) Create(ctx shared.Context) error {
7979
licenseRisk = existingLicenseRisk
8080
}
8181

82-
ev := models.NewLicenseDecisionEvent(riskHash, dtos.VulnTypeLicenseRisk, shared.GetSession(ctx).GetUserID(), "", "", newLicenseRisk.FinalLicenseDecision, ctx.Request().UserAgent())
82+
userAgent := ctx.Request().UserAgent()
83+
ev := models.NewLicenseDecisionEvent(riskHash, dtos.VulnTypeLicenseRisk, shared.GetSession(ctx).GetUserID(), "", "", newLicenseRisk.FinalLicenseDecision, &userAgent)
8384

8485
err = controller.licenseRiskRepository.ApplyAndSave(ctx.Request().Context(), nil, &licenseRisk, &ev)
8586
if err != nil {
@@ -217,7 +218,8 @@ func (controller LicenseRiskController) CreateEvent(ctx shared.Context) error {
217218
justification := status.Justification
218219
mechanicalJustification := status.MechanicalJustification
219220

220-
event, err := controller.licenseRiskService.UpdateLicenseRiskState(ctx.Request().Context(), nil, userID, &licenseRisk, statusType, justification, mechanicalJustification, ctx.Request().UserAgent())
221+
userAgent := ctx.Request().UserAgent()
222+
event, err := controller.licenseRiskService.UpdateLicenseRiskState(ctx.Request().Context(), nil, userID, &licenseRisk, statusType, justification, mechanicalJustification, &userAgent)
221223
if err != nil {
222224
return err
223225
}

daemons/daemon_asset_pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ func (runner *DaemonRunner) AutoReopenTickets(input <-chan assetWithProjectAndOr
715715
span.SetAttributes(attribute.Int("asset.vulns_to_reopen", len(vulnerabilities)))
716716
errs := make([]error, 0)
717717
for _, vuln := range vulnerabilities {
718-
event := models.NewReopenedEvent(vuln.ID, dtos.VulnTypeDependencyVuln, "system", fmt.Sprintf("Automatically reopened since the vulnerability was accepted more than %d days ago", *asset.VulnAutoReopenAfterDays), false, "")
718+
event := models.NewReopenedEvent(vuln.ID, dtos.VulnTypeDependencyVuln, "system", fmt.Sprintf("Automatically reopened since the vulnerability was accepted more than %d days ago", *asset.VulnAutoReopenAfterDays), false, nil)
719719

720720
if err := runner.dependencyVulnRepository.ApplyAndSave(stageCtx, nil, &vuln, &event); err != nil {
721721
slog.Error("failed to apply and save vulnerability event", "vulnerabilityID", vuln.ID, "error", err)

database/models/vulnevent_model.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,86 +112,86 @@ func (event VulnEvent) TableName() string {
112112
return "vuln_events"
113113
}
114114

115-
func NewAcceptedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent string) VulnEvent {
115+
func NewAcceptedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent *string) VulnEvent {
116116
ev := VulnEvent{
117117
Type: dtos.EventTypeAccepted,
118118
UserID: userID,
119119
Justification: &justification,
120120
CreatedByVexRule: createdByRule,
121-
UserAgent: &userAgent,
121+
UserAgent: userAgent,
122122
}
123123
SetVulnIDOnEvent(&ev, vulnID, vulnType)
124124
return ev
125125
}
126126

127-
func NewReopenedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent string) VulnEvent {
127+
func NewReopenedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent *string) VulnEvent {
128128
ev := VulnEvent{
129129
Type: dtos.EventTypeReopened,
130130
UserID: userID,
131131
Justification: &justification,
132132
CreatedByVexRule: createdByRule,
133-
UserAgent: &userAgent,
133+
UserAgent: userAgent,
134134
}
135135
SetVulnIDOnEvent(&ev, vulnID, vulnType)
136136
return ev
137137
}
138138

139-
func NewCommentEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent string) VulnEvent {
139+
func NewCommentEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, createdByRule bool, userAgent *string) VulnEvent {
140140
ev := VulnEvent{
141141
Type: dtos.EventTypeComment,
142142
UserID: userID,
143143
Justification: &justification,
144144
CreatedByVexRule: createdByRule,
145-
UserAgent: &userAgent,
145+
UserAgent: userAgent,
146146
}
147147
SetVulnIDOnEvent(&ev, vulnID, vulnType)
148148
return ev
149149
}
150150

151-
func NewFalsePositiveEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, mechanicalJustification dtos.MechanicalJustificationType, artifactName string, createdByRule bool, userAgent string) VulnEvent {
151+
func NewFalsePositiveEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID, justification string, mechanicalJustification dtos.MechanicalJustificationType, artifactName string, createdByRule bool, userAgent *string) VulnEvent {
152152
ev := VulnEvent{
153153
Type: dtos.EventTypeFalsePositive,
154154
UserID: userID,
155155
Justification: &justification,
156156
MechanicalJustification: mechanicalJustification,
157157
CreatedByVexRule: createdByRule,
158-
UserAgent: &userAgent,
158+
UserAgent: userAgent,
159159
}
160160
SetVulnIDOnEvent(&ev, vulnID, vulnType)
161161
ev.SetArbitraryJSONData(map[string]any{"artifactNames": artifactName})
162162
return ev
163163
}
164164

165-
func NewFixedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, artifactName string, createdByRule bool, userAgent string) VulnEvent {
165+
func NewFixedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, artifactName string, createdByRule bool, userAgent *string) VulnEvent {
166166
ev := VulnEvent{
167167
Type: dtos.EventTypeFixed,
168168
UserID: userID,
169169
CreatedByVexRule: createdByRule,
170-
UserAgent: &userAgent,
170+
UserAgent: userAgent,
171171
}
172172
SetVulnIDOnEvent(&ev, vulnID, vulnType)
173173
ev.SetArbitraryJSONData(map[string]any{"artifactNames": artifactName})
174174
return ev
175175
}
176176

177-
func NewLicenseDecisionEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, justification, artifactName string, finalLicenseDecision string, userAgent string) VulnEvent {
177+
func NewLicenseDecisionEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, justification, artifactName string, finalLicenseDecision string, userAgent *string) VulnEvent {
178178
ev := VulnEvent{
179179
Type: dtos.EventTypeLicenseDecision,
180180
UserID: userID,
181181
Justification: &justification,
182-
UserAgent: &userAgent,
182+
UserAgent: userAgent,
183183
}
184184
SetVulnIDOnEvent(&ev, vulnID, vulnType)
185185
ev.SetArbitraryJSONData(map[string]any{"artifactNames": artifactName, "finalLicenseDecision": finalLicenseDecision})
186186
return ev
187187
}
188188

189-
func NewDetectedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, riskCalculationReport dtos.RiskCalculationReport, scannerID string, createdByRule bool, userAgent string) VulnEvent {
189+
func NewDetectedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, riskCalculationReport dtos.RiskCalculationReport, scannerID string, createdByRule bool, userAgent *string) VulnEvent {
190190
ev := VulnEvent{
191191
Type: dtos.EventTypeDetected,
192192
UserID: userID,
193193
CreatedByVexRule: createdByRule,
194-
UserAgent: &userAgent,
194+
UserAgent: userAgent,
195195
}
196196
SetVulnIDOnEvent(&ev, vulnID, vulnType)
197197

@@ -203,12 +203,12 @@ func NewDetectedEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, r
203203
return ev
204204
}
205205

206-
func NewMitigateEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, justification string, arbitraryData map[string]any, userAgent string) VulnEvent {
206+
func NewMitigateEvent(vulnID uuid.UUID, vulnType dtos.VulnType, userID string, justification string, arbitraryData map[string]any, userAgent *string) VulnEvent {
207207
ev := VulnEvent{
208208
Type: dtos.EventTypeMitigate,
209209
UserID: userID,
210210
Justification: &justification,
211-
UserAgent: &userAgent,
211+
UserAgent: userAgent,
212212
}
213213
SetVulnIDOnEvent(&ev, vulnID, vulnType)
214214
ev.SetArbitraryJSONData(arbitraryData)

integrations/commonint/integration_helper.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ func RenderMarkdownForLicenseRisk(licenseRisk models.LicenseRisk, baseURL, orgSl
139139
return str.String()
140140
}
141141

142-
func CreateNewVulnEventBasedOnComment(vulnID uuid.UUID, vulnType dtos.VulnType, userID, comment string, artifactName string) models.VulnEvent {
142+
func CreateNewVulnEventBasedOnComment(vulnID uuid.UUID, vulnType dtos.VulnType, userID, comment string, artifactName string, userAgent *string) models.VulnEvent {
143143

144144
event, mechanicalJustification, justification := commentTrimmedPrefix(vulnType, comment)
145145

146146
switch event {
147147
case dtos.EventTypeAccepted:
148-
return models.NewAcceptedEvent(vulnID, vulnType, userID, justification, false, "")
148+
return models.NewAcceptedEvent(vulnID, vulnType, userID, justification, false, userAgent)
149149
case dtos.EventTypeFalsePositive:
150-
return models.NewFalsePositiveEvent(vulnID, vulnType, userID, justification, mechanicalJustification, artifactName, false, "")
150+
return models.NewFalsePositiveEvent(vulnID, vulnType, userID, justification, mechanicalJustification, artifactName, false, userAgent)
151151
case dtos.EventTypeReopened:
152-
return models.NewReopenedEvent(vulnID, vulnType, userID, justification, false, "")
152+
return models.NewReopenedEvent(vulnID, vulnType, userID, justification, false, userAgent)
153153
case dtos.EventTypeComment:
154-
return models.NewCommentEvent(vulnID, vulnType, userID, comment, false, "")
154+
return models.NewCommentEvent(vulnID, vulnType, userID, comment, false, userAgent)
155155
}
156156

157157
return models.VulnEvent{}

integrations/githubint/github_integration.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) er
224224
var vuln models.Vuln
225225
doUpdateArtifactRiskHistory := false
226226

227+
userAgent := req.UserAgent()
228+
227229
switch event := event.(type) {
228230
case *github.IssuesEvent:
229231
if event.Sender.GetType() == "Bot" {
@@ -269,7 +271,7 @@ func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) er
269271

270272
switch action {
271273
case "closed":
272-
vulnEvent := models.NewAcceptedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the github ticket.", event.Sender.GetLogin()), false, "")
274+
vulnEvent := models.NewAcceptedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the github ticket.", event.Sender.GetLogin()), false, &userAgent)
273275

274276
err := githubIntegration.aggregatedVulnRepository.ApplyAndSave(reqCtx, nil, vuln, &vulnEvent)
275277
if err != nil {
@@ -278,7 +280,7 @@ func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) er
278280
doUpdateArtifactRiskHistory = true
279281

280282
case "reopened":
281-
vulnEvent := models.NewReopenedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is reopened by %s", event.Sender.GetLogin()), false, "")
283+
vulnEvent := models.NewReopenedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is reopened by %s", event.Sender.GetLogin()), false, &userAgent)
282284

283285
err := githubIntegration.aggregatedVulnRepository.ApplyAndSave(reqCtx, nil, vuln, &vulnEvent)
284286
if err != nil {
@@ -287,7 +289,7 @@ func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) er
287289
doUpdateArtifactRiskHistory = true
288290

289291
case "deleted":
290-
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is marked as a false positive by %s, due to the deletion of the github ticket.", event.Sender.GetLogin()), dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, "")
292+
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Sender.GetID()), fmt.Sprintf("This Vulnerability is marked as a false positive by %s, due to the deletion of the github ticket.", event.Sender.GetLogin()), dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, &userAgent)
291293

292294
err := githubIntegration.aggregatedVulnRepository.ApplyAndSave(reqCtx, nil, vuln, &vulnEvent)
293295
if err != nil {
@@ -370,7 +372,7 @@ func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) er
370372
comment := event.Comment.GetBody()
371373

372374
// create a new event based on the comment
373-
vulnEvent := commonint.CreateNewVulnEventBasedOnComment(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Comment.User.GetID()), comment, vuln.GetScannerIDsOrArtifactNames())
375+
vulnEvent := commonint.CreateNewVulnEventBasedOnComment(vuln.GetID(), vuln.GetType(), fmt.Sprintf("github:%d", event.Comment.User.GetID()), comment, vuln.GetScannerIDsOrArtifactNames(), &userAgent)
374376

375377
statemachine.Apply(vuln, vulnEvent)
376378

@@ -775,7 +777,7 @@ func (githubIntegration *GithubIntegration) UpdateIssue(ctx context.Context, ass
775777
//check if err is 404 - if so, we can not reopen the issue
776778
if err.Error() == "404 Not Found" {
777779
// we can not reopen the issue - it is deleted
778-
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), "system", "This Vulnerability is marked as a false positive due to deletion", dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, "")
780+
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), "system", "This Vulnerability is marked as a false positive due to deletion", dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, nil)
779781
// save the event
780782
err = githubIntegration.aggregatedVulnRepository.ApplyAndSave(ctx, nil, vuln, &vulnEvent)
781783
if err != nil {
@@ -893,7 +895,7 @@ func (githubIntegration *GithubIntegration) CreateIssue(ctx context.Context, ass
893895
vulnEvent := models.NewMitigateEvent(vuln.GetID(), vuln.GetType(), userID, justification, map[string]any{
894896
"ticketId": vuln.GetTicketID(),
895897
"ticketUrl": vuln.GetTicketURL(),
896-
}, "")
898+
}, nil)
897899
// save the dependencyVuln and the event in a transaction
898900
err = githubIntegration.aggregatedVulnRepository.ApplyAndSave(ctx, nil, vuln, &vulnEvent)
899901
// if an error did happen, delete the issue from github

integrations/gitlabint/gitlab_integration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ func (g *GitlabIntegration) UpdateIssue(ctx context.Context, asset models.Asset,
12701270
if err.Error() == "404 Not Found" {
12711271

12721272
// we can not reopen the issue - it is deleted
1273-
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), "user", "This Vulnerability is marked as a false positive due to deletion", dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, "")
1273+
vulnEvent := models.NewFalsePositiveEvent(vuln.GetID(), vuln.GetType(), "user", "This Vulnerability is marked as a false positive due to deletion", dtos.VulnerableCodeNotInExecutePath, vuln.GetScannerIDsOrArtifactNames(), false, nil)
12741274
// save the event
12751275
err := g.aggregatedVulnRepository.ApplyAndSave(ctx, nil, vuln, &vulnEvent)
12761276
if err != nil {
@@ -1427,7 +1427,7 @@ func (g *GitlabIntegration) CreateIssue(ctx context.Context, asset models.Asset,
14271427
map[string]any{
14281428
"ticketId": vuln.GetTicketID(),
14291429
"ticketUrl": createdIssue.WebURL,
1430-
}, "")
1430+
}, nil)
14311431

14321432
return g.aggregatedVulnRepository.ApplyAndSave(ctx, nil, vuln, &vulnEvent)
14331433
}

integrations/gitlabint/gitlab_webhook.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func (g *GitlabIntegration) HandleWebhook(ctx shared.Context) error {
4747

4848
gitlabSecretToken := ctx.Request().Header.Get("X-Gitlab-Token")
4949

50+
userAgent := ctx.Request().UserAgent()
5051
var vulnEvent models.VulnEvent
5152
var client shared.GitlabClientFacade
5253
var vuln models.Vuln
@@ -115,7 +116,7 @@ func (g *GitlabIntegration) HandleWebhook(ctx shared.Context) error {
115116
return nil
116117
}
117118

118-
vulnEvent = models.NewAcceptedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the gitlab ticket.", event.User.Name), false, "")
119+
vulnEvent = models.NewAcceptedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the gitlab ticket.", event.User.Name), false, &userAgent)
119120

120121
err = g.aggregatedVulnRepository.ApplyAndSave(reqCtx, nil, vuln, &vulnEvent)
121122
if err != nil {
@@ -128,7 +129,7 @@ func (g *GitlabIntegration) HandleWebhook(ctx shared.Context) error {
128129
return nil
129130
}
130131

131-
vulnEvent = models.NewReopenedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the gitlab ticket.", event.User.Name), false, "")
132+
vulnEvent = models.NewReopenedEvent(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), fmt.Sprintf("This Vulnerability is marked as accepted by %s, due to closing of the gitlab ticket.", event.User.Name), false, &userAgent)
132133

133134
err := g.aggregatedVulnRepository.ApplyAndSave(reqCtx, nil, vuln, &vulnEvent)
134135
if err != nil {
@@ -228,7 +229,7 @@ func (g *GitlabIntegration) HandleWebhook(ctx shared.Context) error {
228229
})
229230

230231
// create a new event based on the comment
231-
vulnEvent = commonint.CreateNewVulnEventBasedOnComment(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), comment, vuln.GetScannerIDsOrArtifactNames())
232+
vulnEvent = commonint.CreateNewVulnEventBasedOnComment(vuln.GetID(), vuln.GetType(), fmt.Sprintf("gitlab:%d", event.User.ID), comment, vuln.GetScannerIDsOrArtifactNames(), &userAgent)
232233

233234
statemachine.Apply(vuln, vulnEvent)
234235

0 commit comments

Comments
 (0)