github.com/khulnasoft-lab/tunnel-db@v0.0.0-20231117205118-74e1113bd007/pkg/vulnsrc/oracle-oval/types.go (about)

     1  package oracleoval
     2  
     3  import "fmt"
     4  
     5  type OracleOVAL struct {
     6  	Title       string
     7  	Description string
     8  	Platform    []string
     9  	References  []Reference
    10  	Criteria    Criteria
    11  	Severity    string
    12  	Cves        []Cve
    13  	IssuedDate  Date `json:"issued,omitempty"`
    14  }
    15  
    16  type Reference struct {
    17  	Source string
    18  	URI    string
    19  	ID     string
    20  }
    21  
    22  type Cve struct {
    23  	Impact string
    24  	Href   string
    25  	ID     string
    26  }
    27  
    28  type Criteria struct {
    29  	Operator   string
    30  	Criterias  []Criteria
    31  	Criterions []Criterion
    32  }
    33  
    34  type Criterion struct {
    35  	Comment string
    36  }
    37  
    38  type Package struct {
    39  	Name         string
    40  	FixedVersion string
    41  }
    42  
    43  type AffectedPackage struct {
    44  	Package Package
    45  	OSVer   string
    46  }
    47  
    48  type Date struct {
    49  	Date string `json:"date"`
    50  }
    51  
    52  func (p *AffectedPackage) PlatformName() string {
    53  	return fmt.Sprintf(platformFormat, p.OSVer)
    54  }