Skip to content

Conversation

@Hubtrick-Git
Copy link
Collaborator

  • added some minor improvements to the code regarding the revision history part of csaf
  • added product ids to each revision history entry


// retrieve artifact information from arbitrary json data from keys artifactNames and scannerID
jsonData := event.GetArbitraryJSONData()
artifact, ok := jsonData["artifactNames"].(string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will break. Relying on untyped logic so much makes it hard to maintain. I am pretty sure, we are not setting it consistently...

switch event.Type {
case dtos.EventTypeDetected:
return fmt.Sprintf("Detected vulnerability %s in package %s (%s).", *vuln.CVEID, *vuln.ComponentPurl, artifactNameString), nil
return fmt.Sprintf("Detected vulnerability %s in product %s.", *vuln.CVEID, productIDsString)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually i preferred the way it was before...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants