|
| 1 | +package model |
| 2 | + |
| 3 | +// SkillSummary 表示 Skills 检测摘要。 |
| 4 | +type SkillSummary struct { |
| 5 | + Enabled bool `json:"enabled"` |
| 6 | + Total int `json:"total"` |
| 7 | + RiskCount int `json:"risk_count"` |
| 8 | + MaliciousCount int `json:"malicious_count"` |
| 9 | + SuspiciousCount int `json:"suspicious_count"` |
| 10 | + SafeCount int `json:"safe_count"` |
| 11 | + PendingCount int `json:"pending_count"` |
| 12 | + DetectionErrorCount int `json:"detection_error_count"` |
| 13 | + FailedCount int `json:"failed_count"` |
| 14 | + DetectorAvailable bool `json:"detector_available"` |
| 15 | + LLMAvailable bool `json:"llm_available"` |
| 16 | +} |
| 17 | + |
| 18 | +// SkillItem 表示单个 Skill 的检测结果。 |
| 19 | +type SkillItem struct { |
| 20 | + ID string `json:"id"` |
| 21 | + Name string `json:"name"` |
| 22 | + Description string `json:"description"` |
| 23 | + DirPath string `json:"dir_path"` |
| 24 | + DirName string `json:"dir_name"` |
| 25 | + Status string `json:"status"` |
| 26 | + Summary string `json:"summary"` |
| 27 | + DetectMethods []string `json:"detect_methods"` |
| 28 | + HasCodeFiles bool `json:"has_code_files"` |
| 29 | + Source SkillSourceInfo `json:"source"` |
| 30 | + Intelligence SkillIntelligenceInfo `json:"intelligence"` |
| 31 | + Analysis SkillAnalysisInfo `json:"analysis"` |
| 32 | + ErrorMessage string `json:"error_message"` |
| 33 | +} |
| 34 | + |
| 35 | +// SkillSourceInfo 表示来源信息。 |
| 36 | +type SkillSourceInfo struct { |
| 37 | + SourceMatched bool `json:"source_matched"` |
| 38 | + Platform string `json:"platform"` |
| 39 | + PlatformURL string `json:"platform_url"` |
| 40 | + Author string `json:"author"` |
| 41 | + Version string `json:"version"` |
| 42 | + Stars int64 `json:"stars"` |
| 43 | + OriginalName string `json:"original_name"` |
| 44 | +} |
| 45 | + |
| 46 | +// SkillIntelligenceInfo 表示情报匹配结果。 |
| 47 | +type SkillIntelligenceInfo struct { |
| 48 | + IsMalicious bool `json:"is_malicious"` |
| 49 | + MpsID string `json:"mps_id"` |
| 50 | + Summary string `json:"summary"` |
| 51 | + CollectedAt string `json:"collected_at"` |
| 52 | +} |
| 53 | + |
| 54 | +// SkillAnalysisInfo 表示 LLM 分析结果。 |
| 55 | +type SkillAnalysisInfo struct { |
| 56 | + Analyzed bool `json:"analyzed"` |
| 57 | + ModelProvider string `json:"model_provider"` |
| 58 | + ModelName string `json:"model_name"` |
| 59 | + Summary string `json:"summary"` |
| 60 | + Dimensions []SkillAnalysisDimension `json:"dimensions"` |
| 61 | +} |
| 62 | + |
| 63 | +// SkillAnalysisDimension 表示单个分析维度结果。 |
| 64 | +type SkillAnalysisDimension struct { |
| 65 | + Name string `json:"name"` |
| 66 | + DisplayName string `json:"display_name"` |
| 67 | + Status string `json:"status"` |
| 68 | + Detail string `json:"detail"` |
| 69 | + Evidence string `json:"evidence"` |
| 70 | + Location string `json:"location"` |
| 71 | + UserExplanation string `json:"user_explanation"` |
| 72 | + CommonRiskPatterns string `json:"common_risk_patterns"` |
| 73 | +} |
0 commit comments