Skip to content

Commit

Permalink
Add reference link in malware result (#2383)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanan-ravi authored Dec 4, 2024
1 parent ad22512 commit 3d7e50e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deepfence_server/model/scans.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ type Malware struct {
Filetype string `json:"filetype"`
Info string `json:"info"`
Version string `json:"version"`
Reference string `json:"reference"`
SeverityScore int `json:"severity_score"`
StringsToMatch []interface{} `json:"strings_to_match"`
Summary string `json:"summary"`
Expand Down Expand Up @@ -485,7 +486,6 @@ type MalwareRule struct {
Filetype string `json:"filetype"`
Info string `json:"info"`
Version string `json:"version"`
Reference string `json:"reference"`
FileSeverity string `json:"file_severity"`
Masked bool `json:"masked" required:"true"`
Payload string `json:"payload" required:"true"`
Expand Down
1 change: 1 addition & 0 deletions deepfence_worker/ingesters/malware.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func malwareToMaps(data []ingestersUtil.Malware) ([]map[string]map[string]interf

malware["node_id"] = generateHashFromString(fmt.Sprintf("%v:%v",
i.MetaRules.RuleID, i.CompleteFilename))
malware["reference"] = i.MetaRules.Reference

malwares = append(malwares, map[string]map[string]interface{}{
"Rule": utils.ToMap(i.MetaRules),
Expand Down

0 comments on commit 3d7e50e

Please sign in to comment.