Skip to content

Commit

Permalink
SUB-3621 - CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rinao12 committed Dec 26, 2023
1 parent 8228182 commit a3590ac
Showing 1 changed file with 47 additions and 49 deletions.
96 changes: 47 additions & 49 deletions armotypes/vulnerabilitytypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ type VulnerabilityJobParams struct {
}

type VulnerabilityWorkload struct {
Id string `json:"id"`
Wlid string `json:"wlid"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Type string `json:"type"`
Kind string `json:"kind"`
ClusterName string `json:"clusterName"`
ClusterShortName string `json:"clusterShortName"`
CustomerGUID string `json:"customerGUID"`
Expand All @@ -45,57 +45,55 @@ type TopCveDetails struct {
}

type VulnerabilitiesImage struct {
ImageTag string `json:"imageTag"`
ImageHash string `json:"imageHash"`
ContainerName string `json:"containerName"`
Registry string `json:"registry"`
WorkloadsIds []string `json:"wlids"`
NameSpace string `json:"namespace"`
LastScan time.Time `json:"lastScan"`
ClusterName string `json:"clusterName"`
ClusterShortName string `json:"clusterShortName"`
CustomerGUID string `json:"customerGUID"`
SeverityStats map[string]SeverityDetails `json:"severityStats"`
ImageTag string `json:"imageTag"`
ImageHash string `json:"imageHash"`
ContainerName string `json:"containerName"`
Registry string `json:"registry"`
LastScan time.Time `json:"lastScan"`
PathsInfo []ImagePathInfo `json:"pathsInfo"`
CustomerGUID string `json:"customerGUID"`
SeverityStats map[string]SeverityDetails `json:"severityStats"`
}

type ImagePathInfo struct {
WorkloadId string `json:"wlid"`
NameSpace string `json:"namespace"`
ClusterName string `json:"clusterName"`
ClusterShortName string `json:"clusterShortName"`
}

// todo : check + rename
type VulnerabilitiesComponent struct {
ImageTag string `json:"imageTag"`
ImageHash string `json:"imageHash"`
ContainerName string `json:"containerName"`
Registry string `json:"registry"`
WorkloadsIds []string `json:"wlids"`
NameSpace string `json:"namespace"`
LastScan time.Time `json:"lastScan"`
ClusterName string `json:"clusterName"`
ClusterShortName string `json:"clusterShortName"`
CustomerGUID string `json:"customerGUID"`
SeverityStats map[string]SeverityDetails `json:"severityStats"`
Paths []string `json:"paths"`
CustomerGUID string `json:"customerGUID"`
Name string `json:"name"`
Version string `json:"version"`
PackageType string `json:"packageType"`
FixVersions []string `json:"fixVersions"`
PathsInfo []ComponentPathInfo `json:"pathsInfo"`
SeverityStats map[string]SeverityDetails `json:"severityStats"`
}

type ComponentPathInfo struct {
ImagePathInfo
ImageTag string `json:"imageTag"`
ImageHash string `json:"imageHash"`
ContainerName string `json:"containerName"`
}

type Vulnerability struct {
Id string `json:"id"`
Name string `json:"name"`
SeverityScore int `json:"severityScore"`
IsRCE bool `json:"isRCE"`
Links []string `json:"links"`
Description string `json:"description"`
Exploitable string `json:"exploitable"`
ComponentsInfo []CveComponentsInfo `json:"componentsInfo"`
IsFixable bool `json:"isFixable"`
CvssInfo []CvssInfo `json:"cvssInfo"`
EpssInfo EpssInfo `json:"epssInfo"`
CisaKevInfo CisaKevInfo `json:"cisaKevInfo"`
}

type CveComponentsInfo struct {
Name string `json:"name"`
Version string `json:"version"`
PackageType string `json:"packageType"`
Paths []string `json:"paths"`
AffectedImages []string `json:"affected_images"`
Id string `json:"id"`
Name string `json:"name"`
SeverityScore int `json:"severityScore"`
IsRCE bool `json:"isRCE"`
Links []string `json:"links"`
Description string `json:"description"`
Exploitable string `json:"exploitable"`
ComponentsInfo []VulnerabilitiesComponent `json:"componentsInfo"`
IsFixable bool `json:"isFixable"`
CvssInfo []CvssInfo `json:"cvssInfo"`
EpssInfo EpssInfo `json:"epssInfo"`
CisaKevInfo CisaKevInfo `json:"cisaKevInfo"`
}

type CvssInfo struct {
Vector string `json:"vector"`
Version string `json:"version"`
Expand All @@ -122,9 +120,9 @@ type CvssImpactInfo struct {
}

type EpssInfo struct {
Epss float64 `json:"epss"`
Percentile float64 `json:"percentile"`
Date time.Time `json:"date"`
Epss float64 `json:"epss"`
Percentile float64 `json:"percentile"`
Date string `json:"date"`
}

type CisaKevInfo struct {
Expand Down

0 comments on commit a3590ac

Please sign in to comment.