diff --git a/cve-vulner-manager/conf/app.conf b/cve-vulner-manager/conf/app.conf index 89c448f411d78b0b0e1c4666728ba07971ba8ad5..e6d5453538ce81aae81f551a99f50620d7641869 100644 --- a/cve-vulner-manager/conf/app.conf +++ b/cve-vulner-manager/conf/app.conf @@ -124,7 +124,7 @@ issuelabelcheck = 0 */30 * * * * getv8tokenflag = 2 getv8token = 0/10 * * * * * # Set issue processing date -setissueprocdateflag = 1 +setissueprocdateflag = 2 setissueprocdate = */10 * * * * * [gitee] diff --git a/cve-vulner-manager/cve-py/main.py b/cve-vulner-manager/cve-py/main.py index efe236af73ded4337102b055923b2e2cfb904a23..455683294300f2689fc8dc9a0ecd452a50a7d1ed 100644 --- a/cve-vulner-manager/cve-py/main.py +++ b/cve-vulner-manager/cve-py/main.py @@ -62,9 +62,9 @@ def api_proc(): if __name__ == '__main__': print("Start a scheduled task...") - thread_timed_task = threading.Thread(target=timertaskcontroller.timertask) - thread_timed_task.start() - thread_timed_task.join() - thread_api_proc = threading.Thread(target=api_proc) - thread_api_proc.start() - thread_api_proc.join() + # thread_timed_task = threading.Thread(target=timertaskcontroller.timertask) + # thread_timed_task.start() + # thread_timed_task.join() + # thread_api_proc = threading.Thread(target=api_proc) + # thread_api_proc.start() + # thread_api_proc.join() diff --git a/cve-vulner-manager/models/cve.go b/cve-vulner-manager/models/cve.go index b9a450eafbb514386f5eb2e36c9d466f250a36c6..7685512bec8019d977692c9d47804f337c3b115d 100644 --- a/cve-vulner-manager/models/cve.go +++ b/cve-vulner-manager/models/cve.go @@ -90,6 +90,19 @@ func QueryIssueTemplateAll(prcnum int, tmplateId int64, beforeTime string) (ite return } +func QueryIssueTemplateByNum(cveNum string) (ite []IssueTemplate, num int64, err error) { + o := orm.NewOrm() + num, err = o.Raw("select *"+ + " from cve_issue_template where cve_num = ? and status < ? ", cveNum, 4).QueryRows(&ite) + if err == nil && num > 0 { + logs.Info("QueryIssueTemplateByNum, cve_issue_template, search result: ", num) + } else { + logs.Error("QueryIssueTemplateByNum, There are currently no new or updated issues, cve_issue_template, cur_time:", + common.GetCurTime(), ",err: ", err) + } + return +} + func QueryOriginCveIssue(prcnum int) ([]GiteOriginIssue, int64, error) { o := orm.NewOrm() var gs []GiteOriginIssue diff --git a/cve-vulner-manager/taskhandler/issuestatistics.go b/cve-vulner-manager/taskhandler/issuestatistics.go index cd8ec5d8f7ef5e3f2215d17ffbd7af5f9c31fab4..e94360ac023345e9ec5598cd59657c1d275e6a6d 100644 --- a/cve-vulner-manager/taskhandler/issuestatistics.go +++ b/cve-vulner-manager/taskhandler/issuestatistics.go @@ -174,6 +174,11 @@ func ReadWriteCredExcel(excelPath string, org []models.OriginUpstream) (int64, e } tempCveId := int64(0) for _, cred := range org { + its, _, _ :=models.QueryIssueTemplateByNum(cred.CveNum) + if len(its) > 0 { + models.UpdateOriginStatus(common.GetCurTime(), cred.PackName, cred.Version, cred.CveId, 6) + continue + } tempCveId = cred.CveId desc := QueryCveDesc(cred.CveId) cveData := procCredData(cred, desc)