Documentation
¶
Index ¶
- Variables
- func MakeOpenAITranslateCWE(cwe *cveresources.CWE, apiKey string, proxies ...string) (*cveresources.CWE, error)
- func MakeOpenAIWorking(src *cveresources.CVE, gateway aispec.AIClient) error
- func Translating(aiGatewayType string, noCritical bool, concurrent int, cveResourceDb string, ...) error
- func TranslatingCWE(apiKeyFile string, concurrent int, cveResourceDb string) error
- func YieldCVEDescriptions(db *gorm.DB, ctx context.Context) chan *CVEDescription
- type CVEDescription
- type Graph
- type KVPair
- type Statistics
Constants ¶
This section is empty.
Variables ¶
View Source
var CVEDescriptionTables = []any{ &CVEDescription{}, }
View Source
var CVEExports = map[string]interface{}{ "Download": cvequeryops.DownLoad, "LoadCVE": cvequeryops.LoadCVE, "QueryEx": queryEx, "Query": cvequeryops.QueryCVEYields, "GetCVE": getCVE, "NewStatistics": NewStatistics, "cwe": cvequeryops.CWE, "cve": cvequeryops.CVE, "after": cvequeryops.After, "before": cvequeryops.Before, "score": cvequeryops.Score, "severity": cvequeryops.Severity, "vendor": cvequeryops.Vendor, "product": cvequeryops.ProductWithVersion, "cpe": cvequeryops.CPE, "parseToCpe": webfingerprint.ParseToCPE, }
View Source
var CWEExports = map[string]interface{}{
"Get": getCWE,
}
Functions ¶
func MakeOpenAITranslateCWE ¶
func MakeOpenAITranslateCWE(cwe *cveresources.CWE, apiKey string, proxies ...string) (*cveresources.CWE, error)
func MakeOpenAIWorking ¶
func MakeOpenAIWorking(src *cveresources.CVE, gateway aispec.AIClient) error
func Translating ¶
func TranslatingCWE ¶
func YieldCVEDescriptions ¶
func YieldCVEDescriptions(db *gorm.DB, ctx context.Context) chan *CVEDescription
Types ¶
type CVEDescription ¶
type Graph ¶
type Graph struct {
Name string `json:"name"`
NameVerbose string `json:"name_verbose"`
Type string `json:"type"`
TypeVerbose string `json:"type_verbose"`
Data []*KVPair `json:"data"`
Reason string `json:"reason"` // 如果数据为空的时候,展示原因
ComplexityGroup string `json:"complexity_group"`
AccessVector string `json:"access_vector"`
}
type Statistics ¶
type Statistics struct {
Source string
BySources map[string]*Statistics
Total int
// 环形分析器,从内圈到外圈
NoAuthNetworkHighExploitableCount int
NoAuthNetworkCount int
NetworkCount int
// NETWORK/LOCAL/ADJACENT_NETWORK/PHYSICAL
CWECounter map[string]int /* 探明漏洞类型 */
AccessVectorCounter map[string]int /* 总体攻击路径的统计 */
ComplexityCounter map[string]int /* 攻击复杂度判定 */
NetworkComplexityCounter map[string]int /* 网络攻击复杂度 */
LocalComplexityCounter map[string]int /* 本地攻击复杂度 */
YearsCounter map[string]int /* 按年度统计 */
SeverityCounter map[string]int /* 按危险程度统计 */
YearsSeverityCounter map[string]map[string]int /* 按年度统计 */
}
func NewStatistics ¶
func NewStatistics(source string) *Statistics
func (*Statistics) Feed ¶
func (s *Statistics) Feed(c *cveresources.CVE)
func (*Statistics) FeedSource ¶
func (s *Statistics) FeedSource(source string, c *cveresources.CVE)
func (*Statistics) ToGraphs ¶
func (s *Statistics) ToGraphs() []*Graph
Source Files
¶
Click to show internal directories.
Click to hide internal directories.