github.com/khulnasoft-lab/tunnel-db@v0.0.0-20231117205118-74e1113bd007/pkg/vulnsrc/mariner/oval/types.go (about) 1 package oval 2 3 // Definition is struct of `definitions.json` files 4 type Definition struct { 5 Class string 6 ID string 7 Version string 8 Metadata Metadata 9 Criteria Criteria 10 } 11 12 type Criteria struct { 13 Operator string 14 Criterion Criterion 15 } 16 17 type Criterion struct { 18 Comment string 19 TestRef string 20 } 21 22 type Metadata struct { 23 Title string 24 Affected Affected 25 Reference Reference 26 Patchable string 27 AdvisoryDate string 28 AdvisoryID string 29 Severity string 30 Description string 31 } 32 33 type Reference struct { 34 RefID string 35 RefURL string 36 Source string 37 } 38 39 type Affected struct { 40 Family string 41 Platform string 42 } 43 44 type State struct { 45 StateRef string 46 } 47 48 type Object struct { 49 ObjectRef string 50 } 51 52 // Tests is struct of `tests.json` files 53 type Tests struct { 54 RpminfoTests []RpmInfoTest 55 } 56 57 type RpmInfoTest struct { 58 Check string 59 Comment string 60 ID string 61 Version string 62 Object Object 63 State State 64 } 65 66 // Objects is struct of `objects.json` files 67 type Objects struct { 68 RpminfoObjects []RpmInfoObject 69 } 70 71 type RpmInfoObject struct { 72 ID string 73 Version string 74 Name string 75 } 76 77 // States is struct of `states.json` files 78 type States struct { 79 RpminfoState []RpmInfoState 80 } 81 82 type RpmInfoState struct { 83 ID string 84 Version string 85 Evr Evr 86 } 87 88 type Evr struct { 89 Text string 90 Datatype string 91 Operation string 92 }