File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,7 @@ opensca-cli -db db.json -path ${project_path}
113
113
"release_date": "2021-12-10",
114
114
"security_level_id": 1,
115
115
"exploit_level_id": 1
116
- },
117
- {}
116
+ }
118
117
]
119
118
```
120
119
Original file line number Diff line number Diff line change @@ -112,8 +112,7 @@ opensca-cli -db db.json -path ${project_path}
112
112
"release_date" : " 2021-12-10" ,
113
113
"security_level_id" : 1 ,
114
114
"exploit_level_id" : 1
115
- },
116
- {}
115
+ }
117
116
]
118
117
```
119
118
Original file line number Diff line number Diff line change @@ -36,8 +36,14 @@ func loadVulnDB() {
36
36
} else {
37
37
// 解析本地漏洞
38
38
db := []vulnInfo {}
39
- json .Unmarshal (data , & db )
39
+ err := json .Unmarshal (data , & db )
40
+ if err != nil {
41
+ logs .Error (err )
42
+ }
40
43
for _ , info := range db {
44
+ if info .Vuln == nil {
45
+ continue
46
+ }
41
47
// 有中文描述则省略英文描述
42
48
if info .Description != "" {
43
49
info .DescriptionEn = ""
You can’t perform that action at this time.
0 commit comments