@@ -2,11 +2,12 @@ package model
22
33import (
44 "encoding/json"
5+ "time"
6+
57 "github.com/murphysecurity/fix-tools/fix"
68 "github.com/murphysecurity/murphysec/utils"
79 "github.com/repeale/fp-go"
810 "github.com/samber/lo"
9- "time"
1011)
1112
1213type PluginOutput struct {
@@ -22,21 +23,24 @@ type PluginOutput struct {
2223 Medium int `json:"medium,omitempty"`
2324 Low int `json:"low,omitempty"`
2425 } `json:"issues_level_count,omitempty"`
25- TaskId string `json:"task_id"`
26- SubtaskId string `json:"subtask_id"`
27- InspectErrors []InspectError `json:"inspect_errors,omitempty"`
28- DependenciesCount int `json:"dependencies_count"`
29- SurpassScore int `json:"surpass_score"`
30- ProjectScore int `json:"project_score"`
31- LicenseInfoMap map [string ]LicenseItem `json:"license_info_map"`
32- Username string `json:"username"`
33- ProjectId string `json:"project_id"`
34- GitURL string `json:"git_url"`
35- IsHitProjectRule bool `json:"is_hit_project_rule"`
36- HitProjectRule json.RawMessage `json:"hit_project_rule,omitempty"`
37- ShareURL string `json:"share_url,omitempty"`
38- DetailURL string `json:"detail_url,omitempty"`
39- ScanWarningCodes []string `json:"scan_warning_codes,omitempty"`
26+ TaskId string `json:"task_id"`
27+ SubtaskId string `json:"subtask_id"`
28+ InspectErrors []InspectError `json:"inspect_errors,omitempty"`
29+ DependenciesCount int `json:"dependencies_count"`
30+ SurpassScore int `json:"surpass_score"`
31+ ProjectScore int `json:"project_score"`
32+ LicenseInfoMap map [string ]LicenseItem `json:"license_info_map"`
33+ Username string `json:"username"`
34+ ProjectId string `json:"project_id"`
35+ GitURL string `json:"git_url"`
36+ IsHitProjectRule bool `json:"is_hit_project_rule"`
37+ HitProjectRule json.RawMessage `json:"hit_project_rule,omitempty"`
38+ ShareURL string `json:"share_url,omitempty"`
39+ DetailURL string `json:"detail_url,omitempty"`
40+ ScanWarningCodes []string `json:"scan_warning_codes,omitempty"`
41+ LicenseInfoList json.RawMessage `json:"license_info_list,omitempty"`
42+ ProjectDistribution json.RawMessage `json:"project_distribution,omitempty"`
43+ SystemInfo json.RawMessage `json:"system_info,omitempty"`
4044}
4145
4246type ScanWarning struct {
@@ -100,21 +104,24 @@ func GetIDEAOutput(task *ScanTask) PluginOutput {
100104 Medium : r .MediumNum ,
101105 Low : r .LowNum ,
102106 },
103- TaskId : r .TaskId ,
104- SubtaskId : r .SubtaskId ,
105- ProjectId : r .ProjectId ,
106- InspectErrors : nil ,
107- DependenciesCount : r .RelyNum ,
108- SurpassScore : r .SurpassScore ,
109- ProjectScore : r .ProjectScore ,
110- LicenseInfoMap : r .LicenseInfoMap ,
111- Username : r .Username ,
112- GitURL : task .GitUrl ,
113- IsHitProjectRule : r .IsHitProjectRule ,
114- HitProjectRule : r .HitProjectRule ,
115- ShareURL : r .ShareURL ,
116- DetailURL : r .DetailURL ,
117- ScanWarningCodes : lo .Uniq (fp .Map (func (it ScanWarning ) string { return it .Kind })(r .ScanWarnings )),
107+ TaskId : r .TaskId ,
108+ SubtaskId : r .SubtaskId ,
109+ ProjectId : r .ProjectId ,
110+ InspectErrors : nil ,
111+ DependenciesCount : r .RelyNum ,
112+ SurpassScore : r .SurpassScore ,
113+ ProjectScore : r .ProjectScore ,
114+ LicenseInfoMap : r .LicenseInfoMap ,
115+ Username : r .Username ,
116+ GitURL : task .GitUrl ,
117+ IsHitProjectRule : r .IsHitProjectRule ,
118+ HitProjectRule : r .HitProjectRule ,
119+ ShareURL : r .ShareURL ,
120+ DetailURL : r .DetailURL ,
121+ ScanWarningCodes : lo .Uniq (fp .Map (func (it ScanWarning ) string { return it .Kind })(r .ScanWarnings )),
122+ LicenseInfoList : r .LicenseInfoList ,
123+ ProjectDistribution : r .ProjectDistribution ,
124+ SystemInfo : r .SystemInfo ,
118125 }
119126
120127 var vulnListMapper = func (effects []ScanResultCompEffect ) (rs []PluginVulnDetailInfo ) {
0 commit comments