-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
55 lines (48 loc) · 1.55 KB
/
types.go
File metadata and controls
55 lines (48 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Type definitions for fake scanner report
package main
// DockerScoutReport represents the structure of a Docker Scout vulnerability report
type DockerScoutReport struct {
Vulnerabilities []struct {
CVE string `json:"cve"`
Description string `json:"description"`
Solution string `json:"solution"`
Location struct {
OperatingSystem string `json:"operating_system"`
Dependency struct {
Package struct {
Name string `json:"name"`
} `json:"package"`
Version string `json:"version"`
} `json:"dependency"`
} `json:"location"`
} `json:"vulnerabilities"`
}
// UpdateManifest represents the structured output for Copa
type UpdateManifest struct {
APIVersion string `json:"apiVersion"`
Metadata Metadata `json:"metadata"`
Updates UpdatePackages `json:"updates"`
}
// UpdatePackages is a list of UpdatePackage
type UpdatePackages []UpdatePackage
// Metadata contains information about the OS and config
type Metadata struct {
OS OS `json:"os"`
Config Config `json:"config"`
}
// OS contains information about the operating system
type OS struct {
Type string `json:"type"`
Version string `json:"version"`
}
// Config contains information about the architecture
type Config struct {
Arch string `json:"arch"`
}
// UpdatePackage contains information about the package update
type UpdatePackage struct {
Name string `json:"name"`
InstalledVersion string `json:"installedVersion"`
FixedVersion string `json:"fixedVersion"`
VulnerabilityID string `json:"vulnerabilityID"`
}