@@ -15,12 +15,7 @@ import (
15
15
func TestGenerate (t * testing.T ) {
16
16
r := report.Report {
17
17
Module : "example.com/vulnerable/v2" ,
18
- AdditionalPackages : []struct {
19
- Module string
20
- Package string
21
- Symbols []string
22
- Versions []report.VersionRange
23
- }{
18
+ AdditionalPackages : []report.Additional {
24
19
{
25
20
Module : "vanity.host/vulnerable" ,
26
21
Package : "vanity.host/vulnerable/package" ,
@@ -43,11 +38,7 @@ func TestGenerate(t *testing.T) {
43
38
Symbols : []string {"A" , "B.b" },
44
39
OS : []string {"windows" },
45
40
Arch : []string {"arm64" },
46
- Links : struct {
47
- PR string
48
- Commit string
49
- Context []string
50
- }{
41
+ Links : report.Links {
51
42
PR : "pr" ,
52
43
Commit : "commit" ,
53
44
Context : []string {"issue-a" , "issue-b" },
@@ -59,7 +50,7 @@ func TestGenerate(t *testing.T) {
59
50
ID : "GO-1991-0001" ,
60
51
Package : Package {
61
52
Name : "example.com/vulnerable/v2" ,
62
- Ecosystem : "go " ,
53
+ Ecosystem : "Go " ,
63
54
},
64
55
Details : "It's a real bad one, I'll tell you that" ,
65
56
Affects : Affects {
@@ -80,27 +71,25 @@ func TestGenerate(t *testing.T) {
80
71
},
81
72
},
82
73
References : []Reference {
83
- Reference {Type : "code review " , URL : "pr" },
84
- Reference {Type : "fix " , URL : "commit" },
85
- Reference {Type : "misc " , URL : "issue-a" },
86
- Reference {Type : "misc " , URL : "issue-b" },
74
+ Reference {Type : "FIX " , URL : "pr" },
75
+ Reference {Type : "FIX " , URL : "commit" },
76
+ Reference {Type : "WEB " , URL : "issue-a" },
77
+ Reference {Type : "WEB " , URL : "issue-b" },
87
78
},
88
79
Aliases : []string {"CVE-0000-0000" },
89
- Extra : struct { Go GoSpecific }{
90
- Go : GoSpecific {
91
- Symbols : []string {"A" , "B.b" },
92
- GOOS : []string {"windows" },
93
- GOARCH : []string {"arm64" },
94
- URL : "https://vulns.golang.org/GO-1991-0001.html" ,
95
- },
80
+ EcosystemSpecific : GoSpecific {
81
+ Symbols : []string {"A" , "B.b" },
82
+ GOOS : []string {"windows" },
83
+ GOARCH : []string {"arm64" },
84
+ URL : "https://vulns.golang.org/GO-1991-0001.html" ,
96
85
},
97
86
},
98
87
{
99
88
100
89
ID : "GO-1991-0001" ,
101
90
Package : Package {
102
91
Name : "vanity.host/vulnerable/package" ,
103
- Ecosystem : "go " ,
92
+ Ecosystem : "Go " ,
104
93
},
105
94
Details : "It's a real bad one, I'll tell you that" ,
106
95
Affects : Affects {
@@ -121,19 +110,17 @@ func TestGenerate(t *testing.T) {
121
110
},
122
111
},
123
112
References : []Reference {
124
- Reference {Type : "code review " , URL : "pr" },
125
- Reference {Type : "fix " , URL : "commit" },
126
- Reference {Type : "misc " , URL : "issue-a" },
127
- Reference {Type : "misc " , URL : "issue-b" },
113
+ Reference {Type : "FIX " , URL : "pr" },
114
+ Reference {Type : "FIX " , URL : "commit" },
115
+ Reference {Type : "WEB " , URL : "issue-a" },
116
+ Reference {Type : "WEB " , URL : "issue-b" },
128
117
},
129
118
Aliases : []string {"CVE-0000-0000" },
130
- Extra : struct { Go GoSpecific }{
131
- Go : GoSpecific {
132
- Symbols : []string {"b" , "A.b" },
133
- GOOS : []string {"windows" },
134
- GOARCH : []string {"arm64" },
135
- URL : "https://vulns.golang.org/GO-1991-0001.html" ,
136
- },
119
+ EcosystemSpecific : GoSpecific {
120
+ Symbols : []string {"b" , "A.b" },
121
+ GOOS : []string {"windows" },
122
+ GOARCH : []string {"arm64" },
123
+ URL : "https://vulns.golang.org/GO-1991-0001.html" ,
137
124
},
138
125
},
139
126
}
0 commit comments