|
5 | 5 | "testing" |
6 | 6 |
|
7 | 7 | "github.com/aquasecurity/trivy-db/pkg/types" |
| 8 | + "github.com/aquasecurity/trivy-db/pkg/utils" |
8 | 9 | "github.com/aquasecurity/trivy-db/pkg/vulnsrc/ghsa" |
9 | 10 | "github.com/aquasecurity/trivy-db/pkg/vulnsrc/vulnerability" |
10 | 11 | "github.com/aquasecurity/trivy-db/pkg/vulnsrctest" |
@@ -62,9 +63,11 @@ func TestVulnSrc_Update(t *testing.T) { |
62 | 63 | "https://github.com/advisories/GHSA-xx65-cc7g-9pfp", |
63 | 64 | "https://pivotal.io/security/cve-2018-1196", |
64 | 65 | }, |
65 | | - Severity: types.SeverityMedium, |
66 | | - CvssVectorV3: "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N", |
67 | | - CvssScoreV3: 5.9, |
| 66 | + Severity: types.SeverityMedium, |
| 67 | + CvssVectorV3: "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N", |
| 68 | + CvssScoreV3: 5.9, |
| 69 | + LastModifiedDate: utils.MustTimeParse("2021-09-22T18:26:44Z"), |
| 70 | + PublishedDate: utils.MustTimeParse("2018-10-18T18:05:57Z"), |
68 | 71 | }, |
69 | 72 | }, |
70 | 73 | { |
@@ -128,9 +131,11 @@ func TestVulnSrc_Update(t *testing.T) { |
128 | 131 | "https://github.com/FCncdn/MybatisPlusTenantPluginSQLInjection-POC/blob/master/Readme.en.md", |
129 | 132 | "https://github.com/baomidou/mybatis-plus", |
130 | 133 | }, |
131 | | - Severity: types.SeverityCritical, |
132 | | - CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", |
133 | | - CvssScoreV3: 9.8, |
| 134 | + Severity: types.SeverityCritical, |
| 135 | + CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", |
| 136 | + CvssScoreV3: 9.8, |
| 137 | + LastModifiedDate: utils.MustTimeParse("2023-04-14T20:31:15Z"), |
| 138 | + PublishedDate: utils.MustTimeParse("2023-04-05T15:30:24Z"), |
134 | 139 | }, |
135 | 140 | }, |
136 | 141 | { |
@@ -181,9 +186,11 @@ func TestVulnSrc_Update(t *testing.T) { |
181 | 186 | "https://github.com/bodil/sized-chunks", |
182 | 187 | "https://rustsec.org/advisories/RUSTSEC-2020-0041.html", |
183 | 188 | }, |
184 | | - Severity: types.SeverityHigh, |
185 | | - CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", |
186 | | - CvssScoreV3: 7.5, |
| 189 | + Severity: types.SeverityHigh, |
| 190 | + CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", |
| 191 | + CvssScoreV3: 7.5, |
| 192 | + LastModifiedDate: utils.MustTimeParse("2022-06-14T20:54:51Z"), |
| 193 | + PublishedDate: utils.MustTimeParse("2021-08-25T20:46:06Z"), |
187 | 194 | }, |
188 | 195 | }, |
189 | 196 | { |
@@ -240,9 +247,11 @@ func TestVulnSrc_Update(t *testing.T) { |
240 | 247 | "https://github.com/sophieschmieg/exploits/tree/master/aws_s3_crypto_poc", |
241 | 248 | "https://pkg.go.dev/vuln/GO-2022-0646", |
242 | 249 | }, |
243 | | - Severity: types.SeverityMedium, |
244 | | - CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C", |
245 | | - CvssScoreV3: 8.8, |
| 250 | + Severity: types.SeverityMedium, |
| 251 | + CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C", |
| 252 | + CvssScoreV3: 8.8, |
| 253 | + LastModifiedDate: utils.MustTimeParse("2023-02-07T21:27:07Z"), |
| 254 | + PublishedDate: utils.MustTimeParse("2022-02-11T23:26:26Z"), |
246 | 255 | }, |
247 | 256 | }, |
248 | 257 | { |
@@ -358,9 +367,11 @@ func TestVulnSrc_Update(t *testing.T) { |
358 | 367 | "https://github.com/apple/swift-nio/commit/a16e2f54a25b2af217044e5168997009a505930f", |
359 | 368 | "https://github.com/apple/swift-nio", |
360 | 369 | }, |
361 | | - Severity: types.SeverityMedium, |
362 | | - CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", |
363 | | - CvssScoreV3: 5.3, |
| 370 | + Severity: types.SeverityMedium, |
| 371 | + CvssVectorV3: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", |
| 372 | + CvssScoreV3: 5.3, |
| 373 | + LastModifiedDate: utils.MustTimeParse("2023-06-07T16:01:53Z"), |
| 374 | + PublishedDate: utils.MustTimeParse("2023-06-07T16:01:53Z"), |
364 | 375 | }, |
365 | 376 | }, |
366 | 377 | { |
|
0 commit comments