Documentation ¶
Index ¶
- Constants
- Variables
- func GetVulnDetail(avdId string) (*model.VulnDetail, error)
- func SearchForId(vulnId string) (*model.VulnDetail, error)
- func SearchVulnDetailByName(vulnName string) ([]*model.VulnDetail, error)
- func SearchVulnListByName(vulnName string) ([]*model.VulnList, error)
- type AliyunVuln
- type CveCollector
- type NonCveCollector
- type Page
Constants ¶
View Source
const ( Scheme = "https" Domain = "avd.aliyun.com" QueryKeyword = "q" CveType = "cve" NonCveType = "non-cve" AliyunType = "aliyun" CvdVulnListPath = "nvd/list" NonCvdVulnListPath = "nonvd/list" SearchPath = "search" VulnDetailPath = "detail" )
View Source
const ( QueryType = "type" QueryPage = "page" QueryId = "id" OS = "操作系统" Database = "数据库" Application = "应用程序" WebApplication = "WEB应用" HardwareEquipment = "硬件设备" )
Variables ¶
View Source
var (
Categories = []string{OS, Database, Application, WebApplication, HardwareEquipment}
)
Functions ¶
func GetVulnDetail ¶
func GetVulnDetail(avdId string) (*model.VulnDetail, error)
func SearchForId ¶
func SearchForId(vulnId string) (*model.VulnDetail, error)
SearchForId 通过cve id或者是avd id查询漏洞详情 TODO 写测试文件
func SearchVulnDetailByName ¶
func SearchVulnDetailByName(vulnName string) ([]*model.VulnDetail, error)
SearchVulnDetailByName 通过 name 模糊查询漏洞详情
Types ¶
type AliyunVuln ¶
type AliyunVuln interface { // GetPage 获取页码数据 GetPage() (map[string]*Page, error) // GetMetadata 获取元数据 GetMetadata() (*model.MetaData, error) // GetVulnList 获取漏洞列表数据 GetVulnList(category string, page int) ([]*model.VulnList, error) }
func NewAliyunVuln ¶
func NewAliyunVuln(Type string) AliyunVuln
type CveCollector ¶
type CveCollector struct {
// contains filtered or unexported fields
}
func NewCveCollector ¶
func NewCveCollector(scheme string, domain string, path string) *CveCollector
func (*CveCollector) GetMetadata ¶
func (c *CveCollector) GetMetadata() (*model.MetaData, error)
func (*CveCollector) GetVulnList ¶
type NonCveCollector ¶
type NonCveCollector struct {
// contains filtered or unexported fields
}
func NewNonCveCollector ¶
func NewNonCveCollector(scheme string, domain string, path string) *NonCveCollector
func (*NonCveCollector) GetMetadata ¶
func (c *NonCveCollector) GetMetadata() (*model.MetaData, error)
func (*NonCveCollector) GetVulnList ¶
Click to show internal directories.
Click to hide internal directories.