aboutsummaryrefslogtreecommitdiff
path: root/internal/cpematch/cpematch.go
blob: 9f879c692d69dfd3b48f3accb821e49295dcdeb8 (plain)
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
// CPE match feed 1.0 parser.
package cpematch

// CPE name
type Name struct {
  Cpe22Uri string `json:"cpe22Uri"`
  Cpe23Uri string `json:"cpe23Uri"`
}

// CPE match string or range
type Match struct {
  Vulnerable *bool `json:"vulnerable"`
  Cpe22Uri string `json:"cpe22Uri"`
  Cpe23Uri string `json:"cpe23Uri"`
  VersionStartExcluding string `json:"versionStartExcluding"`
  VersionStartIncluding string `json:"versionStartIncluding"`
  VersionEndExcluding string `json:"versionEndExcluding"`
  VersionEndIncluding string `json:"versionEndIncluding"`
  Names []Name `json:"cpe_name"` // CPE match strings
}

// CPE matches
type Matches struct {
  Matches []Match `json:"matches"` // Array of CPE matches
}