diff --git a/analyzer-output-parser/main.go b/analyzer-output-parser/main.go index 080b26f..6bbe2c3 100644 --- a/analyzer-output-parser/main.go +++ b/analyzer-output-parser/main.go @@ -119,12 +119,17 @@ func loadApplications() error { // we don't need them in the report, ignore them for idx := range app.Rulesets { rs := &app.Rulesets[idx] - for _, violation := range rs.Violations { + for mapKey, violation := range rs.Violations { violation.Extras = nil for idx := range violation.Incidents { inc := &violation.Incidents[idx] inc.Variables = make(map[string]interface{}) + // Propagate more detailed description to the Violation/display in UI + if idx == 0 { + violation.Description = fmt.Sprintf("%s\n\n%s", violation.Description, inc.Message) + } } + rs.Violations[mapKey] = violation } } }