mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-15 09:00:59 -08:00
refactor(misconf): don't remove Highlighted in json format (#5531)
This commit is contained in:
@@ -119,13 +119,6 @@ func (r *Result) MarshalJSON() ([]byte, error) {
|
||||
r.Vulnerabilities[i].VendorSeverity = nil
|
||||
}
|
||||
|
||||
// remove the Highlighted attribute from the json results
|
||||
for i := range r.Misconfigurations {
|
||||
for li := range r.Misconfigurations[i].CauseMetadata.Code.Lines {
|
||||
r.Misconfigurations[i].CauseMetadata.Code.Lines[li].Highlighted = ""
|
||||
}
|
||||
}
|
||||
|
||||
// Notice the Alias struct prevents MarshalJSON being called infinitely
|
||||
type ResultAlias Result
|
||||
return json.Marshal(&struct {
|
||||
|
||||
Reference in New Issue
Block a user